mirror of https://github.com/acanas/swad-core.git
Version 15.113.13
This commit is contained in:
parent
f947f633cd
commit
c04ca4cbce
|
@ -1711,7 +1711,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
}
|
||||
.SOCIAL_TOP_PUBLISHER
|
||||
{
|
||||
color:#A0A0A0;
|
||||
color:#808080;
|
||||
font-size:13pt;
|
||||
}
|
||||
.SOCIAL_LEFT_PHOTO
|
||||
|
|
|
@ -2336,7 +2336,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActRcvSocPstGbl */{1492,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveSocialPostGbl ,NULL},
|
||||
/* ActRcvSocComUsr */{1503,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveCommentGbl ,NULL},
|
||||
/* ActShaSocNotGbl */{1495,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ShareSocialNoteGbl ,NULL},
|
||||
/* ActUnsSocPubGbl */{1496,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_UnshareSocialPubGbl ,NULL},
|
||||
/* ActUnsSocPubGbl */{1496,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_UnshareSocialNoteGbl ,NULL},
|
||||
/* ActReqRemSocPubGbl*/{1494,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RequestRemSocialNoteGbl ,NULL},
|
||||
/* ActRemSocPubGbl */{1493,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RemoveSocialNoteGbl ,NULL},
|
||||
/* ActReqRemSocComGbl*/{1505,-1,TabSoc,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RequestRemSocialComGbl ,NULL},
|
||||
|
@ -2345,7 +2345,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActRcvSocPstUsr */{1498,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveSocialPostUsr ,NULL},
|
||||
/* ActRcvSocComUsr */{1504,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ReceiveCommentUsr ,NULL},
|
||||
/* ActShaSocNotUsr */{1499,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_ShareSocialNoteUsr ,NULL},
|
||||
/* ActUnsSocPubUsr */{1500,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_UnshareSocialPubUsr ,NULL},
|
||||
/* ActUnsSocPubUsr */{1500,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_UnshareSocialNoteUsr ,NULL},
|
||||
/* ActReqRemSocPubUsr*/{1501,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RequestRemSocialNoteUsr ,NULL},
|
||||
/* ActRemSocPubUsr */{1502,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RemoveSocialNoteUsr ,NULL},
|
||||
/* ActReqRemSocComGbl*/{1506,-1,TabSoc,ActReqPubPrf ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Soc_RequestRemSocialComUsr ,NULL},
|
||||
|
|
|
@ -124,13 +124,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.113.12 (2016-01-15)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.113.13 (2016-01-16)"
|
||||
#define CSS_FILE "swad15.113.8.css"
|
||||
#define JS_FILE "swad15.113.8.js"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 15.113.13:Jan 16, 2016 Change in feddback when a social post is unshared. (192846 lines)
|
||||
Version 15.113.12:Jan 15, 2016 When a new social post is commented, shared or unshared, fade its background. (192807 lines)
|
||||
Version 15.113.11:Jan 15, 2016 When a new social post is received, fade its background. (192803 lines)
|
||||
Version 15.113.10:Jan 15, 2016 When a social note is not available, the button to comment is disabled.
|
||||
|
|
|
@ -282,7 +282,7 @@ static void Soc_ReceiveComment (void);
|
|||
static bool Soc_CheckIfICanCommentNote (long NotCod);
|
||||
|
||||
static long Soc_ShareSocialNote (void);
|
||||
static void Soc_UnshareSocialPublishing (void);
|
||||
static long Soc_UnshareSocialNote (void);
|
||||
static void Soc_UnshareASocialPublishingFromDB (struct SocialNote *SocNot);
|
||||
|
||||
static void Soc_RequestRemovalSocialNote (void);
|
||||
|
@ -938,8 +938,9 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
|
|||
Crs.CrsCod = -1L;
|
||||
|
||||
/***** Write sharer/commenter if distinct to author *****/
|
||||
if (!ShowNoteAlone && // Listing, not note alone
|
||||
SocPub) // SocPub may be NULL
|
||||
// if (!ShowNoteAlone && // Listing, not note alone
|
||||
// SocPub) // SocPub may be NULL
|
||||
if (SocPub) // SocPub may be NULL
|
||||
Soc_WriteTopPublisher (SocPub);
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
|
@ -1146,13 +1147,13 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
|
|||
static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub)
|
||||
{
|
||||
extern const char *Txt_View_public_profile;
|
||||
extern const char *Txt_SOCIAL_USER_has_stopped_sharing;
|
||||
extern const char *Txt_SOCIAL_USER_has_shared;
|
||||
extern const char *Txt_SOCIAL_USER_has_commented;
|
||||
struct UsrData UsrDat;
|
||||
|
||||
if (SocPub)
|
||||
if (SocPub->PubType == Soc_PUB_SHARED_NOTE ||
|
||||
SocPub->PubType == Soc_PUB_COMMENT_TO_NOTE)
|
||||
if (SocPub->PubType != Soc_PUB_ORIGINAL_NOTE)
|
||||
{
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -1172,9 +1173,20 @@ static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub)
|
|||
Act_FormEnd ();
|
||||
|
||||
/***** Show action made *****/
|
||||
fprintf (Gbl.F.Out," %s",
|
||||
SocPub->PubType == Soc_PUB_SHARED_NOTE ? Txt_SOCIAL_USER_has_shared :
|
||||
Txt_SOCIAL_USER_has_commented);
|
||||
switch (SocPub->PubType)
|
||||
{
|
||||
case Soc_PUB_UNKNOWN: // Used to print message indicating that I have unshared
|
||||
fprintf (Gbl.F.Out," %s",Txt_SOCIAL_USER_has_stopped_sharing);
|
||||
break;
|
||||
case Soc_PUB_ORIGINAL_NOTE: // Not applicable
|
||||
break;
|
||||
case Soc_PUB_SHARED_NOTE:
|
||||
fprintf (Gbl.F.Out," %s",Txt_SOCIAL_USER_has_shared);
|
||||
break;
|
||||
case Soc_PUB_COMMENT_TO_NOTE:
|
||||
fprintf (Gbl.F.Out," %s",Txt_SOCIAL_USER_has_commented);
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
@ -2461,20 +2473,24 @@ static long Soc_ShareSocialNote (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Unshare a previously shared social publishing ****************/
|
||||
/***************** Unshare a previously shared social note *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Soc_UnshareSocialPubGbl (void)
|
||||
void Soc_UnshareSocialNoteGbl (void)
|
||||
{
|
||||
/***** Unshare a previously shared social publishing *****/
|
||||
Soc_UnshareSocialPublishing ();
|
||||
long NotCod;
|
||||
|
||||
/***** Unshare a previously shared social note *****/
|
||||
NotCod = Soc_UnshareSocialNote ();
|
||||
|
||||
/***** Write updated timeline after unsharing (global) *****/
|
||||
Soc_ShowTimelineGbl ();
|
||||
Soc_ShowTimelineGblHighlightingNot (NotCod);
|
||||
}
|
||||
|
||||
void Soc_UnshareSocialPubUsr (void)
|
||||
void Soc_UnshareSocialNoteUsr (void)
|
||||
{
|
||||
long NotCod;
|
||||
|
||||
/***** Get user whom profile is displayed *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ();
|
||||
|
||||
|
@ -2484,20 +2500,21 @@ void Soc_UnshareSocialPubUsr (void)
|
|||
/***** Start section *****/
|
||||
fprintf (Gbl.F.Out,"<section id=\"timeline\">");
|
||||
|
||||
/***** Unshare a previously shared social publishing *****/
|
||||
Soc_UnshareSocialPublishing ();
|
||||
/***** Unshare a previously shared social note *****/
|
||||
NotCod = Soc_UnshareSocialNote ();
|
||||
|
||||
/***** Write updated timeline after unsharing (user) *****/
|
||||
Soc_ShowTimelineUsr ();
|
||||
Soc_ShowTimelineUsrHighlightingNot (NotCod);
|
||||
|
||||
/***** End section *****/
|
||||
fprintf (Gbl.F.Out,"</section>");
|
||||
}
|
||||
|
||||
static void Soc_UnshareSocialPublishing (void)
|
||||
static long Soc_UnshareSocialNote (void)
|
||||
{
|
||||
extern const char *Txt_SOCIAL_PUBLISHING_Unshared;
|
||||
// extern const char *Txt_SOCIAL_PUBLISHING_Unshared;
|
||||
struct SocialNote SocNot;
|
||||
struct SocialPublishing SocPub; // Used to print message indicating that I have unshared
|
||||
bool IAmTheAuthor;
|
||||
bool IAmAPublisherOfThisSocNot;
|
||||
bool ICanUnshare;
|
||||
|
@ -2524,12 +2541,16 @@ static void Soc_UnshareSocialPublishing (void)
|
|||
Soc_UpdateNumTimesANoteHasBeenShared (&SocNot);
|
||||
|
||||
/***** Message of success *****/
|
||||
Lay_ShowAlert (Lay_SUCCESS,Txt_SOCIAL_PUBLISHING_Unshared);
|
||||
// Lay_ShowAlert (Lay_SUCCESS,Txt_SOCIAL_PUBLISHING_Unshared);
|
||||
|
||||
/***** Show the social note corresponding
|
||||
to the publishing just unshared *****/
|
||||
Soc_WriteSocialNote (&SocNot,NULL,true,true);
|
||||
SocPub.PublisherCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
SocPub.PubType = Soc_PUB_UNKNOWN; // Used to print message indicating that I have unshared
|
||||
Soc_WriteSocialNote (&SocNot,&SocPub,true,true);
|
||||
}
|
||||
|
||||
return SocNot.NotCod;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -113,8 +113,8 @@ void Soc_ReceiveCommentUsr (void);
|
|||
|
||||
void Soc_ShareSocialNoteGbl (void);
|
||||
void Soc_ShareSocialNoteUsr (void);
|
||||
void Soc_UnshareSocialPubGbl (void);
|
||||
void Soc_UnshareSocialPubUsr (void);
|
||||
void Soc_UnshareSocialNoteGbl (void);
|
||||
void Soc_UnshareSocialNoteUsr (void);
|
||||
|
||||
void Soc_RequestRemSocialNoteGbl (void);
|
||||
void Soc_RequestRemSocialNoteUsr (void);
|
||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -35846,6 +35846,27 @@ const char *Txt_SOCIAL_USER_has_shared =
|
|||
"compartilhou:";
|
||||
#endif
|
||||
|
||||
const char *Txt_SOCIAL_USER_has_stopped_sharing =
|
||||
#if L==1
|
||||
"ha deixat de compartir:";
|
||||
#elif L==2
|
||||
"hat Sharing gestoppt:";
|
||||
#elif L==3
|
||||
"has stopped sharing:";
|
||||
#elif L==4
|
||||
"ha dejado de compartir:";
|
||||
#elif L==5
|
||||
"a cessé de partage:";
|
||||
#elif L==6
|
||||
"ha dejado de compartir:"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"ha smesso di condividere:";
|
||||
#elif L==8
|
||||
"przestał udostępniania:";
|
||||
#elif L==9
|
||||
"parou compartilhar:";
|
||||
#endif
|
||||
|
||||
const char *Txt_Sort_degrees_by =
|
||||
#if L==1
|
||||
"Ordenar titulacions per";
|
||||
|
|
Loading…
Reference in New Issue