Version 18.17.3

This commit is contained in:
Antonio Cañas Vargas 2018-11-15 10:33:45 +01:00
parent 07ed9df103
commit 2e0793108c
4 changed files with 37 additions and 17 deletions

View File

@ -88,7 +88,7 @@ static void Ctr_ShowNumUsrsInCrssOfCtr (Rol_Role_t Role);
static void Ctr_ListCentres (void); static void Ctr_ListCentres (void);
static bool Ctr_CheckIfICanCreateCentres (void); static bool Ctr_CheckIfICanCreateCentres (void);
static void Ctr_PutIconsListCentres (void); static void Ctr_PutIconsListingCentres (void);
static void Ctr_PutIconToEditCentres (void); static void Ctr_PutIconToEditCentres (void);
static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr); static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr);
static void Ctr_GetParamCtrOrder (void); static void Ctr_GetParamCtrOrder (void);
@ -795,7 +795,7 @@ static void Ctr_ListCentres (void)
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Centres_of_INSTITUTION_X, Txt_Centres_of_INSTITUTION_X,
Gbl.CurrentIns.Ins.FullName); Gbl.CurrentIns.Ins.FullName);
Box_StartBox (NULL,Gbl.Title,Ctr_PutIconsListCentres, Box_StartBox (NULL,Gbl.Title,Ctr_PutIconsListingCentres,
Hlp_INSTITUTION_Centres,Box_NOT_CLOSABLE); Hlp_INSTITUTION_Centres,Box_NOT_CLOSABLE);
if (Gbl.Ctrs.Num) // There are centres in the current institution if (Gbl.Ctrs.Num) // There are centres in the current institution
@ -842,7 +842,7 @@ static bool Ctr_CheckIfICanCreateCentres (void)
/***************** Put contextual icons in list of centres *******************/ /***************** Put contextual icons in list of centres *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Ctr_PutIconsListCentres (void) static void Ctr_PutIconsListingCentres (void)
{ {
/***** Put icon to edit centres *****/ /***** Put icon to edit centres *****/
if (Ctr_CheckIfICanCreateCentres ()) if (Ctr_CheckIfICanCreateCentres ())
@ -986,6 +986,9 @@ void Ctr_EditCentres (void)
Gbl.Ctrs.SelectedOrder = Ctr_ORDER_BY_CENTRE; Gbl.Ctrs.SelectedOrder = Ctr_ORDER_BY_CENTRE;
Ctr_GetListCentres (Gbl.CurrentIns.Ins.InsCod); Ctr_GetListCentres (Gbl.CurrentIns.Ins.InsCod);
/***** Write menu to select country and institution *****/
Hie_WriteMenuHierarchy ();
/***** Start box *****/ /***** Start box *****/
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Centres_of_INSTITUTION_X, Txt_Centres_of_INSTITUTION_X,
@ -1021,6 +1024,10 @@ static void Ctr_PutIconsEditingCentres (void)
/***** Put icon to view places *****/ /***** Put icon to view places *****/
Plc_PutIconToViewPlaces (); Plc_PutIconToViewPlaces ();
/***** Put icon to show a figure *****/
Gbl.Stat.FigureType = Sta_HIERARCHY;
Sta_PutIconToShowFigure ();
} }
void Ctr_PutIconToViewCentres (void) void Ctr_PutIconToViewCentres (void)

View File

