diff --git a/css/swad18.89.5.css b/css/swad18.89.5.css
index f1401ef0c..7c889a7a8 100644
--- a/css/swad18.89.5.css
+++ b/css/swad18.89.5.css
@@ -3097,23 +3097,27 @@ a:hover img.CENTRE_PHOTO_SHOW
.TL_ICO_FAV
{
display:inline-block;
- vertical-align:bottom;
+ width:50%;
+ vertical-align:top;
+ background:pink;
}
.TL_ICO_SHA
{
display:inline-block;
- vertical-align:bottom;
+ width:50%;
+ vertical-align:top;
+ background:lightgreen;
}
.TL_ICO_FAV_DISABLED
{
display:inline-block;
vertical-align:bottom;
opacity:0.1;
+ background:pink;
}
.TL_ICO_SHA_DISABLED
{
display:inline-block;
- padding-left:20px;
vertical-align:bottom;
opacity:0.1;
}
diff --git a/swad_changelog.h b/swad_changelog.h
index bb1d88172..1e6825e38 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -464,11 +464,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 18.90 (2019-03-28)"
+#define Log_PLATFORM_VERSION "SWAD 18.90.1 (2019-03-28)"
#define CSS_FILE "swad18.89.5.css"
#define JS_FILE "swad18.89.5.js"
/*
- * TODO: Ver todos los favoritos de una pub. mía
+ Version 18.90.1: Mar 28, 2019 Show all users who have shared/faved social notes and comments. Not finished. (241358 lines)
Version 18.90: Mar 28, 2019 Show all users who have shared/faved social notes and comments. Not finished. (241360 lines)
6 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1766','es','N','Ver quiénes comp. public. social (global)');
diff --git a/swad_timeline.c b/swad_timeline.c
index 62d97d9fb..b52d5e7d6 100644
--- a/swad_timeline.c
+++ b/swad_timeline.c
@@ -234,13 +234,16 @@ static long TL_ReceiveComment (void);
static void TL_ShareNote (struct TL_Note *SocNot);
static void TL_FavNote (struct TL_Note *SocNot);
+
+static void TL_PutFormToFavUnfavComment (struct TL_Comment *SocCom,unsigned Limit);
static void TL_FavComment (struct TL_Comment *SocCom);
+static void TL_UnfavComment (struct TL_Comment *SocCom);
+
static void TL_CreateNotifToAuthor (long AuthorCod,long PubCod,
Ntf_NotifyEvent_t NotifyEvent);
static void TL_UnshareNote (struct TL_Note *SocNot);
static void TL_UnfavNote (struct TL_Note *SocNot);
-static void TL_UnfavComment (struct TL_Comment *SocCom);
static void TL_RequestRemovalNote (void);
static void TL_PutParamsRemoveNote (void);
@@ -1638,54 +1641,46 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
"
");
/* Put icon to mark this note as favourite */
+ fprintf (Gbl.F.Out,"
",
+ Gbl.UniqueNameEncrypted,NumDiv);
if (SocNot->Unavailable || // Unavailable notes can not be favourited
IAmTheAuthor) // I am the author
- {
/* Put disabled icon and list of users
who have marked this note as favourite */
TL_PutDisabledIconFav (SocNot->NumFavs);
- TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot,TL_MAX_SHARERS_FAVERS_SHOWN);
- }
else // Available and I am not the author
{
- fprintf (Gbl.F.Out,"
",
- Gbl.UniqueNameEncrypted,NumDiv);
if (IAmAFaverOfThisSocNot) // I have favourited this note
/* Put icon to unfav this publication and list of users */
TL_PutFormToUnfavNote (SocNot);
- else // I am not a faver of this note
+ 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,TL_MAX_SHARERS_FAVERS_SHOWN);
- fprintf (Gbl.F.Out,"
");
}
+ /* Show who have marked this note as favourite */
+ TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot,TL_MAX_SHARERS_FAVERS_SHOWN);
+ fprintf (Gbl.F.Out,"
");
/* Put icon to share/unshare */
+ fprintf (Gbl.F.Out,"
",
+ Gbl.UniqueNameEncrypted,NumDiv);
if (SocNot->Unavailable || // Unavailable notes can not be shared
IAmTheAuthor) // I am the author
- {
/* Put disabled icon and list of users
who have shared this note */
TL_PutDisabledIconShare (SocNot->NumShared);
- TL_ShowUsrsWhoHaveSharedNote (SocNot,TL_MAX_SHARERS_FAVERS_SHOWN);
- }
else // Available and I am not the author
{
- fprintf (Gbl.F.Out,"
",
- Gbl.UniqueNameEncrypted,NumDiv);
if (IAmASharerOfThisSocNot) // I am a sharer of this note
/* Put icon to unshare this publication and list of users */
TL_PutFormToUnshareNote (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,TL_MAX_SHARERS_FAVERS_SHOWN);
- fprintf (Gbl.F.Out,"
");
}
+ /* Show who have shared this note */
+ TL_ShowUsrsWhoHaveSharedNote (SocNot,TL_MAX_SHARERS_FAVERS_SHOWN);
+ fprintf (Gbl.F.Out,"
");
/* Put icon to remove this note */
if (IAmTheAuthor)
@@ -2724,8 +2719,8 @@ static void TL_WriteOneCommentInList (MYSQL_RES *mysql_res)
/***** Write comment *****/
TL_WriteComment (&SocCom,
- TL_TOP_MESSAGE_NONE,-1L,
- false);
+ TL_TOP_MESSAGE_NONE,-1L,
+ false); // Not alone
/***** Free image *****/
Med_MediaDestructor (&SocCom.Media);
@@ -2765,9 +2760,7 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
extern const char *Txt_Centre;
extern const char *Txt_Institution;
struct UsrData UsrDat;
- bool ItsMe;
bool IAmTheAuthor;
- bool IAmAFaverOfThisSocCom = false;
bool ShowPhoto = false;
char PhotoURL[PATH_MAX + 1];
static unsigned NumDiv = 0; // Used to create unique div id for fav
@@ -2804,11 +2797,7 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
Usr_UsrDataConstructor (&UsrDat);
UsrDat.UsrCod = SocCom->UsrCod;
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS);
- ItsMe = Usr_ItsMe (UsrDat.UsrCod);
- IAmTheAuthor = ItsMe;
- if (!IAmTheAuthor)
- IAmAFaverOfThisSocCom = TL_CheckIfCommIsFavedByUsr (SocCom->PubCod,
- Gbl.Usrs.Me.UsrDat.UsrCod);
+ IAmTheAuthor = Usr_ItsMe (UsrDat.UsrCod);
/***** Left: write author's photo *****/
fprintf (Gbl.F.Out,"