diff --git a/swad_calendar.c b/swad_calendar.c index 6b89b1370..0ec9d48e6 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -298,16 +298,6 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, Hld_GetListHolidays (); } - /***** Link to view / edit holidays *****/ - if (ActionSeeCalendar == ActSeeCalIns && // Only for institutions - !PrintView) // Not print view - { - if (Gbl.Hlds.Num) // There are holidays - Hld_PutLinkToHolidays (); - else if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Institution admin or system admin - Hld_PutLinkToCreateHoliday (); - } - /***** Start frame *****/ Lay_StartRoundFrame (NULL,NULL, FunctionToDrawContextualIcons, @@ -358,6 +348,7 @@ static void Cal_PutIconToPrintCalendarSys (void) { extern const char *Txt_Print; + /* Print calendar */ Lay_PutContextualLink (ActPrnCalSys,NULL, "print64x64.png", Txt_Print,NULL, @@ -368,6 +359,7 @@ static void Cal_PutIconToPrintCalendarCty (void) { extern const char *Txt_Print; + /* Print calendar */ Lay_PutContextualLink (ActPrnCalCty,NULL, "print64x64.png", Txt_Print,NULL, @@ -377,17 +369,32 @@ static void Cal_PutIconToPrintCalendarCty (void) static void Cal_PutIconToPrintCalendarIns (void) { extern const char *Txt_Print; + extern const char *Txt_Holidays; + /* Print calendar */ Lay_PutContextualLink (ActPrnCalIns,NULL, "print64x64.png", Txt_Print,NULL, NULL); + + /* View / edit holidays */ + if (Gbl.Hlds.Num) // There are holidays + Lay_PutContextualLink (ActSeeHld,NULL, + "holiday64x64.png", + Txt_Holidays,NULL, + NULL); + else if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Institution admin or system admin + Lay_PutContextualLink (ActEdiHld,NULL, + "holiday64x64.png", + Txt_Holidays,NULL, + NULL); } static void Cal_PutIconToPrintCalendarCtr (void) { extern const char *Txt_Print; + /* Print calendar */ Lay_PutContextualLink (ActPrnCalCtr,NULL, "print64x64.png", Txt_Print,NULL, @@ -398,6 +405,7 @@ static void Cal_PutIconToPrintCalendarDeg (void) { extern const char *Txt_Print; + /* Print calendar */ Lay_PutContextualLink (ActPrnCalDeg,NULL, "print64x64.png", Txt_Print,NULL, @@ -408,6 +416,7 @@ static void Cal_PutIconToPrintCalendarCrs (void) { extern const char *Txt_Print; + /* Print calendar */ Lay_PutContextualLink (ActPrnCalCrs,NULL, "print64x64.png", Txt_Print,NULL, diff --git a/swad_changelog.h b/swad_changelog.h index c87cfc912..dc2a68dc3 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -209,13 +209,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.167.1 (2017-03-24)" +#define Log_PLATFORM_VERSION "SWAD 16.167.2 (2017-03-24)" #define CSS_FILE "swad16.166.css" #define JS_FILE "swad16.144.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.167.2: Mar 25, 2017 Contextual link to holidays is changed to a left-top contextual icon. (217577 lines) Version 16.167.1: Mar 25, 2017 Changes in icons related to calendar and holidays. (217595 lines) Copy the following icons to icon public directory: sudo cp -a icon/iconset/awesome/action64x64/calendar64x64.png /var/www/html/swad/icon/iconset/awesome/action64x64/ diff --git a/swad_holiday.c b/swad_holiday.c index 9cecf736d..2102c053d 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -71,38 +71,6 @@ static void Hld_PutFormToCreateHoliday (void); static void Hld_PutHeadHolidays (void); static void Hld_CreateHoliday (struct Holiday *Hld); -/*****************************************************************************/ -/************************ Put a link to view holidays ************************/ -/*****************************************************************************/ - -void Hld_PutLinkToHolidays (void) - { - extern const char *Txt_Holidays; - - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActSeeHld,NULL, - "holiday64x64.png", - Txt_Holidays,Txt_Holidays, - NULL); - fprintf (Gbl.F.Out,"
"); - } - -/*****************************************************************************/ -/********************* Put a link to create a holiday ************************/ -/*****************************************************************************/ - -void Hld_PutLinkToCreateHoliday (void) - { - extern const char *Txt_Create_holiday; - - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiHld,NULL, - "edit64x64.png", - Txt_Create_holiday,Txt_Create_holiday, - NULL); - fprintf (Gbl.F.Out,"
"); - } - /*****************************************************************************/ /*************************** List all the holidays ***************************/ /*****************************************************************************/ diff --git a/swad_holiday.h b/swad_holiday.h index cac65f5ed..b18e2fb01 100644 --- a/swad_holiday.h +++ b/swad_holiday.h @@ -74,9 +74,6 @@ typedef enum /***************************** Public prototypes *****************************/ /*****************************************************************************/ -void Hld_PutLinkToHolidays (void); -void Hld_PutLinkToCreateHoliday (void); - void Hld_SeeHolidays (void); void Hld_EditHolidays (void); void Hld_GetListHolidays (void);