@ -348,10 +348,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.17.2 (2018-11-15)" #define Log_PLATFORM_VERSION "SWAD 18.17.3 (2018-11-15)"
#define CSS_FILE "swad18.4.css" #define CSS_FILE "swad18.4.css"
#define JS_FILE "swad17.17.1.js" #define JS_FILE "swad17.17.1.js"
/* /*
Version 18.17.3: Nov 15, 2018 Changes in contextual icons related to centres. (236934 lines)
Version 18.17.2: Nov 15, 2018 Icon to view centres in box with info about places. (236917 lines) Version 18.17.2: Nov 15, 2018 Icon to view centres in box with info about places. (236917 lines)
Version 18.17.1: Nov 15, 2018 Icon to view places in box with info about institution. (236900 lines) Version 18.17.1: Nov 15, 2018 Icon to view places in box with info about institution. (236900 lines)
Version 18.17: Nov 14, 2018 Code refactoring related to database queries. (236899 lines) Version 18.17: Nov 14, 2018 Code refactoring related to database queries. (236899 lines)

View File

@ -75,7 +75,7 @@ static void Ins_ShowNumUsrsInCrssOfIns (Rol_Role_t Role);
static void Ins_ListInstitutions (void); static void Ins_ListInstitutions (void);
static bool Ins_CheckIfICanCreateInstitutions (void); static bool Ins_CheckIfICanCreateInstitutions (void);
static void Ins_PutIconsListInstitutions (void); static void Ins_PutIconsListingInstitutions (void);
static void Ins_PutIconToEditInstitutions (void); static void Ins_PutIconToEditInstitutions (void);
static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns); static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns);
static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable); static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable);
@ -688,7 +688,7 @@ static void Ins_ListInstitutions (void)
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Institutions_of_COUNTRY_X, Txt_Institutions_of_COUNTRY_X,
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]);
Box_StartBox (NULL,Gbl.Title,Ins_PutIconsListInstitutions, Box_StartBox (NULL,Gbl.Title,Ins_PutIconsListingInstitutions,
Hlp_COUNTRY_Institutions,Box_NOT_CLOSABLE); Hlp_COUNTRY_Institutions,Box_NOT_CLOSABLE);
if (Gbl.Inss.Num) // There are institutions in the current country if (Gbl.Inss.Num) // There are institutions in the current country
@ -734,7 +734,7 @@ static bool Ins_CheckIfICanCreateInstitutions (void)
/*************** Put contextual icons in list of institutions ****************/ /*************** Put contextual icons in list of institutions ****************/
/*****************************************************************************/ /*****************************************************************************/
static void Ins_PutIconsListInstitutions (void) static void Ins_PutIconsListingInstitutions (void)
{ {
/***** Put icon to edit institutions *****/ /***** Put icon to edit institutions *****/
if (Ins_CheckIfICanCreateInstitutions ()) if (Ins_CheckIfICanCreateInstitutions ())
@ -962,7 +962,13 @@ void Ins_EditInstitutions (void)
static void Ins_PutIconToViewInstitutions (void) static void Ins_PutIconToViewInstitutions (void)
{ {
Ico_PutContextualIconToView (ActSeeIns,NULL); //Ico_PutContextualIconToView (ActSeeIns,NULL);
extern const char *Txt_Institutions;
Lay_PutContextualLink (ActSeeIns,NULL,NULL,
"ins64x64.gif",
Txt_Institutions,NULL,
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -64,7 +64,7 @@ extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
static void Plc_GetParamPlcOrder (void); static void Plc_GetParamPlcOrder (void);
static bool Plc_CheckIfICanCreatePlaces (void);
static void Plc_PutIconsListingPlaces (void); static void Plc_PutIconsListingPlaces (void);
static void Plc_PutIconToEditPlaces (void); static void Plc_PutIconToEditPlaces (void);
static void Plc_PutIconToViewPlacesWhenEditing (void); static void Plc_PutIconToViewPlacesWhenEditing (void);
@ -111,12 +111,9 @@ void Plc_SeePlaces (void)
unsigned NumPlc; unsigned NumPlc;
unsigned NumCtrsWithPlc = 0; unsigned NumCtrsWithPlc = 0;
unsigned NumCtrsInOtherPlcs; unsigned NumCtrsInOtherPlcs;
bool ICanEdit;
if (Gbl.CurrentIns.Ins.InsCod > 0) if (Gbl.CurrentIns.Ins.InsCod > 0)
{ {
ICanEdit = (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM);
/***** Get parameter with the type of order in the list of places *****/ /***** Get parameter with the type of order in the list of places *****/
Plc_GetParamPlcOrder (); Plc_GetParamPlcOrder ();
@ -124,8 +121,7 @@ void Plc_SeePlaces (void)
Plc_GetListPlaces (); Plc_GetListPlaces ();
/***** Table head *****/ /***** Table head *****/
Box_StartBox (NULL,Txt_Places,ICanEdit ? Plc_PutIconsListingPlaces : Box_StartBox (NULL,Txt_Places,Plc_PutIconsListingPlaces,
NULL,
Hlp_INSTITUTION_Places,Box_NOT_CLOSABLE); Hlp_INSTITUTION_Places,Box_NOT_CLOSABLE);
Tbl_StartTableWideMargin (2); Tbl_StartTableWideMargin (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
@ -204,7 +200,7 @@ void Plc_SeePlaces (void)
Tbl_EndTable (); Tbl_EndTable ();
/***** Button to create place *****/ /***** Button to create place *****/
if (ICanEdit) if (Plc_CheckIfICanCreatePlaces ())
{ {
Frm_StartForm (ActEdiPlc); Frm_StartForm (ActEdiPlc);
Btn_PutConfirmButton (Txt_New_place); Btn_PutConfirmButton (Txt_New_place);
@ -233,13 +229,23 @@ static void Plc_GetParamPlcOrder (void)
} }
/*****************************************************************************/ /*****************************************************************************/
/**************** Put contextual icons in edition of centres *****************/ /********************** Check if I can create places *************************/
/*****************************************************************************/
static bool Plc_CheckIfICanCreatePlaces (void)
{
return (bool) (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM);
}
/*****************************************************************************/
/****************** Put contextual icons in list of places *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Plc_PutIconsListingPlaces (void) static void Plc_PutIconsListingPlaces (void)
{ {
/***** Put icon to edit places *****/ /***** Put icon to edit places *****/
Plc_PutIconToEditPlaces (); if (Plc_CheckIfICanCreatePlaces ())
Plc_PutIconToEditPlaces ();
/***** Put icon to view centres *****/ /***** Put icon to view centres *****/
Ctr_PutIconToViewCentres (); Ctr_PutIconToViewCentres ();