From 528602c19e629d94efc10d3797b531c01eae1b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 30 Apr 2017 01:20:18 +0200 Subject: [PATCH] Version 16.196 --- swad_changelog.h | 3 ++- swad_institution.c | 51 +++++++++++++++++++++++++++++++--------------- swad_text.c | 20 +++++++++--------- 3 files changed, 47 insertions(+), 27 deletions(-) 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,""); Ins_PutHeadInstitutionsForEdition (); /***** Write all the institutions *****/ @@ -1563,9 +1588,8 @@ static void Ins_ListInstitutionsForEdition (void) ""); } - /***** End table *****/ - Lay_EndRoundFrameTable (); + fprintf (Gbl.F.Out,"
"); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -2148,8 +2172,7 @@ void Ins_RemoveLogo (void) static void Ins_PutFormToCreateInstitution (void) { - extern const char *Hlp_COUNTRY_Institutions; - extern const char *Txt_New_institution_of_COUNTRY_X; + extern const char *Txt_New_institution; extern const char *Txt_Create_institution; struct Instit *Ins; @@ -2164,18 +2187,14 @@ static void Ins_PutFormToCreateInstitution (void) Lay_ShowErrorAndExit ("You can not edit institutions."); /***** Start of frame *****/ - sprintf (Gbl.Title,Txt_New_institution_of_COUNTRY_X, - Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); - Lay_StartRoundFrameTable (NULL,Gbl.Title,NULL,Hlp_COUNTRY_Institutions,2); + Lay_StartRoundFrameTable (NULL,Txt_New_institution,NULL,NULL,2); /***** Write heading *****/ Ins_PutHeadInstitutionsForEdition (); - /***** Put icon to remove institution *****/ + /***** Column to remove institution, disabled here *****/ fprintf (Gbl.F.Out,"" - ""); - Lay_PutIconRemovalNotAllowed (); - fprintf (Gbl.F.Out,""); + ""); /***** Institution code *****/ fprintf (Gbl.F.Out,""); diff --git a/swad_text.c b/swad_text.c index a21237658..5b80b8e37 100644 --- a/swad_text.c +++ b/swad_text.c @@ -23985,25 +23985,25 @@ const char *Txt_New_holiday = "Nova féria"; #endif -const char *Txt_New_institution_of_COUNTRY_X = // Warning: it is very important to include %s in the following sentences +const char *Txt_New_institution = #if L==1 - "Nova institución (universitat, institut, escola, acadèmia, organització, empresa...) de %s"; + "Nova institución (universitat, institut, escola, acadèmia, organització, empresa...)"; #elif L==2 - "Neue Hochschule (Universität, Hochschule, Schule, Hochschule, Organisation, Unternehmen...) von %s"; + "Neue Hochschule (Universität, Hochschule, Schule, Hochschule, Organisation, Unternehmen...)"; #elif L==3 - "New institution (university, college, school, academy, organization, company...) of %s"; + "New institution (university, college, school, academy, organization, company...)"; #elif L==4 - "Nueva institución (universidad, instituto, colegio, academia, organización, empresa...) de %s"; + "Nueva institución (universidad, instituto, colegio, academia, organización, empresa...)"; #elif L==5 - "Nouvel établissement (université, collège, école, académie, organisation, entreprise...) de %s"; + "Nouvel établissement (université, collège, école, académie, organisation, entreprise...)"; #elif L==6 - "Nueva institución (universidad, instituto, colegio, academia, organización, empresa...) de %s"; // Okoteve traducción + "Nueva institución (universidad, instituto, colegio, academia, organización, empresa...)"; // Okoteve traducción #elif L==7 - "Nuova istituzione (università, istituto, scuola, accademia, organizzazione, società...) di %s"; + "Nuova istituzione (università, istituto, scuola, accademia, organizzazione, società...)"; #elif L==8 - "Nowa instytucja (uniwersytet, uczelnia, szkoła, akademia, organizacja, firma...) %s"; + "Nowa instytucja (uniwersytet, uczelnia, szkoła, akademia, organizacja, firma...)"; #elif L==9 - "Nova institução (universidade, faculdade, escola, academia, organização, empresa...) de %s"; + "Nova institução (universidade, faculdade, escola, academia, organização, empresa...)"; #endif const char *Txt_New_link =