From bdcd9765aa0f8b8f4a7a3c6c96d88a094bcad352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 23 Nov 2016 13:55:27 +0100 Subject: [PATCH] Version 16.68.6 --- swad_changelog.h | 3 ++- swad_help.c | 4 ++++ swad_message.c | 18 +++++++++++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 022ddf567..62f75f6eb 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -172,13 +172,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.68.5 (2016-11-22)" +#define Log_PLATFORM_VERSION "SWAD 16.68.6 (2016-11-23)" #define CSS_FILE "swad16.68.css" #define JS_FILE "swad16.46.1.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 16.68.6: Nov 23, 2016 Contextual help on messages. (207455 lines) Version 16.68.5: Nov 22, 2016 Code refactoring and change in layout of file browser and contextual links. (207443 lines) Version 16.68.4: Nov 22, 2016 Code refactoring in file browser. (207447 lines) Version 16.68.3: Nov 22, 2016 Change in layout of contextual links in file browsers. (207436 lines) diff --git a/swad_help.c b/swad_help.c index 1c2535440..afcad26bd 100644 --- a/swad_help.c +++ b/swad_help.c @@ -131,6 +131,10 @@ const char *Hlp_MESSAGES_Notifications = WIKI "MESSAGES.Notifications"; const char *Hlp_MESSAGES_Notices = WIKI "MESSAGES.Notices"; +const char *Hlp_MESSAGES_Write = WIKI "MESSAGES.Write"; +const char *Hlp_MESSAGES_Received = WIKI "MESSAGES.Received"; +const char *Hlp_MESSAGES_Sent = WIKI "MESSAGES.Sent"; + /***** STATS tab *****/ const char *Hlp_STATS_Surveys = WIKI "STATS.Surveys"; diff --git a/swad_message.c b/swad_message.c index d6adfc71d..32ad7322b 100644 --- a/swad_message.c +++ b/swad_message.c @@ -164,6 +164,7 @@ void Msg_FormMsgUsrs (void) static void Msg_PutFormMsgUsrs (char *Content) { + extern const char *Hlp_MESSAGES_Write; extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_Reply_message; extern const char *Txt_New_message; @@ -202,7 +203,7 @@ static void Msg_PutFormMsgUsrs (char *Content) Lay_StartRoundFrame (NULL, Gbl.Msg.Reply.IsReply ? Txt_Reply_message : Txt_New_message, - NULL,NULL); + NULL,Hlp_MESSAGES_Write); if (Gbl.Msg.ShowOnlyOneRecipient) /***** Form to show several potential recipients *****/ @@ -1646,6 +1647,8 @@ void Msg_ShowRecMsgs (void) static void Msg_ShowSentOrReceivedMessages (void) { + extern const char *Hlp_MESSAGES_Received; + extern const char *Hlp_MESSAGES_Sent; extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *Txt_Update_messages; char FilterFromToSubquery[Msg_MAX_LENGTH_MESSAGES_QUERY+1]; @@ -1658,15 +1661,20 @@ static void Msg_ShowSentOrReceivedMessages (void) unsigned NumUnreadMsgs = 0; // Initialized to avoid warning struct Pagination Pagination; long MsgCod; + static const Act_Action_t ActionSee[Msg_NUM_TYPES_OF_MSGS] = + { + ActSeeRcvMsg, + ActSeeSntMsg + }; static const Pag_WhatPaginate_t WhatPaginate[Msg_NUM_TYPES_OF_MSGS] = { Pag_MESSAGES_RECEIVED, Pag_MESSAGES_SENT }; - static const Act_Action_t ActionSee[Msg_NUM_TYPES_OF_MSGS] = + const char *Help[Msg_NUM_TYPES_OF_MSGS] = { - ActSeeRcvMsg, - ActSeeSntMsg + Hlp_MESSAGES_Received, + Hlp_MESSAGES_Sent }; /***** Get the page number *****/ @@ -1717,7 +1725,7 @@ static void Msg_ShowSentOrReceivedMessages (void) /***** Start frame with messages *****/ Lay_StartRoundFrame ("97%", Msg_WriteNumMsgs (NumUnreadMsgs), - Msg_PutIconsListMsgs,NULL); + Msg_PutIconsListMsgs,Help[Gbl.Msg.TypeOfMessages]); if (Gbl.Msg.NumMsgs) // If there are messages... {