From d85cb8dd26529e5c8baa2cbb3ed5a2a0eb99a898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 28 Mar 2019 11:13:38 +0100 Subject: [PATCH] Version18.89.6 --- swad_changelog.h | 3 ++- swad_timeline.c | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 70c9d90b7..0ed49769f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -464,10 +464,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.89.5 (2019-03-28)" +#define Log_PLATFORM_VERSION "SWAD 18.89.6 (2019-03-28)" #define CSS_FILE "swad18.89.5.css" #define JS_FILE "swad18.89.5.js" /* + Version 18.89.6: Mar 28, 2019 Code refactoring in timeline related to favers and sharers. (241151 lines) Version 18.89.5: Mar 28, 2019 Code refactoring in media uploader. Changes in design of media uploader. (241146 lines) Copy the following icon to icon public directory: diff --git a/swad_timeline.c b/swad_timeline.c index 948dde381..dcf97afe0 100644 --- a/swad_timeline.c +++ b/swad_timeline.c @@ -1642,6 +1642,8 @@ static void TL_WriteNote (const struct TL_Note *SocNot, else // I am not a faver of this note /* Put icon to fav this publication and list of users */ TL_PutFormToFavNote (SocNot); + /* Show who have marked this note as favourite */ + TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot); fprintf (Gbl.F.Out,""); } @@ -1665,6 +1667,8 @@ static void TL_WriteNote (const struct TL_Note *SocNot, else // I am not a sharer of this note /* Put icon to share this publication and list of users */ TL_PutFormToShareNote (SocNot); + /* Show who have shared this note */ + TL_ShowUsrsWhoHaveSharedNote (SocNot); fprintf (Gbl.F.Out,""); } @@ -2967,9 +2971,6 @@ static void TL_PutFormToShareNote (const struct TL_Note *SocNot) sprintf (ParamCod,"NotCod=%ld",SocNot->NotCod); TL_FormFavSha (ActShaSocNotGbl,ActShaSocNotUsr,ParamCod, "share-alt.svg",Txt_Share); - - /***** Who have shared this note *****/ - TL_ShowUsrsWhoHaveSharedNote (SocNot); } /*****************************************************************************/ @@ -2986,9 +2987,6 @@ static void TL_PutFormToUnshareNote (const struct TL_Note *SocNot) sprintf (ParamCod,"NotCod=%ld",SocNot->NotCod); TL_FormFavSha (ActUnsSocNotGbl,ActUnsSocNotUsr,ParamCod, "share-alt-green.svg",Txt_TIMELINE_NOTE_Shared); - - /***** Who have shared this note *****/ - TL_ShowUsrsWhoHaveSharedNote (SocNot); } /*****************************************************************************/ @@ -3005,9 +3003,6 @@ static void TL_PutFormToFavNote (const struct TL_Note *SocNot) sprintf (ParamCod,"NotCod=%ld",SocNot->NotCod); TL_FormFavSha (ActFavSocNotGbl,ActFavSocNotUsr,ParamCod, "heart.svg",Txt_Mark_as_favourite); - - /***** Who have marked this note as favourite *****/ - TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot); } /*****************************************************************************/ @@ -3024,9 +3019,6 @@ static void TL_PutFormToUnfavNote (const struct TL_Note *SocNot) sprintf (ParamCod,"NotCod=%ld",SocNot->NotCod); TL_FormFavSha (ActUnfSocNotGbl,ActUnfSocNotUsr,ParamCod, "heart-red.svg",Txt_TIMELINE_NOTE_Favourite); - - /***** Who have marked this note as favourite *****/ - TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot); } /*****************************************************************************/ @@ -3240,6 +3232,7 @@ void TL_ShareNoteGbl (void) /***** Write HTML inside DIV with form to unshare *****/ TL_PutFormToUnshareNote (&SocNot); + TL_ShowUsrsWhoHaveSharedNote (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3257,6 +3250,7 @@ void TL_ShareNoteUsr (void) /***** Write HTML inside DIV with form to unshare *****/ TL_PutFormToUnshareNote (&SocNot); + TL_ShowUsrsWhoHaveSharedNote (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3311,6 +3305,7 @@ void TL_FavNoteGbl (void) /***** Write HTML inside DIV with form to unfav *****/ TL_PutFormToUnfavNote (&SocNot); + TL_ShowUsrsWhoHaveMarkedNoteAsFav (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3328,6 +3323,7 @@ void TL_FavNoteUsr (void) /***** Write HTML inside DIV with form to unfav *****/ TL_PutFormToUnfavNote (&SocNot); + TL_ShowUsrsWhoHaveMarkedNoteAsFav (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3493,6 +3489,7 @@ void TL_UnshareNoteGbl (void) /***** Write HTML inside DIV with form to share *****/ TL_PutFormToShareNote (&SocNot); + TL_ShowUsrsWhoHaveSharedNote (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3510,6 +3507,7 @@ void TL_UnshareNoteUsr (void) /***** Write HTML inside DIV with form to share *****/ TL_PutFormToShareNote (&SocNot); + TL_ShowUsrsWhoHaveSharedNote (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3567,6 +3565,7 @@ void TL_UnfavNoteGbl (void) /***** Write HTML inside DIV with form to fav *****/ TL_PutFormToFavNote (&SocNot); + TL_ShowUsrsWhoHaveMarkedNoteAsFav (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -3584,6 +3583,7 @@ void TL_UnfavNoteUsr (void) /***** Write HTML inside DIV with form to fav *****/ TL_PutFormToFavNote (&SocNot); + TL_ShowUsrsWhoHaveMarkedNoteAsFav (&SocNot); /***** All the output is made, so don't write anymore *****/ Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true; @@ -4576,11 +4576,11 @@ static void TL_ShowSharersOrFavers (MYSQL_RES **mysql_res, } if (NumUsrs > NumUsrsShown) - fprintf (Gbl.F.Out,"
" + fprintf (Gbl.F.Out,"" "\"%u\"" - "
", + "", Cfg_URL_ICON_PUBLIC, NumUsrs - NumUsrsShown, NumUsrs - NumUsrsShown);