Version 16.196.1

This commit is contained in:
Antonio Cañas Vargas 2017-04-30 02:35:25 +02:00
parent 528602c19e
commit 8952098df7
4 changed files with 62 additions and 42 deletions

View File

@ -86,6 +86,10 @@ static void Ctr_PutIconsListCentres (void);
static void Ctr_PutIconToEditCentres (void);
static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr);
static void Ctr_GetParamCtrOrder (void);
static void Ctr_PutIconsEditingCentres (void);
static void Ctr_PutIconToViewCentres (void);
static void Ctr_GetPhotoAttribution (long CtrCod,char **PhotoAttribution);
static void Ctr_FreePhotoAttribution (char **PhotoAttribution);
static void Ctr_ListCentresForEdition (void);
@ -938,12 +942,20 @@ static void Ctr_GetParamCtrOrder (void)
void Ctr_EditCentres (void)
{
extern const char *Hlp_INSTITUTION_Centres;
extern const char *Txt_Centres_of_INSTITUTION_X;
/***** Get list of places *****/
Plc_GetListPlaces ();
/***** Get list of centres *****/
Ctr_GetListCentres (Gbl.CurrentIns.Ins.InsCod);
sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X,
Gbl.CurrentIns.Ins.FullName);
Lay_StartRoundFrame (NULL,Gbl.Title,Ctr_PutIconsEditingCentres,
Hlp_INSTITUTION_Centres);
/***** Put a form to create a new centre *****/
Ctr_PutFormToCreateCentre ();
@ -951,6 +963,9 @@ void Ctr_EditCentres (void)
if (Gbl.Ctrs.Num)
Ctr_ListCentresForEdition ();
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free list of centres *****/
Ctr_FreeListCentres ();
@ -958,6 +973,30 @@ void Ctr_EditCentres (void)
Plc_FreeListPlaces ();
}
/*****************************************************************************/
/**************** Put contextual icons in edition of centres *****************/
/*****************************************************************************/
static void Ctr_PutIconsEditingCentres (void)
{
/***** Put icon to view centres *****/
Ctr_PutIconToViewCentres ();
/***** Put icon to view places *****/
Plc_PutIconToViewPlaces ();
}
static void Ctr_PutIconToViewCentres (void)
{
extern const char *Txt_View;
/***** Put form to create a new type of group *****/
Lay_PutContextualLink (ActSeeCtr,NULL,NULL,
"eye-on64x64.png",
Txt_View,NULL,
NULL);
}
/*****************************************************************************/
/***** Get a list with all the centres or with those of an institution *******/
/*****************************************************************************/
@ -1375,8 +1414,6 @@ void Ctr_WriteSelectorOfCentre (void)
static void Ctr_ListCentresForEdition (void)
{
extern const char *Hlp_INSTITUTION_Centres;
extern const char *Txt_Centres_of_INSTITUTION_X;
extern const char *Txt_Another_place;
extern const char *Txt_CENTRE_STATUS[Ctr_NUM_STATUS_TXT];
unsigned NumCtr;
@ -1391,10 +1428,7 @@ static void Ctr_ListCentresForEdition (void)
Usr_UsrDataConstructor (&UsrDat);
/***** Write heading *****/
sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X,
Gbl.CurrentIns.Ins.FullName);
Lay_StartRoundFrameTable (NULL,Gbl.Title,Plc_PutIconToViewPlaces,
Hlp_INSTITUTION_Centres,2);
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE CELLS_PAD_2\">");
Ctr_PutHeadCentresForEdition ();
/***** Write all the centres *****/
@ -2401,8 +2435,7 @@ void Ctr_ChangeCtrPhotoAttribution (void)
static void Ctr_PutFormToCreateCentre (void)
{
extern const char *Hlp_INSTITUTION_Centres;
extern const char *Txt_New_centre_of_INSTITUTION_X;
extern const char *Txt_New_centre;
extern const char *Txt_Another_place;
extern const char *Txt_Create_centre;
struct Centre *Ctr;
@ -2410,12 +2443,6 @@ static void Ctr_PutFormToCreateCentre (void)
Ctr = &Gbl.Ctrs.EditingCtr;
/***** Start frame *****/
sprintf (Gbl.Title,Txt_New_centre_of_INSTITUTION_X,
Gbl.CurrentIns.Ins.ShrtName);
Lay_StartRoundFrame (NULL,Gbl.Title,Plc_PutIconToViewPlaces,
Hlp_INSTITUTION_Centres);
/***** Start form *****/
if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
Act_FormStart (ActNewCtr);
@ -2424,17 +2451,15 @@ static void Ctr_PutFormToCreateCentre (void)
else
Lay_ShowErrorAndExit ("You can not edit centres.");
/***** Start table *****/
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_WIDE_MARGIN CELLS_PAD_2\">");
/***** Start frame *****/
Lay_StartRoundFrameTable (NULL,Txt_New_centre,NULL,NULL,2);
/***** Table head *****/
/***** Write heading *****/
Ctr_PutHeadCentresForEdition ();
/***** Put disabled icon to remove centre *****/
/***** Column to remove institution, disabled here *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BM\">");
Lay_PutIconRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>");
"<td class=\"BM\"></td>");
/***** Centre code *****/
fprintf (Gbl.F.Out,"<td class=\"CODE\"></td>");
@ -2518,17 +2543,11 @@ static void Ctr_PutFormToCreateCentre (void)
"</td>"
"</tr>");
/***** End table *****/
fprintf (Gbl.F.Out,"</table>");
/***** Button to send form *****/
Lay_PutCreateButton (Txt_Create_centre);
/***** Send button and end of frame *****/
Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_centre);
/***** End form *****/
Act_FormEnd ();
/***** End frame *****/
Lay_EndRoundFrame ();
}
/*****************************************************************************/

