2015-01-04 14:43:03 +01:00
|
|
|
|
// swad_calendar.c: Draw month and calendar
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
SWAD (Shared Workspace At a Distance),
|
|
|
|
|
is a web platform developed at the University of Granada (Spain),
|
|
|
|
|
and used to support university teaching.
|
|
|
|
|
|
|
|
|
|
This file is part of SWAD core.
|
2021-02-09 12:43:45 +01:00
|
|
|
|
Copyright (C) 1999-2021 Antonio Ca<EFBFBD>as Vargas
|
2015-01-04 14:43:03 +01:00
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Affero General Public License as
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/********************************* Headers ***********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include <string.h> // For string functions
|
|
|
|
|
|
2017-06-10 21:38:10 +02:00
|
|
|
|
#include "swad_box.h"
|
2015-11-21 20:23:28 +01:00
|
|
|
|
#include "swad_calendar.h"
|
|
|
|
|
#include "swad_database.h"
|
2020-04-20 01:26:46 +02:00
|
|
|
|
#include "swad_exam_announcement.h"
|
2020-04-14 17:15:17 +02:00
|
|
|
|
#include "swad_figure.h"
|
2018-11-09 20:47:39 +01:00
|
|
|
|
#include "swad_form.h"
|
2015-01-04 14:43:03 +01:00
|
|
|
|
#include "swad_global.h"
|
2020-04-14 17:15:17 +02:00
|
|
|
|
#include "swad_holiday.h"
|
2019-10-23 20:07:56 +02:00
|
|
|
|
#include "swad_HTML.h"
|
2015-11-21 20:23:28 +01:00
|
|
|
|
#include "swad_parameter.h"
|
2019-03-26 11:53:21 +01:00
|
|
|
|
#include "swad_setting.h"
|
2015-01-04 14:43:03 +01:00
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************** External global variables from others modules ****************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
extern struct Globals Gbl;
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2019-11-21 00:40:35 +01:00
|
|
|
|
/***************************** Public constants ******************************/
|
2015-01-04 14:43:03 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2015-11-21 20:23:28 +01:00
|
|
|
|
const bool Cal_DayIsValidAsFirstDayOfWeek[7] =
|
|
|
|
|
{
|
2019-11-21 00:40:35 +01:00
|
|
|
|
[0] = true, // monday
|
|
|
|
|
[1] = false, // tuesday
|
|
|
|
|
[2] = false, // wednesday
|
|
|
|
|
[3] = false, // thursday
|
|
|
|
|
[4] = false, // friday
|
|
|
|
|
[5] = false, // saturday
|
|
|
|
|
[6] = true, // sunday
|
2015-11-21 20:23:28 +01:00
|
|
|
|
};
|
|
|
|
|
|
2015-01-04 14:43:03 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Private prototypes ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-04-08 03:41:05 +02:00
|
|
|
|
static void Cal_PutIconsFirstDayOfWeek (__attribute__((unused)) void *Args);
|
2015-11-22 00:40:23 +01:00
|
|
|
|
|
2015-11-21 20:23:28 +01:00
|
|
|
|
static unsigned Cal_GetParamFirstDayOfWeek (void);
|
|
|
|
|
|
2017-02-09 03:09:24 +01:00
|
|
|
|
static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
|
|
|
|
Act_Action_t ActionChangeCalendar1stDay,
|
2020-03-26 02:54:30 +01:00
|
|
|
|
void (*FunctionToDrawContextualIcons) (void *Args),void *Args,
|
2017-02-09 03:09:24 +01:00
|
|
|
|
bool PrintView);
|
2020-04-08 13:40:21 +02:00
|
|
|
|
static void Cal_PutIconsCalendar (__attribute__((unused)) void *Args);
|
2016-03-18 21:40:26 +01:00
|
|
|
|
|
2015-11-21 20:23:28 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************** Put icons to select the first day of the week ****************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void Cal_PutIconsToSelectFirstDayOfWeek (void)
|
|
|
|
|
{
|
2019-03-26 11:53:21 +01:00
|
|
|
|
extern const char *Hlp_PROFILE_Settings_calendar;
|
2015-11-21 20:23:28 +01:00
|
|
|
|
extern const char *Txt_Calendar;
|
2015-11-22 00:40:23 +01:00
|
|
|
|
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Box_BoxBegin (NULL,Txt_Calendar,
|
2020-04-08 03:41:05 +02:00
|
|
|
|
Cal_PutIconsFirstDayOfWeek,NULL,
|
2019-03-26 11:53:21 +01:00
|
|
|
|
Hlp_PROFILE_Settings_calendar,Box_NOT_CLOSABLE);
|
|
|
|
|
Set_StartSettingsHead ();
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,
|
|
|
|
|
NULL,NULL);
|
2019-03-26 11:53:21 +01:00
|
|
|
|
Set_EndSettingsHead ();
|
2019-10-25 22:48:34 +02:00
|
|
|
|
Box_BoxEnd ();
|
2015-11-22 00:40:23 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2019-03-26 11:53:21 +01:00
|
|
|
|
/************ Put contextual icons in first-day-of-week setting **************/
|
2015-11-22 00:40:23 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-04-08 03:41:05 +02:00
|
|
|
|
static void Cal_PutIconsFirstDayOfWeek (__attribute__((unused)) void *Args)
|
2015-11-22 00:40:23 +01:00
|
|
|
|
{
|
2020-04-08 03:41:05 +02:00
|
|
|
|
/***** Put icon to show a figure *****/
|
|
|
|
|
Fig_PutIconToShowFigure (Fig_FIRST_DAY_OF_WEEK);
|
2015-11-22 00:40:23 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2016-11-07 12:48:40 +01:00
|
|
|
|
/************** Show form to select the first day of the week ****************/
|
2015-11-22 00:40:23 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-03-26 02:54:30 +01:00
|
|
|
|
void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,
|
|
|
|
|
void (*FuncParams) (void *Args),void *Args)
|
2015-11-22 00:40:23 +01:00
|
|
|
|
{
|
2019-12-30 18:49:52 +01:00
|
|
|
|
extern const char *Txt_First_day_of_the_week_X;
|
2015-11-21 20:23:28 +01:00
|
|
|
|
extern const char *Txt_DAYS_SMALL[7];
|
|
|
|
|
unsigned FirstDayOfWeek;
|
2019-01-12 03:00:59 +01:00
|
|
|
|
char Icon[32 + 1];
|
2015-11-21 20:23:28 +01:00
|
|
|
|
|
2019-03-26 11:53:21 +01:00
|
|
|
|
Set_StartOneSettingSelector ();
|
2015-11-21 20:23:28 +01:00
|
|
|
|
for (FirstDayOfWeek = 0; // Monday
|
|
|
|
|
FirstDayOfWeek <= 6; // Sunday
|
|
|
|
|
FirstDayOfWeek++)
|
|
|
|
|
if (Cal_DayIsValidAsFirstDayOfWeek[FirstDayOfWeek])
|
|
|
|
|
{
|
2019-10-23 21:37:01 +02:00
|
|
|
|
HTM_DIV_Begin ("class=\"%s\"",
|
|
|
|
|
FirstDayOfWeek == Gbl.Prefs.FirstDayOfWeek ? "PREF_ON" :
|
|
|
|
|
"PREF_OFF");
|
2018-11-09 20:47:39 +01:00
|
|
|
|
Frm_StartForm (Action);
|
2019-11-03 13:19:32 +01:00
|
|
|
|
Par_PutHiddenParamUnsigned (NULL,"FirstDayOfWeek",FirstDayOfWeek);
|
2016-12-04 12:42:45 +01:00
|
|
|
|
if (FuncParams) // Extra parameters depending on the action
|
2020-03-26 02:54:30 +01:00
|
|
|
|
FuncParams (Args);
|
2019-01-12 03:00:59 +01:00
|
|
|
|
snprintf (Icon,sizeof (Icon),
|
|
|
|
|
"first-day-of-week-%u.png",
|
|
|
|
|
FirstDayOfWeek);
|
2019-12-30 18:49:52 +01:00
|
|
|
|
Ico_PutSettingIconLink (Icon,
|
2019-12-30 21:47:07 +01:00
|
|
|
|
Str_BuildStringStr (Txt_First_day_of_the_week_X,
|
|
|
|
|
Txt_DAYS_SMALL[FirstDayOfWeek]));
|
|
|
|
|
Str_FreeString ();
|
2018-11-09 20:47:39 +01:00
|
|
|
|
Frm_EndForm ();
|
2019-10-23 20:07:56 +02:00
|
|
|
|
HTM_DIV_End ();
|
2015-11-21 20:23:28 +01:00
|
|
|
|
}
|
2019-03-26 11:53:21 +01:00
|
|
|
|
Set_EndOneSettingSelector ();
|
2015-11-21 20:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************************* Change first day of week **************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void Cal_ChangeFirstDayOfWeek (void)
|
|
|
|
|
{
|
|
|
|
|
/***** Get param with icon set *****/
|
|
|
|
|
Gbl.Prefs.FirstDayOfWeek = Cal_GetParamFirstDayOfWeek ();
|
|
|
|
|
|
2017-05-04 02:19:23 +02:00
|
|
|
|
/***** Store icon first day of week database *****/
|
2015-11-21 20:23:28 +01:00
|
|
|
|
if (Gbl.Usrs.Me.Logged)
|
2019-03-26 11:53:21 +01:00
|
|
|
|
DB_QueryUPDATE ("can not update your setting about first day of week",
|
2018-11-03 12:16:40 +01:00
|
|
|
|
"UPDATE usr_data SET FirstDayOfWeek=%u"
|
|
|
|
|
" WHERE UsrCod=%ld",
|
|
|
|
|
Gbl.Prefs.FirstDayOfWeek,
|
|
|
|
|
Gbl.Usrs.Me.UsrDat.UsrCod);
|
2015-11-21 20:23:28 +01:00
|
|
|
|
|
2019-03-26 11:53:21 +01:00
|
|
|
|
/***** Set settings from current IP *****/
|
|
|
|
|
Set_SetSettingsFromIP ();
|
2015-11-21 20:23:28 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/*********************** Get parameter with icon set *************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static unsigned Cal_GetParamFirstDayOfWeek (void)
|
|
|
|
|
{
|
2017-01-29 12:42:19 +01:00
|
|
|
|
unsigned FirstDayOfWeek;
|
2015-11-21 20:23:28 +01:00
|
|
|
|
|
2017-01-29 21:41:08 +01:00
|
|
|
|
FirstDayOfWeek = (unsigned)
|
|
|
|
|
Par_GetParToUnsignedLong ("FirstDayOfWeek",
|
|
|
|
|
0,
|
|
|
|
|
6,
|
|
|
|
|
Cal_FIRST_DAY_OF_WEEK_DEFAULT);
|
2017-01-29 12:42:19 +01:00
|
|
|
|
if (!Cal_DayIsValidAsFirstDayOfWeek[FirstDayOfWeek])
|
|
|
|
|
FirstDayOfWeek = Cal_FIRST_DAY_OF_WEEK_DEFAULT;
|
2015-11-21 20:23:28 +01:00
|
|
|
|
|
|
|
|
|
return FirstDayOfWeek;
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-04 11:03:44 +02:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/******************** Get first day of week from string **********************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
unsigned Cal_GetFirstDayOfWeekFromStr (const char *Str)
|
|
|
|
|
{
|
|
|
|
|
unsigned UnsignedNum;
|
|
|
|
|
|
|
|
|
|
if (sscanf (Str,"%u",&UnsignedNum) == 1)
|
|
|
|
|
if (Cal_DayIsValidAsFirstDayOfWeek[UnsignedNum])
|
|
|
|
|
return (Dat_Format_t) UnsignedNum;
|
|
|
|
|
|
|
|
|
|
return Cal_FIRST_DAY_OF_WEEK_DEFAULT;
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-04 14:43:03 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/***************************** Draw current month ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void Cal_DrawCurrentMonth (void)
|
|
|
|
|
{
|
2018-12-08 16:43:13 +01:00
|
|
|
|
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
2018-11-09 20:47:39 +01:00
|
|
|
|
char ParamsStr[Frm_MAX_BYTES_PARAMS_STR];
|
2015-10-29 17:46:48 +01:00
|
|
|
|
|
|
|
|
|
/***** Draw the month in JavaScript *****/
|
|
|
|
|
/* JavaScript will write HTML here */
|
2019-10-23 21:37:01 +02:00
|
|
|
|
HTM_DIV_Begin ("id=\"CurrentMonth\"");
|
2019-10-23 20:07:56 +02:00
|
|
|
|
HTM_DIV_End ();
|
2015-10-29 17:46:48 +01:00
|
|
|
|
|
|
|
|
|
/* Write script to draw the month */
|
2019-11-01 17:35:26 +01:00
|
|
|
|
HTM_SCRIPT_Begin (NULL,NULL);
|
2019-11-11 00:15:44 +01:00
|
|
|
|
HTM_Txt ("\tGbl_HTMLContent = '';");
|
|
|
|
|
HTM_TxtF ("\tDrawCurrentMonth ('CurrentMonth',%u,%ld,%ld,'%s/%s',",
|
|
|
|
|
Gbl.Prefs.FirstDayOfWeek,
|
|
|
|
|
(long) Gbl.StartExecutionTimeUTC,
|
|
|
|
|
Gbl.Hierarchy.Ctr.PlcCod,
|
|
|
|
|
Cfg_URL_SWAD_CGI,
|
|
|
|
|
Lan_STR_LANG_ID[Gbl.Prefs.Language]);
|
2019-02-15 13:39:37 +01:00
|
|
|
|
Frm_SetParamsForm (ParamsStr,ActSeeCal,true);
|
2019-11-11 00:15:44 +01:00
|
|
|
|
HTM_TxtF ("'%s',",ParamsStr);
|
2018-11-09 20:47:39 +01:00
|
|
|
|
Frm_SetParamsForm (ParamsStr,ActSeeDatExaAnn,true);
|
2019-11-11 00:15:44 +01:00
|
|
|
|
HTM_TxtF ("'%s');",ParamsStr);
|
2019-11-01 17:35:26 +01:00
|
|
|
|
HTM_SCRIPT_End ();
|
2015-01-04 14:43:03 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************************ Draw an academic calendar **************************/
|
|
|
|
|
/*****************************************************************************/
|
2017-02-09 03:09:24 +01:00
|
|
|
|
|
2019-02-15 13:39:37 +01:00
|
|
|
|
void Cal_ShowCalendar (void)
|
2017-02-09 03:09:24 +01:00
|
|
|
|
{
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Cal_DrawCalendar (ActSeeCal,ActChgCal1stDay,
|
2020-04-08 13:40:21 +02:00
|
|
|
|
Cal_PutIconsCalendar,NULL,
|
2020-03-26 02:54:30 +01:00
|
|
|
|
false);
|
2017-02-09 03:09:24 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Cal_PrintCalendar (void)
|
|
|
|
|
{
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Cal_DrawCalendar (ActUnk,ActUnk,
|
|
|
|
|
NULL,NULL,
|
|
|
|
|
true);
|
2017-02-09 03:09:24 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
|
|
|
|
Act_Action_t ActionChangeCalendar1stDay,
|
2020-03-26 02:54:30 +01:00
|
|
|
|
void (*FunctionToDrawContextualIcons) (void *Args),void *Args,
|
2017-02-09 03:09:24 +01:00
|
|
|
|
bool PrintView)
|
2015-01-04 14:43:03 +01:00
|
|
|
|
{
|
2019-03-26 13:20:21 +01:00
|
|
|
|
extern const char *Hlp_START_Calendar;
|
2018-12-08 16:43:13 +01:00
|
|
|
|
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
2018-11-09 20:47:39 +01:00
|
|
|
|
char ParamsStr[Frm_MAX_BYTES_PARAMS_STR];
|
2015-10-30 17:05:33 +01:00
|
|
|
|
|
2019-10-26 02:19:42 +02:00
|
|
|
|
/***** Begin box *****/
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Box_BoxBegin (NULL,NULL,
|
|
|
|
|
FunctionToDrawContextualIcons,Args,
|
2017-06-11 22:26:40 +02:00
|
|
|
|
PrintView ? NULL :
|
2019-03-26 13:20:21 +01:00
|
|
|
|
Hlp_START_Calendar,Box_NOT_CLOSABLE);
|
2016-03-18 22:17:35 +01:00
|
|
|
|
Lay_WriteHeaderClassPhoto (PrintView,false,
|
2019-04-03 20:57:04 +02:00
|
|
|
|
Gbl.Hierarchy.Ins.InsCod,
|
|
|
|
|
Gbl.Hierarchy.Deg.DegCod,
|
2019-04-04 10:45:15 +02:00
|
|
|
|
Gbl.Hierarchy.Crs.CrsCod);
|
2015-01-04 14:43:03 +01:00
|
|
|
|
|
2019-02-25 15:14:28 +01:00
|
|
|
|
/***** Preference selector to change first day of week *****/
|
2015-11-22 00:40:23 +01:00
|
|
|
|
if (!PrintView)
|
2019-02-25 15:14:28 +01:00
|
|
|
|
{
|
2019-03-26 11:53:21 +01:00
|
|
|
|
Set_StartSettingsHead ();
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,
|
|
|
|
|
NULL,NULL);
|
2019-03-26 11:53:21 +01:00
|
|
|
|
Set_EndSettingsHead ();
|
2019-02-25 15:14:28 +01:00
|
|
|
|
}
|
2015-11-22 00:40:23 +01:00
|
|
|
|
|
2019-02-25 15:14:28 +01:00
|
|
|
|
/***** Draw several months *****/
|
2015-11-22 00:40:23 +01:00
|
|
|
|
/* JavaScript will write HTML here */
|
2019-10-23 21:37:01 +02:00
|
|
|
|
HTM_DIV_Begin ("id=\"calendar\"");
|
2019-10-23 20:07:56 +02:00
|
|
|
|
HTM_DIV_End ();
|
2015-10-30 17:05:33 +01:00
|
|
|
|
|
|
|
|
|
/* Write script to draw the month */
|
2019-11-01 17:35:26 +01:00
|
|
|
|
HTM_SCRIPT_Begin (NULL,NULL);
|
2019-11-11 00:15:44 +01:00
|
|
|
|
HTM_Txt ("\tGbl_HTMLContent = '';");
|
|
|
|
|
HTM_TxtF ("\tCal_DrawCalendar('calendar',%u,%ld,%ld,%s,'%s/%s',",
|
|
|
|
|
Gbl.Prefs.FirstDayOfWeek,
|
|
|
|
|
(long) Gbl.StartExecutionTimeUTC,
|
|
|
|
|
Gbl.Hierarchy.Ctr.PlcCod,
|
|
|
|
|
PrintView ? "true" :
|
|
|
|
|
"false",
|
|
|
|
|
Cfg_URL_SWAD_CGI,
|
|
|
|
|
Lan_STR_LANG_ID[Gbl.Prefs.Language]);
|
2018-11-09 20:47:39 +01:00
|
|
|
|
Frm_SetParamsForm (ParamsStr,ActionSeeCalendar,true);
|
2019-11-11 00:15:44 +01:00
|
|
|
|
HTM_TxtF ("'%s',",ParamsStr);
|
2018-11-09 20:47:39 +01:00
|
|
|
|
Frm_SetParamsForm (ParamsStr,ActSeeDatExaAnn,true);
|
2019-11-11 00:15:44 +01:00
|
|
|
|
HTM_TxtF ("'%s');",ParamsStr);
|
2019-11-01 17:35:26 +01:00
|
|
|
|
HTM_SCRIPT_End ();
|
2015-10-30 17:05:33 +01:00
|
|
|
|
|
2017-06-12 14:16:33 +02:00
|
|
|
|
/***** End box *****/
|
2019-10-25 22:48:34 +02:00
|
|
|
|
Box_BoxEnd ();
|
2016-03-18 21:40:26 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2019-02-15 13:39:37 +01:00
|
|
|
|
/******************** Put contextual icons in calendar ***********************/
|
2016-03-18 21:40:26 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-04-08 13:40:21 +02:00
|
|
|
|
static void Cal_PutIconsCalendar (__attribute__((unused)) void *Args)
|
2017-02-09 03:09:24 +01:00
|
|
|
|
{
|
2020-04-08 13:40:21 +02:00
|
|
|
|
/***** Print calendar *****/
|
|
|
|
|
Ico_PutContextualIconToPrint (ActPrnCal,
|
|
|
|
|
NULL,NULL);
|
|
|
|
|
|
|
|
|
|
/***** View holidays *****/
|
2021-02-11 22:57:09 +01:00
|
|
|
|
if (Gbl.Hierarchy.Level == Hie_Lvl_INS) // Institution selected
|
2020-04-08 13:40:21 +02:00
|
|
|
|
Hld_PutIconToSeeHlds ();
|
2019-02-15 13:39:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/************************** Put icon to see calendar *************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-04-08 13:40:21 +02:00
|
|
|
|
void Cal_PutIconToSeeCalendar (__attribute__((unused)) void *Args)
|
2019-02-15 13:39:37 +01:00
|
|
|
|
{
|
|
|
|
|
extern const char *Txt_Calendar;
|
|
|
|
|
|
2020-04-08 13:40:21 +02:00
|
|
|
|
Lay_PutContextualLinkOnlyIcon (ActSeeCal,NULL,
|
|
|
|
|
NULL,NULL,
|
|
|
|
|
"calendar.svg",
|
|
|
|
|
Txt_Calendar);
|
2017-02-09 03:09:24 +01:00
|
|
|
|
}
|