Version 16.47.5

This commit is contained in:
Antonio Cañas Vargas 2016-11-06 22:42:58 +01:00
parent 3f2eef5093
commit 11e47c3f58
2 changed files with 15 additions and 3 deletions

View File

@ -156,13 +156,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.47.4 (2016-11-06)"
#define Log_PLATFORM_VERSION "SWAD 16.47.5 (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.5: Nov 06, 2016 Code refactoring in countries. (206162 lines)
Version 16.47.4: Nov 06, 2016 Code refactoring in notices. (206153 lines)
Version 16.47.3: Nov 06, 2016 Icon in list of institutions to show figure (statistics). (206155 lines)
Version 16.47.2: Nov 06, 2016 Icon in list of countries to show figure (statistics). (206141 lines)

View File

@ -66,6 +66,8 @@ extern struct Globals Gbl;
static void Cty_Configuration (bool PrintView);
static void Cty_PutIconToPrint (void);
static bool Cty_CheckIfICanEditNotices (void);
static void Cty_PutIconsCountries (void);
static void Cty_PutIconToEditCountries (void);
@ -257,7 +259,7 @@ static void Cty_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"</div>");
/* Map attribution */
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM && !PrintView)
if (!PrintView && Cty_CheckIfICanEditNotices ())
{
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
Act_FormStart (ActChgCtyMapAtt);
@ -688,6 +690,15 @@ void Cty_ListCountries2 (void)
Cty_FreeListCountries ();
}
/*****************************************************************************/
/********************** Check if I can edit countries ************************/
/*****************************************************************************/
static bool Cty_CheckIfICanEditNotices (void)
{
return (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
}
/*****************************************************************************/
/***************** Put contextual icons in list of countries *****************/
/*****************************************************************************/
@ -695,7 +706,7 @@ void Cty_ListCountries2 (void)
static void Cty_PutIconsCountries (void)
{
/***** Put icon to edit countries *****/
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
if (Cty_CheckIfICanEditNotices ())
Cty_PutIconToEditCountries ();
/***** Put icon to show a figure *****/