From 3e20dee347b3abe3e00c990d56d07e3ecfe7df46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 6 Nov 2016 15:47:37 +0100 Subject: [PATCH] Version 16.47.1 --- icon/pie64x64.gif | Bin 0 -> 482 bytes swad_changelog.h | 5 ++++- swad_global.h | 1 + swad_notice.c | 20 ++++++++++++++++++-- 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 icon/pie64x64.gif diff --git a/icon/pie64x64.gif b/icon/pie64x64.gif new file mode 100644 index 0000000000000000000000000000000000000000..847966c546ccc2c5e982861a2bf90a3fbde13fa8 GIT binary patch literal 482 zcmV<80UiEFNk%w1VL$*t0J8u9KR-V}KtNMdQ(0MAWMpJ)Y;1CJa)X0|ii(PtmzSrf zr?j-Ryu7^s|NqL$%GcM|A^8LW000dDEC2ui06+jh000F3u*pfQy*TU5yZ>M)j$~<` zXsWI(2LwZbENvUyct9w1n*RYr&jkDlc*DzMaVQ90l;RISNKz7m+$#{38X3dK0YENx zy|@>xg+SlVZrnQM$j0IEn^4{(B5&V8g{@|70|ls*Xi!>x$(%dLKFtom*yAjH}@0rjR#e&B8uk`+7WsZ4#*O46z~Krh^88zumC}U Yh64;Fh`YG5<;$2eYu?OxLIeN+I}qp4&j0`b literal 0 HcmV?d00001 diff --git a/swad_changelog.h b/swad_changelog.h index f90d56227..00fb256ea 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -156,13 +156,16 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.47 (2016-11-06)" +#define Log_PLATFORM_VERSION "SWAD 16.47.1 (2016-11-06)" #define CSS_FILE "swad16.32.1.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.47.1: Nov 06, 2016 Icon in list of notices to show figure (statistics). (206129 lines) +Copy icon/pie64x64.gif to icon directory + Version 16.47: Nov 06, 2016 New functions to put a contextual icon to show a figure (statistics). (206113 lines) Version 16.46.10: Nov 06, 2016 Code refactoring in statistics. (206080 lines) Version 16.46.9: Nov 06, 2016 Fixed bug in figures (statistics). (206064 lines) diff --git a/swad_global.h b/swad_global.h index ddf52d248..f1580702a 100644 --- a/swad_global.h +++ b/swad_global.h @@ -463,6 +463,7 @@ struct Globals struct { long HighlightNotCod; // Notice code of a notice to be highlighted + bool ICanEdit; } Notices; } CurrentCrs; struct diff --git a/swad_notice.c b/swad_notice.c index 5b2de2601..72f611d5b 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -66,6 +66,7 @@ const unsigned Not_MaxCharsURLOnScreen[Not_NUM_TYPES_LISTING] = /***************************** Private prototypes ****************************/ /*****************************************************************************/ +static void Not_PutIconsNotices (void); static void Not_PutIconToAddNewNotice (void); static void Not_PutButtonToAddNewNotice (void); static void Not_GetDataAndShowNotice (long NotCod,bool ICanEdit); @@ -395,11 +396,11 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEdit) /***** Start frame *****/ sprintf (StrWidth,"%upx", Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50); + Gbl.CurrentCrs.Notices.ICanEdit = ICanEdit; Lay_StartRoundFrame (StrWidth, Gbl.CurrentCrs.Notices.HighlightNotCod > 0 ? Txt_All_notices : Txt_Notices, - ICanEdit ? Not_PutIconToAddNewNotice : - NULL); + Not_PutIconsNotices); if (!NumNotices) Lay_ShowAlert (Lay_INFO,Txt_No_notices); } @@ -483,6 +484,21 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,bool ICanEdit) } } +/*****************************************************************************/ +/***************** Put conteextual icons in list of notices ******************/ +/*****************************************************************************/ + +static void Not_PutIconsNotices (void) + { + /***** Put icon to add a new notice *****/ + if (Gbl.CurrentCrs.Notices.ICanEdit) + Not_PutIconToAddNewNotice (); + + /***** Put icon to show a figure *****/ + Gbl.Stat.FigureType = Sta_NOTICES; + Sta_PutIconToShowFigure (); + } + /*****************************************************************************/ /*********************** Put icon to add a new notice ************************/ /*****************************************************************************/