From b5bab4ff23028e9f97cab8cf583f6a27bd32ac72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 30 Dec 2015 00:58:25 +0100 Subject: [PATCH] Version 15.82.3 --- icon/write64x64.gif | Bin 0 -> 460 bytes swad_changelog.h | 3 ++- swad_social.c | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 icon/write64x64.gif diff --git a/icon/write64x64.gif b/icon/write64x64.gif new file mode 100644 index 0000000000000000000000000000000000000000..b73af421cdcbde0a3d2d7866ba2fcf341afc3000 GIT binary patch literal 460 zcmV;-0WCc~va-Fsz5oCJA^8LW000jFEC2ui06+jh000F3@X1N5y*TU5yZ>M)j$~<` zXsWJk>%MR-&m=Mcc&_h!9~=(M!O##DddQ^G($FP90i|>b7*v|OXD3SS@~jjrPpdKL z3^eh0qf^i%>TE`lE6f_?xQ>A#ajk!n!0C~f=uiw9b0}CEZxUk{Fh!a1E0029s Cr^&$p literal 0 HcmV?d00001 diff --git a/swad_changelog.h b/swad_changelog.h index e614f635c..e23b79f84 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -116,13 +116,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.82.2 (2015-12-30)" +#define Log_PLATFORM_VERSION "SWAD 15.82.3 (2015-12-30)" #define CSS_FILE "swad15.80.css" #define JS_FILE "swad15.77.7.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.82.3: Dec 30, 2015 Contextual link to write a new social post. (189199 lines) Version 15.82.2: Dec 30, 2015 Current timeline is displayed below the form to write a new social post. (189183 lines) Version 15.82.1: Dec 29, 2015 Public social posts are displayed in timeline. (189176 lines) Version 15.82: Dec 29, 2015 Public social post is received and stored in a new database table. (189136 lines) diff --git a/swad_social.c b/swad_social.c index f9280929c..028f33e14 100644 --- a/swad_social.c +++ b/swad_social.c @@ -106,6 +106,7 @@ extern struct Globals Gbl; /***************************** Private prototypes ****************************/ /*****************************************************************************/ +static void Soc_PutLinkToWriteANewPost (void); static void Soc_GetAndWriteSocialPost (long PstCod); static unsigned long Soc_ShowTimeline (const char *Query); @@ -116,6 +117,20 @@ static void Soc_StartFormGoToAction (Soc_SocialEvent_t SocialEvent, static void Soc_GetEventSummary (Soc_SocialEvent_t SocialEvent,long Cod, char *SummaryStr,unsigned MaxChars); +/*****************************************************************************/ +/*********************** Show social activity (timeline) *********************/ +/*****************************************************************************/ + +static void Soc_PutLinkToWriteANewPost (void) + { + extern const char *Txt_New_comment; + + fprintf (Gbl.F.Out,"
"); + Lay_PutContextualLink (ActReqSocPst,NULL,"write64x64.gif", + Txt_New_comment,Txt_New_comment); + fprintf (Gbl.F.Out,"
"); + } + /*****************************************************************************/ /****************** Form to write a new public comment ***********************/ /*****************************************************************************/ @@ -242,6 +257,10 @@ void Soc_ShowFollowingTimeline (void) { char Query[512]; + /***** Link to write a new social post *****/ + if (Gbl.CurrentAct != ActReqSocPst) + Soc_PutLinkToWriteANewPost (); + /***** Show warning if I do not follow anyone *****/ if (!Fol_GetNumFollowing (Gbl.Usrs.Me.UsrDat.UsrCod)) Lay_ShowAlert (Lay_INFO,"Usted no sigue a ningún usuario."); // Need translation!!!