diff --git a/swad_changelog.h b/swad_changelog.h index 323efd3e..b9953221 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -348,11 +348,12 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.17.5 (2018-11-15)" +#define Log_PLATFORM_VERSION "SWAD 18.17.6 (2018-11-15)" #define CSS_FILE "swad18.4.css" #define JS_FILE "swad17.17.1.js" /* - Version 18.17.5: Nov 15, 2018 Changes in contextual icons related to institutions. (? lines) + Version 18.17.6: Nov 15, 2018 Changes in contextual icons related to degrees. (236972 lines) + Version 18.17.5: Nov 15, 2018 Changes in contextual icons related to institutions. (236951 lines) Version 18.17.4: Nov 15, 2018 Changes in contextual icons related to places. (236936 lines) 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) diff --git a/swad_degree.c b/swad_degree.c index bd89d2ea..592dcd7d 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -101,12 +101,11 @@ static void Deg_CreateDegree (unsigned Status); static void Deg_ListDegrees (void); static bool Deg_CheckIfICanCreateDegrees (void); -static void Deg_PutIconsListDegrees (void); +static void Deg_PutIconsListingDegrees (void); static void Deg_PutIconToEditDegrees (void); static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg); static void Deg_PutIconsEditingDegrees (void); -static void Deg_PutIconToViewDegrees (void); static void Deg_RecFormRequestOrCreateDeg (unsigned Status); static void Deg_PutParamOtherDegCod (long DegCod); @@ -1183,8 +1182,8 @@ static void Deg_ListDegrees (void) /***** Start box *****/ snprintf (Gbl.Title,sizeof (Gbl.Title), Txt_Degrees_of_CENTRE_X, - Gbl.CurrentCtr.Ctr.ShrtName); - Box_StartBox (NULL,Gbl.Title,Deg_PutIconsListDegrees, + Gbl.CurrentCtr.Ctr.FullName); + Box_StartBox (NULL,Gbl.Title,Deg_PutIconsListingDegrees, Hlp_CENTRE_Degrees,Box_NOT_CLOSABLE); if (Gbl.CurrentCtr.Ctr.Degs.Num) // There are degrees in the current centre @@ -1231,7 +1230,7 @@ static bool Deg_CheckIfICanCreateDegrees (void) /***************** Put contextual icons in list of degrees *******************/ /*****************************************************************************/ -static void Deg_PutIconsListDegrees (void) +static void Deg_PutIconsListingDegrees (void) { /***** Put icon to edit degrees *****/ if (Deg_CheckIfICanCreateDegrees ()) @@ -1360,6 +1359,9 @@ void Deg_EditDegrees (void) /***** Get list of degree types *****/ DT_GetListDegreeTypes (Sco_SCOPE_SYS,DT_ORDER_BY_DEGREE_TYPE); + /***** Write menu to select country, institution and centre *****/ + Hie_WriteMenuHierarchy (); + /***** Start box *****/ snprintf (Gbl.Title,sizeof (Gbl.Title), Txt_Degrees_of_CENTRE_X, @@ -1407,11 +1409,20 @@ static void Deg_PutIconsEditingDegrees (void) /***** Put icon to view types of degree *****/ DT_PutIconToViewDegreeTypes (); + + /***** Put icon to show a figure *****/ + Gbl.Stat.FigureType = Sta_HIERARCHY; + Sta_PutIconToShowFigure (); } -static void Deg_PutIconToViewDegrees (void) +void Deg_PutIconToViewDegrees (void) { - Ico_PutContextualIconToView (ActSeeDeg,NULL); + extern const char *Txt_Degrees; + + Lay_PutContextualLink (ActSeeDeg,NULL,NULL, + "deg64x64.gif", + Txt_Degrees,NULL, + NULL); } /*****************************************************************************/ diff --git a/swad_degree.h b/swad_degree.h index ec9fe1d8..5e7b8a5f 100644 --- a/swad_degree.h +++ b/swad_degree.h @@ -105,6 +105,8 @@ unsigned Deg_ConvStrToYear (const char *StrYear); void Deg_EditDegrees (void); +void Deg_PutIconToViewDegrees (void); + void Deg_GetListAllDegsWithStds (struct ListDegrees *Degs); void Deg_GetListDegsOfCurrentCtr (void); void Deg_FreeListDegs (struct ListDegrees *Degs); diff --git a/swad_degree_type.c b/swad_degree_type.c index 33803034..106aab51 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -66,15 +66,16 @@ extern struct Globals Gbl; /**************************** Private prototypes *****************************/ /*****************************************************************************/ -static void DT_PutIconToViewDegreeTypesWhenEditing (void); - static void DT_SeeDegreeTypes (Act_Action_t NextAction,Sco_Scope_t Scope, DT_Order_t DefaultOrder); static DT_Order_t DT_GetParamDegTypOrder (DT_Order_t DefaultOrder); static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder); + +static void DT_PutIconsEditingDegreeTypes (void); + static void DT_ListDegreeTypesForSeeing (void); -static void DT_PutIconsListDegTypes (void); +static void DT_PutIconsListingDegTypes (void); static void DT_PutIconToEditDegTypes (void); static void DT_ListDegreeTypesForEdition (void); @@ -127,25 +128,6 @@ void DT_WriteSelectorDegreeTypes (void) DT_FreeListDegreeTypes (); } -/*****************************************************************************/ -/******************* Put link (form) to view degree types ********************/ -/*****************************************************************************/ - -void DT_PutIconToViewDegreeTypes (void) - { - extern const char *Txt_Types_of_degree; - - Lay_PutContextualLink (ActSeeDegTyp,NULL,NULL, - "hierarchy64x64.png", - Txt_Types_of_degree,NULL, - NULL); - } - -static void DT_PutIconToViewDegreeTypesWhenEditing (void) - { - Ico_PutContextualIconToView (ActSeeDegTyp,NULL); - } - /*****************************************************************************/ /***************************** Show degree types *****************************/ /*****************************************************************************/ @@ -212,7 +194,7 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction,DT_Order_t SelectedOrder switch (NextAction) { case ActSeeDegTyp: - Box_StartBox (NULL,Txt_Types_of_degree,DT_PutIconsListDegTypes, + Box_StartBox (NULL,Txt_Types_of_degree,DT_PutIconsListingDegTypes, Hlp_CENTRE_DegreeTypes,Box_NOT_CLOSABLE); break; case ActSeeUseGbl: @@ -264,7 +246,7 @@ void DT_EditDegreeTypes (void) DT_GetListDegreeTypes (Sco_SCOPE_SYS,DT_ORDER_BY_DEGREE_TYPE); /***** Start box *****/ - Box_StartBox (NULL,Txt_Types_of_degree,DT_PutIconToViewDegreeTypesWhenEditing, + Box_StartBox (NULL,Txt_Types_of_degree,DT_PutIconsEditingDegreeTypes, Hlp_CENTRE_DegreeTypes_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new degree type *****/ @@ -281,6 +263,37 @@ void DT_EditDegreeTypes (void) DT_FreeListDegreeTypes (); } +/*****************************************************************************/ +/************ Put contextual icons when editing degree types *****************/ +/*****************************************************************************/ + +static void DT_PutIconsEditingDegreeTypes (void) + { + /***** Put icon to viee degree types *****/ + DT_PutIconToViewDegreeTypes (); + + /***** Put icon to view degrees *****/ + Deg_PutIconToViewDegrees (); + + /***** Put icon to show a figure *****/ + Gbl.Stat.FigureType = Sta_DEGREE_TYPES; + Sta_PutIconToShowFigure (); + } + +/*****************************************************************************/ +/******************* Put link (form) to view degree types ********************/ +/*****************************************************************************/ + +void DT_PutIconToViewDegreeTypes (void) + { + extern const char *Txt_Types_of_degree; + + Lay_PutContextualLink (ActSeeDegTyp,NULL,NULL, + "hierarchy64x64.png", + Txt_Types_of_degree,NULL, + NULL); + } + /*****************************************************************************/ /******************* List current degree types for seeing ********************/ /*****************************************************************************/ @@ -327,11 +340,14 @@ static void DT_ListDegreeTypesForSeeing (void) /************** Put contextual icons in list of degree types *****************/ /*****************************************************************************/ -static void DT_PutIconsListDegTypes (void) +static void DT_PutIconsListingDegTypes (void) { /***** Put icon to edit degree types *****/ DT_PutIconToEditDegTypes (); + /***** Put icon to view degrees *****/ + Deg_PutIconToViewDegrees (); + /***** Put icon to show a figure *****/ Gbl.Stat.FigureType = Sta_DEGREE_TYPES; Sta_PutIconToShowFigure (); diff --git a/swad_degree_type.h b/swad_degree_type.h index c62f136a..12021ef9 100644 --- a/swad_degree_type.h +++ b/swad_degree_type.h @@ -60,10 +60,12 @@ typedef enum void DT_WriteSelectorDegreeTypes (void); -void DT_PutIconToViewDegreeTypes (void); void DT_SeeDegreeTypesInDegTab (void); void DT_SeeDegreeTypesInStaTab (void); void DT_EditDegreeTypes (void); + +void DT_PutIconToViewDegreeTypes (void); + bool DT_CheckIfICanCreateDegreeTypes (void); void DT_PutFormToCreateDegreeType (void);