View File

@ -223,13 +223,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.196 (2017-04-30)"
#define Log_PLATFORM_VERSION "SWAD 16.196.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.196.1: Apr 30, 2017 Changes in layout of edition of centres. (218538 lines)
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)

View File

@ -2186,7 +2186,7 @@ static void Ins_PutFormToCreateInstitution (void)
else
Lay_ShowErrorAndExit ("You can not edit institutions.");
/***** Start of frame *****/
/***** Start frame *****/
Lay_StartRoundFrameTable (NULL,Txt_New_institution,NULL,NULL,2);
/***** Write heading *****/
@ -2263,7 +2263,7 @@ static void Ins_PutFormToCreateInstitution (void)
/***** Send button and end of frame *****/
Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_institution);
/***** End of form *****/
/***** End form *****/
Act_FormEnd ();
}

View File

@ -23754,25 +23754,25 @@ const char *Txt_New_banner =
"Novo banner";
#endif
const char *Txt_New_centre_of_INSTITUTION_X = // Warning: it is very important to include %s in the following sentences
const char *Txt_New_centre =
#if L==1
"Nou centre (facultat, escola, institut, divisi&oacute;, edifici...) de %s";
"Nou centre (facultat, escola, institut, divisi&oacute;, edifici...)";
#elif L==2
"Neues Lehrinstitut (Fakult&auml;t, Schule, Hochschule, Abteilung, Geb&auml;ude...) von %s";
"Neues Lehrinstitut (Fakult&auml;t, Schule, Hochschule, Abteilung, Geb&auml;ude...)";
#elif L==3
"New centre (faculty, school, college, division, building...) of %s";
"New centre (faculty, school, college, division, building...)";
#elif L==4
"Nuevo centro (facultad, escuela, instituto, divisi&oacute;n, edificio...) de %s";
"Nuevo centro (facultad, escuela, instituto, divisi&oacute;n, edificio...)";
#elif L==5
"Nouveau centre (facult&eacute;, &eacute;cole, universit&eacute;, division, b&acirc;timent...) de %s";
"Nouveau centre (facult&eacute;, &eacute;cole, universit&eacute;, division, b&acirc;timent...)";
#elif L==6
"Nuevo centro (facultad, escuela, instituto, divisi&oacute;n, edificio...) de %s"; // Okoteve traducción
"Nuevo centro (facultad, escuela, instituto, divisi&oacute;n, edificio...)"; // Okoteve traducción
#elif L==7
"Nuovo centro (facolt&agrave;, scuola, istituto, divisione, costruzione...) di %s";
"Nuovo centro (facolt&agrave;, scuola, istituto, divisione, costruzione...)";
#elif L==8
"Nowe centrum (wydzia&lstrok;, szko&lstrok;a, uczelnia, podzia&lstrok;, budowa...) %s";
"Nowe centrum (wydzia&lstrok;, szko&lstrok;a, uczelnia, podzia&lstrok;, budowa...)";
#elif L==9
"Novo centro (faculdade, escola, faculdade, divis&atilde;o, constru&ccedil;&atilde;o...) de %s";
"Novo centro (faculdade, escola, faculdade, divis&atilde;o, constru&ccedil;&atilde;o...)";
#endif
const char *Txt_New_country =