diff --git a/swad_changelog.h b/swad_changelog.h index af75421ba..90b8e53b2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -223,13 +223,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.198.1 (2017-04-30)" +#define Log_PLATFORM_VERSION "SWAD 16.198.2 (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.2: Apr 30, 2017 Changes in layout of edition of places. (218341 lines) 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) diff --git a/swad_place.c b/swad_place.c index 135501e0a..bf0a92127 100644 --- a/swad_place.c +++ b/swad_place.c @@ -60,6 +60,7 @@ extern struct Globals Gbl; static void Plc_GetParamPlcOrder (void); static void Plc_PutIconToEditPlaces (void); +static void Plc_PutIconToViewPlacesWhenEditing (void); static void Plc_ListPlacesForEdition (void); static void Plc_PutParamPlcCod (long PlcCod); @@ -238,9 +239,16 @@ static void Plc_PutIconToEditPlaces (void) void Plc_EditPlaces (void) { + extern const char *Hlp_INSTITUTION_Places_edit; + extern const char *Txt_Places; + /***** Get list of places *****/ Plc_GetListPlaces (); + /***** Start frame *****/ + Lay_StartRoundFrame (NULL,Txt_Places,Plc_PutIconToViewPlacesWhenEditing, + Hlp_INSTITUTION_Places_edit); + /***** Put a form to create a new place *****/ Plc_PutFormToCreatePlace (); @@ -248,10 +256,22 @@ void Plc_EditPlaces (void) if (Gbl.Plcs.Num) Plc_ListPlacesForEdition (); + /***** End frame *****/ + Lay_EndRoundFrame (); + /***** Free list of places *****/ Plc_FreeListPlaces (); } +/*****************************************************************************/ +/**************** Put contextual icons in edition of places *****************/ +/*****************************************************************************/ + +static void Plc_PutIconToViewPlacesWhenEditing (void) + { + Lay_PutIconToView (ActSeePlc,NULL); + } + /*****************************************************************************/ /**************************** List all the places ****************************/ /*****************************************************************************/ @@ -437,15 +457,11 @@ void Plc_FreeListPlaces (void) static void Plc_ListPlacesForEdition (void) { - extern const char *Hlp_INSTITUTION_Places_edit; - extern const char *Txt_Places; unsigned NumPlc; struct Place *Plc; - Lay_StartRoundFrameTable (NULL,Txt_Places, - NULL,Hlp_INSTITUTION_Places_edit,2); - - /***** Table head *****/ + /***** Write heading *****/ + fprintf (Gbl.F.Out,""); Plc_PutHeadPlaces (); /***** Write all the places *****/ @@ -709,37 +725,31 @@ static void Plc_UpdatePlcNameDB (long PlcCod,const char *FieldName,const char *N static void Plc_PutFormToCreatePlace (void) { - extern const char *Hlp_INSTITUTION_Places_edit; extern const char *Txt_New_place; - extern const char *Txt_Short_name; - extern const char *Txt_Full_name; extern const char *Txt_Create_place; struct Place *Plc; + /***** Place data *****/ Plc = &Gbl.Plcs.EditingPlc; /***** Start form *****/ Act_FormStart (ActNewPlc); - /***** Start of frame *****/ - Lay_StartRoundFrameTable (NULL,Txt_New_place, - NULL,Hlp_INSTITUTION_Places_edit,2); + /***** Start frame *****/ + Lay_StartRoundFrameTable (NULL,Txt_New_place,NULL,NULL,2); /***** Write heading *****/ + Plc_PutHeadPlaces (); + + /***** Column to remove place, disabled here *****/ fprintf (Gbl.F.Out,"" - "" - "" - "", - Txt_Short_name, - Txt_Full_name); + ""); + + /***** Place code *****/ + fprintf (Gbl.F.Out,""); /***** Place short name *****/ - fprintf (Gbl.F.Out,"" - "" - "", + "", Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName); + /***** Number of centres *****/ + fprintf (Gbl.F.Out,"" + ""); + /***** Send button and end frame *****/ Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_place);
" - "%s" - "" - "%s" - "
" + fprintf (Gbl.F.Out,"" "" - "
" + "0" + "