diff --git a/swad_changelog.h b/swad_changelog.h index bfe2624cc..2ba7ac1b5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -223,13 +223,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.195.8 (2017-04-29)" +#define Log_PLATFORM_VERSION "SWAD 16.196 (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.196: Apr 30, 2017 Changes in layout of edition of institutions. (218525 lines) Version 16.195.8: Apr 29, 2017 Changes in layout of file browser. (218511 lines) Version 16.195.7: Apr 29, 2017 Fixed bug in tabs. (218511 lines) Version 16.195.6: Apr 29, 2017 Code refactoring in edition of groups. (218507 lines) diff --git a/swad_institution.c b/swad_institution.c index 754890cda..c01d9d550 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -75,6 +75,8 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns) static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable); static void Ins_GetParamInsOrder (void); +static void Ins_PutIconToViewInstitutions (void); + static void Ins_GetFullNameAndCtyOfInstitutionByCod (struct Instit *Ins, char CtyName[Hie_MAX_BYTES_FULL_NAME + 1]); @@ -924,9 +926,18 @@ static void Ins_GetParamInsOrder (void) void Ins_EditInstitutions (void) { + extern const char *Hlp_COUNTRY_Institutions; + extern const char *Txt_Institutions_of_COUNTRY_X; + /***** Get list of institutions *****/ Ins_GetListInstitutions (Gbl.CurrentCty.Cty.CtyCod,Ins_GET_EXTRA_DATA); + /***** Start frame *****/ + sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X, + Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); + Lay_StartRoundFrame (NULL,Gbl.Title,Ins_PutIconToViewInstitutions, + Hlp_COUNTRY_Institutions); + /***** Put a form to create a new institution *****/ Ins_PutFormToCreateInstitution (); @@ -934,10 +945,28 @@ void Ins_EditInstitutions (void) if (Gbl.Inss.Num) Ins_ListInstitutionsForEdition (); + /***** End frame *****/ + Lay_EndRoundFrame (); + /***** Free list of institutions *****/ Ins_FreeListInstitutions (); } +/*****************************************************************************/ +/***************** Put contextual icon to view institutions ******************/ +/*****************************************************************************/ + +static void Ins_PutIconToViewInstitutions (void) + { + extern const char *Txt_View; + + /***** Put form to create a new type of group *****/ + Lay_PutContextualLink (ActSeeIns,NULL,NULL, + "eye-on64x64.png", + Txt_View,NULL, + NULL); + } + /*****************************************************************************/ /********************** Get list of current institutions *********************/ /*****************************************************************************/ @@ -1383,8 +1412,6 @@ void Ins_WriteSelectorOfInstitution (void) static void Ins_ListInstitutionsForEdition (void) { - extern const char *Hlp_COUNTRY_Institutions; - extern const char *Txt_Institutions_of_COUNTRY_X; extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT]; unsigned NumIns; struct Instit *Ins; @@ -1397,9 +1424,7 @@ static void Ins_ListInstitutionsForEdition (void) Usr_UsrDataConstructor (&UsrDat); /***** Write heading *****/ - sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X, - Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); - Lay_StartRoundFrameTable (NULL,Gbl.Title,NULL,Hlp_COUNTRY_Institutions,2); + fprintf (Gbl.F.Out,"