diff --git a/swad_changelog.h b/swad_changelog.h index a94ffe05c..34da2368b 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.159.1 (2016-03-21)" +#define Log_PLATFORM_VERSION "SWAD 15.159.2 (2016-03-21)" #define CSS_FILE "swad15.157.css" #define JS_FILE "swad15.131.3.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.159.2: Mar 21, 2016 Button to add new notice. (196410 lines) Version 15.159.1: Mar 21, 2016 Icon to add new notice integrated in frame. (196395 lines) Version 15.159: Mar 21, 2016 Number of sent/received messages integrated in frame title. (196372 lines) Version 15.158.4: Mar 21, 2016 Icon to remove sent/received messages integrated in frame. (196300 lines) diff --git a/swad_notice.c b/swad_notice.c index 8bcc4ae1f..6568d7da1 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -67,6 +67,7 @@ const unsigned Not_MaxCharsURLOnScreen[Not_NUM_TYPES_LISTING] = /*****************************************************************************/ static void Not_PutIconToAddNewNotice (void); +static void Not_PutButtonToAddNewNotice (void); static void Not_GetDataAndShowNotice (long NotCod,bool ICanEdit); static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, long NotCod, @@ -463,6 +464,10 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEdit) Gbl.Prefs.IconsURL); break; case Not_LIST_FULL_NOTICES: + /***** Button to add new notice *****/ + if (ICanEdit) + Not_PutButtonToAddNewNotice (); + /***** End frame *****/ Lay_EndRoundFrame (); break; @@ -489,6 +494,19 @@ static void Not_PutIconToAddNewNotice (void) Lay_PutContextualLink (ActWriNot,NULL,"plus64x64.png",Txt_New_notice,NULL); } +/*****************************************************************************/ +/********************** Put button to add a new notice ***********************/ +/*****************************************************************************/ + +static void Not_PutButtonToAddNewNotice (void) + { + extern const char *Txt_New_notice; + + Act_FormStart (ActWriNot); + Lay_PutConfirmButton (Txt_New_notice); + Act_FormEnd (); + } + /*****************************************************************************/ /******************** Get data of a notice and show it ***********************/ /*****************************************************************************/