mirror of https://github.com/acanas/swad-core.git
Version 20.39.4: Mar 02, 2021 Code refactoring in timeline notes.
This commit is contained in:
parent
aaec25140a
commit
68b98f420a
|
@ -598,10 +598,11 @@ TODO: DNI de un estudiante sale err
|
|||
TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede.
|
||||
TODO: Salvador Romero Cortés: @acanas opción para editar posts
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.39.3 (2021-03-02)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 20.39.4 (2021-03-02)"
|
||||
#define CSS_FILE "swad20.33.9.css"
|
||||
#define JS_FILE "swad20.6.2.js"
|
||||
/*
|
||||
Version 20.39.4: Mar 02, 2021 Code refactoring in timeline notes. (305614 lines)
|
||||
Version 20.39.3: Mar 02, 2021 Code refactoring in timeline favourites. (305601 lines)
|
||||
Version 20.39.2: Mar 02, 2021 Code refactoring in timeline database. (305612 lines)
|
||||
Version 20.39.1: Mar 02, 2021 Code refactoring in timeline comments. (305618 lines)
|
||||
|
|
|
@ -311,31 +311,6 @@ void TL_Fav_UnfCommGbl (void)
|
|||
TL_Usr_SHOW_FEW_USRS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put icon to fav/unfav and list of favers *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void TL_Fav_PutIconToFavUnf (TL_Fav_WhatToFav_t WhatToFav,
|
||||
long Cod,long UsrCod,unsigned NumFavs,
|
||||
TL_Usr_HowManyUsrs_t HowManyUsrs)
|
||||
{
|
||||
/***** Put form to fav/unfav this comment *****/
|
||||
/* Begin container */
|
||||
HTM_DIV_Begin ("class=\"TL_ICO\"");
|
||||
|
||||
/* Icon to fav/unfav */
|
||||
if (Usr_ItsMe (UsrCod)) // I am the author ==> I can not fav/unfav
|
||||
TL_Fav_PutDisabledIconFav (NumFavs);
|
||||
else // I am not the author
|
||||
TL_Fav_PutFormToFavUnf (WhatToFav,Cod);
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** Show who have marked this comment as favourite *****/
|
||||
TL_Fav_ShowUsrsWhoHaveMarkedAsFav (WhatToFav,Cod,UsrCod,NumFavs,HowManyUsrs);
|
||||
}
|
||||
|
||||
static void TL_Fav_FavComm (struct TL_Com_Comment *Com)
|
||||
{
|
||||
extern const char *Txt_The_comment_no_longer_exists;
|
||||
|
@ -454,6 +429,31 @@ static void TL_Fav_UnfComm (struct TL_Com_Comment *Com)
|
|||
Med_MediaDestructor (&Com->Content.Media);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put icon to fav/unfav and list of favers *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void TL_Fav_PutIconToFavUnf (TL_Fav_WhatToFav_t WhatToFav,
|
||||
long Cod,long UsrCod,unsigned NumFavs,
|
||||
TL_Usr_HowManyUsrs_t HowManyUsrs)
|
||||
{
|
||||
/***** Put form to fav/unfav this comment *****/
|
||||
/* Begin container */
|
||||
HTM_DIV_Begin ("class=\"TL_ICO\"");
|
||||
|
||||
/* Icon to fav/unfav */
|
||||
if (Usr_ItsMe (UsrCod)) // I am the author ==> I can not fav/unfav
|
||||
TL_Fav_PutDisabledIconFav (NumFavs);
|
||||
else // I am not the author
|
||||
TL_Fav_PutFormToFavUnf (WhatToFav,Cod);
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** Show who have marked this comment as favourite *****/
|
||||
TL_Fav_ShowUsrsWhoHaveMarkedAsFav (WhatToFav,Cod,UsrCod,NumFavs,HowManyUsrs);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Put disabled icon to mark as favourite *******************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -173,14 +173,23 @@ void TL_Not_ShowHighlightedNote (struct TL_Timeline *Timeline,
|
|||
TL_Not_GetDataOfNoteByCod (Not);
|
||||
|
||||
/***** Show the note highlighted *****/
|
||||
/* Begin box */
|
||||
Box_BoxBegin (NULL,NULL,
|
||||
NULL,NULL,
|
||||
NULL,Box_CLOSABLE);
|
||||
|
||||
/* Begin container */
|
||||
HTM_DIV_Begin ("class=\"TL_WIDTH TL_NEW_PUB\"");
|
||||
|
||||
/* Check and write note with top message */
|
||||
TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,Not,
|
||||
TopMessages[NotifyEvent],
|
||||
PublisherDat.UsrCod);
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
|
||||
/* End box */
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
|
@ -256,14 +265,19 @@ static void TL_Not_WriteTopMessage (TL_TopMessage_t TopMessage,long PublisherCod
|
|||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"TL_TOP_CONT TL_TOP_PUBLISHER TL_WIDTH\"");
|
||||
|
||||
/***** Show user's name inside form to go to user's public profile *****/
|
||||
/***** Show publisher's name inside form to go to user's public profile *****/
|
||||
/* Begin form */
|
||||
Frm_BeginFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (PublisherDat.EnUsrCod);
|
||||
|
||||
/* Publisher's name */
|
||||
HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (PublisherCod) ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK TL_TOP_PUBLISHER",NULL);
|
||||
HTM_Txt (PublisherDat.FullName);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
/* End form */
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Show action made *****/
|
||||
|
@ -465,7 +479,9 @@ static void TL_Not_GetLocationInHierarchy (const struct TL_Not_Note *Not,
|
|||
case TL_NOTE_FORUM_POST:
|
||||
/* Get forum type of the post */
|
||||
For_GetForumTypeAndLocationOfAPost (Not->Cod,Forum);
|
||||
For_SetForumName (Forum,ForumName,Gbl.Prefs.Language,false); // Set forum name in recipient's language
|
||||
|
||||
/* Set forum name in recipient's language */
|
||||
For_SetForumName (Forum,ForumName,Gbl.Prefs.Language,false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -598,10 +614,15 @@ static void TL_Not_PutFormGoToAction (const struct TL_Not_Note *Not,
|
|||
Gbl.Form.Inside) // Inside another form
|
||||
{
|
||||
/***** Do not put form *****/
|
||||
/* Begin container */
|
||||
HTM_DIV_Begin ("class=\"TL_FORM_OFF\"");
|
||||
|
||||
/* Text ("not available") */
|
||||
HTM_Txt (Txt_TIMELINE_NOTE[Not->NoteType]);
|
||||
if (Not->Unavailable)
|
||||
HTM_TxtF (" (%s)",Txt_not_available);
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
else // Not inside another form
|
||||
|
|
Loading…
Reference in New Issue