");
fprintf (Gbl.F.Out,"Fulanito compartió."); // TODO: Need translation!!!
fprintf (Gbl.F.Out,"
");
}
/***** Left: write author's photo *****/
fprintf (Gbl.F.Out,"");
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO45x60",Pho_ZOOM);
fprintf (Gbl.F.Out,"
");
/***** Right: author's name, time, summary and buttons *****/
fprintf (Gbl.F.Out,"");
/* Write author's full name and nickname */
Str_LimitLengthHTMLStr (UsrDat.FullName,16);
fprintf (Gbl.F.Out,"
"
"%s"
" @%s"
"
",
UsrDat.FullName,UsrDat.Nickname);
/* Write date and time */
Soc_WriteDateTime (SocNot->DateTimeUTC);
/* Write content of the note */
if (SocNot->NoteType == Soc_NOTE_SOCIAL_POST)
{
/* Write post content */
fprintf (Gbl.F.Out,"
");
Soc_GetAndWriteSocialPost (SocNot->Cod);
fprintf (Gbl.F.Out,"
");
}
else
{
/* Get location in hierarchy */
if (!SocNot->Unavailable)
switch (SocNot->NoteType)
{
case Soc_NOTE_INS_DOC_PUB_FILE:
case Soc_NOTE_INS_SHA_PUB_FILE:
/* Get institution data */
Ins.InsCod = SocNot->HieCod;
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
break;
case Soc_NOTE_CTR_DOC_PUB_FILE:
case Soc_NOTE_CTR_SHA_PUB_FILE:
/* Get centre data */
Ctr.CtrCod = SocNot->HieCod;
Ctr_GetDataOfCentreByCod (&Ctr);
break;
case Soc_NOTE_DEG_DOC_PUB_FILE:
case Soc_NOTE_DEG_SHA_PUB_FILE:
/* Get degree data */
Deg.DegCod = SocNot->HieCod;
Deg_GetDataOfDegreeByCod (&Deg);
break;
case Soc_NOTE_CRS_DOC_PUB_FILE:
case Soc_NOTE_CRS_SHA_PUB_FILE:
case Soc_NOTE_EXAM_ANNOUNCEMENT:
case Soc_NOTE_NOTICE:
/* Get course data */
Crs.CrsCod = SocNot->HieCod;
Crs_GetDataOfCourseByCod (&Crs);
break;
case Soc_NOTE_FORUM_POST:
/* Get forum type of the post */
Gbl.Forum.ForumType = For_GetForumTypeOfAPost (SocNot->Cod);
For_SetForumName (Gbl.Forum.ForumType,
&Ins,
&Ctr,
&Deg,
&Crs,
ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
Gbl.Forum.Ins.InsCod = Ins.InsCod;
Gbl.Forum.Ctr.CtrCod = Ctr.CtrCod;
Gbl.Forum.Deg.DegCod = Deg.DegCod;
Gbl.Forum.Crs.CrsCod = Crs.CrsCod;
break;
default:
break;
}
/* Write note type */
fprintf (Gbl.F.Out,"
");
Soc_PutFormGoToAction (SocNot);
fprintf (Gbl.F.Out,"
");
/* Write location in hierarchy */
if (!SocNot->Unavailable)
switch (SocNot->NoteType)
{
case Soc_NOTE_INS_DOC_PUB_FILE:
case Soc_NOTE_INS_SHA_PUB_FILE:
/* Write location (institution) in hierarchy */
fprintf (Gbl.F.Out,"
%s: %s
",
Txt_Institution,Ins.ShortName);
break;
case Soc_NOTE_CTR_DOC_PUB_FILE:
case Soc_NOTE_CTR_SHA_PUB_FILE:
/* Write location (centre) in hierarchy */
fprintf (Gbl.F.Out,"
%s: %s
",
Txt_Centre,Ctr.ShortName);
break;
case Soc_NOTE_DEG_DOC_PUB_FILE:
case Soc_NOTE_DEG_SHA_PUB_FILE:
/* Write location (degree) in hierarchy */
fprintf (Gbl.F.Out,"
%s: %s
",
Txt_Degree,Deg.ShortName);
break;
case Soc_NOTE_CRS_DOC_PUB_FILE:
case Soc_NOTE_CRS_SHA_PUB_FILE:
case Soc_NOTE_EXAM_ANNOUNCEMENT:
case Soc_NOTE_NOTICE:
/* Write location (course) in hierarchy */
fprintf (Gbl.F.Out,"
%s: %s
",
Txt_Course,Crs.ShortName);
break;
case Soc_NOTE_FORUM_POST:
/* Write forum name */
fprintf (Gbl.F.Out,"
%s: %s
",
Txt_Forum,ForumName);
break;
default:
break;
}
/* Write note summary */
Soc_GetNoteSummary (SocNot,SummaryStr,Soc_MAX_BYTES_SUMMARY);
fprintf (Gbl.F.Out,"
%s
",SummaryStr);
}
/* Create unique id for new comment */
Soc_SetUniqueId (IdNewComment);
/* Get number of comments in this social note */
NumComments = Soc_GetNumCommentsInSocialNote (SocNot->NotCod);
/* Put icon to add a comment */
if (!NumComments)
Soc_PutIconToToggleCommentSocialNote (IdNewComment,false);
/* Put icons to share/unshare */
if (IAmTheAuthor) // I am the author
Soc_PutDisabledIconShare (SocNot->NumShared);
else if (IAmAPublisherOfThisSocNot) // I am a publisher of this social note,
// but not the author ==> I have shared this social note
/* Put icon to unshare this publishing */
Soc_PutFormToUnshareSocialPublishing (SocNot->NotCod);
else // I am not the author and I am not a publisher
{
if (SocNot->Unavailable) // Unavailable social notes can not be shared
Soc_PutDisabledIconShare (SocNot->NumShared);
else
/* Put icon to share this publishing */
Soc_PutFormToShareSocialNote (SocNot->NotCod);
}
/* Show who have shared this social note */
Soc_ShowUsrsWhoHaveSharedSocialNote (SocNot);
/* Put icon to remove this publishing */
if (IAmTheAuthor && !ShowNoteAlone)
Soc_PutFormToRemoveSocialPublishing (SocNot->NotCod);
/* Show comments */
if (NumComments)
Soc_WriteCommentsInSocialNote (SocNot->NotCod,IdNewComment);
/* Put hidden form to write a new comment */
Soc_PutHiddenFormToWriteNewCommentToSocialNote (SocNot->NotCod,IdNewComment);
/* End of right part */
fprintf (Gbl.F.Out,"
");
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
}
/***** End list item *****/
fprintf (Gbl.F.Out,"