diff --git a/swad_changelog.h b/swad_changelog.h index cb398b76..af75421b 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -223,13 +223,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.198 (2017-04-30)" +#define Log_PLATFORM_VERSION "SWAD 16.198.1 (2017-04-30)" #define CSS_FILE "swad16.195.8.css" #define JS_FILE "swad16.181.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.198.1: Apr 30, 2017 Changes in layout of edition of countries. (218332 lines) Version 16.198: Apr 30, 2017 Code refactoring related to contextual icons to edit, view and print. (218361 lines) Version 16.197: Apr 30, 2017 Changes in layout of edition of degree types. (218579 lines) Version 16.196.3: Apr 30, 2017 Changes in layout of edition of courses. (218540 lines) diff --git a/swad_country.c b/swad_country.c index 955351f8..757b0b3a 100644 --- a/swad_country.c +++ b/swad_country.c @@ -76,6 +76,9 @@ static void Cty_PutIconToEditCountries (void); static unsigned Cty_GetNumUsrsWhoClaimToBelongToCty (long CtyCod); static void Cty_GetParamCtyOrder (void); + +static void Cty_PutIconToViewCountries (void); + static void Cty_GetMapAttribution (long CtyCod,char **MapAttribution); static void Cty_FreeMapAttribution (char **MapAttribution); static void Cty_ListCountriesForEdition (void); @@ -940,15 +943,16 @@ static void Cty_GetParamCtyOrder (void) void Cty_EditCountries (void) { - extern const char *Txt_No_countries_have_been_created; + extern const char *Hlp_SYSTEM_Countries; + extern const char *Txt_Countries; /***** Get list of countries *****/ Gbl.Ctys.SelectedOrder = Cty_ORDER_BY_COUNTRY; Cty_GetListCountries (Cty_GET_EXTRA_DATA); - if (!Gbl.Ctys.Num) - /***** Help message *****/ - Lay_ShowAlert (Lay_INFO,Txt_No_countries_have_been_created); + /***** Start frame *****/ + Lay_StartRoundFrame (NULL,Txt_Countries,Cty_PutIconToViewCountries, + Hlp_SYSTEM_Countries); /***** Put a form to create a new country *****/ Cty_PutFormToCreateCountry (); @@ -957,10 +961,22 @@ void Cty_EditCountries (void) if (Gbl.Ctys.Num) Cty_ListCountriesForEdition (); + /***** End frame *****/ + Lay_EndRoundFrame (); + /***** Free list of countries *****/ Cty_FreeListCountries (); } +/*****************************************************************************/ +/*************** Put contextual icons in edition of countries ****************/ +/*****************************************************************************/ + +static void Cty_PutIconToViewCountries (void) + { + Lay_PutIconToView (ActSeeCty,NULL); + } + /*****************************************************************************/ /************************** List all the countries ***************************/ /*****************************************************************************/ @@ -1511,16 +1527,13 @@ void Cty_FreeListCountries (void) static void Cty_ListCountriesForEdition (void) { - extern const char *Hlp_SYSTEM_Countries; - extern const char *Txt_Countries; extern const char *Txt_STR_LANG_NAME[1 + Txt_NUM_LANGUAGES]; unsigned NumCty; struct Country *Cty; Txt_Language_t Lan; - Lay_StartRoundFrameTable (NULL,Txt_Countries,NULL,Hlp_SYSTEM_Countries,2); - - /***** Table head *****/ + /***** Write heading *****/ + fprintf (Gbl.F.Out,"