diff --git a/swad_action.c b/swad_action.c index df8ff470..f7b10dc6 100644 --- a/swad_action.c +++ b/swad_action.c @@ -101,17 +101,17 @@ extern struct Globals Gbl; Start: 1285. ActFrmLogIn Show landing page (forms to log in and to create a new account) - 10. ActSysReqSch Request search in system tab + 10. ActReqSch Request search in system tab 1057. ActSeeSocTmlGbl Show social timeline (global) 1058. ActSeeSocPrf Suggest list of users to follow - 16. ActSeeCalSys Show the academic calendar + 16. ActSeeCal Show the academic calendar 1228. ActSeeNtf Show my recent notifications 1293. ActReqSndNewPwd Show form to send a new password via email 1294. ActSndNewPwd Send a new password via email 1295. ActLogOut Close session - 17. ActSysSch Search for courses, teachers, documents... + 17. ActSch Search for courses, teachers, documents... 1061. ActRcvSocPstGbl Receive a public social post to be displayed in the timeline (global) 1062. ActRcvSocComGbl Comment a social note in the timeline (global) @@ -1601,17 +1601,17 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = // TabSta ****************************************************************** /* ActFrmLogIn */{1521, 0,TabSta,ActFrmLogIn , 0,0x001,0x001,0x001,0x001,0x001,0x001,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_WriteLandingPage ,"power-off" }, - /* ActSysReqSch */{ 627, 1,TabSta,ActSysReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sch_ReqSysSearch ,"search" }, + /* ActReqSch */{ 627, 1,TabSta,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sch_ReqSysSearch ,"search" }, /* ActSeeSocTmlGbl */{1490, 2,TabSta,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ShowTimelineGbl2 ,"comment-dots" }, /* ActSeeSocPrf */{1520, 3,TabSta,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_SeeSocialProfiles ,"user-check" }, - /* ActSeeCalSys */{1622, 4,TabSta,ActSeeCalSys ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cal_DrawCalendarSys ,"calendar" }, + /* ActSeeCal */{1622, 4,TabSta,ActSeeCal ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cal_ShowCalendar ,"calendar" }, /* ActSeeNtf */{ 990, 5,TabSta,ActSeeNtf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ntf_ShowMyNotifications ,"bell" }, /* ActReqSndNewPwd */{ 665,-1,TabUnk,ActFrmLogIn , 0,0x001,0x001,0x001,0x001,0x001,0x001,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pwd_ShowFormSendNewPwd ,NULL}, /* ActSndNewPwd */{ 633,-1,TabUnk,ActFrmLogIn , 0,0x001,0x001,0x001,0x001,0x001,0x001,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pwd_ChkIdLoginAndSendNewPwd ,NULL}, /* ActLogOut */{ 10,-1,TabUnk,ActFrmLogIn ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ses_CloseSession ,Usr_Logout ,NULL}, - /* ActSysSch */{ 628,-1,TabUnk,ActSysReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Sch_GetParamsSearch ,Sch_SysSearch ,NULL}, + /* ActSch */{ 628,-1,TabUnk,ActReqSch ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Sch_GetParamsSearch ,Sch_SysSearch ,NULL}, /* ActRcvSocPstGbl */{1492,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ReceiveSocialPostGbl ,NULL}, /* ActRcvSocComGbl */{1503,-1,TabUnk,ActSeeSocTmlGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,Soc_ShowTimelineGbl1 ,Soc_ReceiveCommentGbl ,NULL}, @@ -1653,8 +1653,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeeFlg */{1412,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Fol_ListFollowing ,NULL}, /* ActSeeFlr */{1413,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Fol_ListFollowers ,NULL}, - /* ActPrnCalSys */{1623,-1,TabUnk,ActSeeCalSys ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Cal_PrintCalendar ,NULL}, - /* ActChgCalSys1stDay*/{1624,-1,TabUnk,ActSeeCalSys ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Cal_ChangeFirstDayOfWeek ,Cal_DrawCalendarSys ,NULL}, + /* ActPrnCal */{1623,-1,TabUnk,ActSeeCal ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Cal_PrintCalendar ,NULL}, + /* ActChgCal1stDay */{1624,-1,TabUnk,ActSeeCal ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Cal_ChangeFirstDayOfWeek ,Cal_ShowCalendar ,NULL}, /* ActSeeNewNtf */{ 991,-1,TabUnk,ActSeeNtf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ntf_ShowMyNotifications ,NULL}, /* ActMrkNtfSee */{1146,-1,TabUnk,ActSeeNtf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ntf_MarkAllNotifAsSeen ,NULL}, @@ -1737,7 +1737,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeeCtr */{ 676, 1,TabIns,ActSeeCtr , 0, 0, 0, 0,0x3C7, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ctr_ShowCtrsOfCurrentIns ,"building" }, /* ActSeePlc */{ 703, 2,TabIns,ActSeePlc , 0, 0, 0, 0,0x3C7, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_SeePlaces ,"map-marker-alt" }, /* ActSeeDpt */{ 675, 3,TabIns,ActSeeDpt , 0, 0, 0, 0,0x3C7, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Dpt_SeeDepts ,"users" }, - /* ActSeeHld */{ 707,-1,TabIns,ActSeeHld , 0, 0, 0, 0,0x3C7, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Hld_SeeHolidays ,"calendar-day" }, + /* ActSeeHld */{ 707, 4,TabIns,ActSeeHld , 0, 0, 0, 0,0x3C7, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Hld_SeeHolidays ,"calendar-day" }, // Actions not in menu: /* ActPrnInsInf */{1154,-1,TabUnk,ActSeeInsInf , 0, 0, 0, 0,0x3C7, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Ins_PrintConfiguration ,NULL}, @@ -3774,8 +3774,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActEnbPstForCrsUsr, // #624 ActDisPstForSWAUsr, // #625 -1, // #626 (obsolete action) - ActSysReqSch, // #627 - ActSysSch, // #628 + ActReqSch, // #627 + ActSch, // #628 -1, // #629 (obsolete action) -1, // #630 (obsolete action) ActExpAdmMrkGrp, // #631 @@ -4769,9 +4769,9 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActReqRemExaAnn, // #1619 ActHidExaAnn, // #1620 ActShoExaAnn, // #1621 - ActSeeCalSys, // #1622 - ActPrnCalSys, // #1623 - ActChgCalSys1stDay, // #1624 + ActSeeCal, // #1622 + ActPrnCal, // #1623 + ActChgCal1stDay, // #1624 -1, // #1625 (obsolete action) -1, // #1626 (obsolete action) -1, // #1627 (obsolete action) diff --git a/swad_action.h b/swad_action.h index 77d9db6d..498fc417 100644 --- a/swad_action.h +++ b/swad_action.h @@ -90,10 +90,10 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to /*****************************************************************************/ // Actions in menu #define ActFrmLogIn (ActWebSvc + 1) -#define ActSysReqSch (ActWebSvc + 2) +#define ActReqSch (ActWebSvc + 2) #define ActSeeSocTmlGbl (ActWebSvc + 3) #define ActSeeSocPrf (ActWebSvc + 4) -#define ActSeeCalSys (ActWebSvc + 5) +#define ActSeeCal (ActWebSvc + 5) #define ActSeeNtf (ActWebSvc + 6) // Secondary actions @@ -101,7 +101,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActSndNewPwd (ActWebSvc + 8) #define ActLogOut (ActWebSvc + 9) -#define ActSysSch (ActWebSvc + 10) +#define ActSch (ActWebSvc + 10) #define ActRcvSocPstGbl (ActWebSvc + 11) #define ActRcvSocComGbl (ActWebSvc + 12) @@ -143,8 +143,8 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActSeeFlg (ActWebSvc + 44) #define ActSeeFlr (ActWebSvc + 45) -#define ActPrnCalSys (ActWebSvc + 46) -#define ActChgCalSys1stDay (ActWebSvc + 47) +#define ActPrnCal (ActWebSvc + 46) +#define ActChgCal1stDay (ActWebSvc + 47) #define ActSeeNewNtf (ActWebSvc + 48) #define ActMrkNtfSee (ActWebSvc + 49) diff --git a/swad_calendar.c b/swad_calendar.c index 78d50475..3dc46049 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -71,7 +71,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, Act_Action_t ActionChangeCalendar1stDay, void (*FunctionToDrawContextualIcons) (void), bool PrintView); -static void Cal_PutIconToPrintCalendarSys (void); +static void Cal_PutIconsCalendar (void); /*****************************************************************************/ /************** Put icons to select the first day of the week ****************/ @@ -221,7 +221,7 @@ void Cal_DrawCurrentMonth (void) Gbl.CurrentCtr.Ctr.PlcCod, Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language]); - Frm_SetParamsForm (ParamsStr,ActSeeCalSys,true); + Frm_SetParamsForm (ParamsStr,ActSeeCal,true); fprintf (Gbl.F.Out,"'%s',",ParamsStr); Frm_SetParamsForm (ParamsStr,ActSeeDatExaAnn,true); fprintf (Gbl.F.Out,"'%s');" @@ -232,9 +232,9 @@ void Cal_DrawCurrentMonth (void) /************************ Draw an academic calendar **************************/ /*****************************************************************************/ -void Cal_DrawCalendarSys (void) +void Cal_ShowCalendar (void) { - Cal_DrawCalendar (ActSeeCalSys,ActChgCalSys1stDay,Cal_PutIconToPrintCalendarSys,false); + Cal_DrawCalendar (ActSeeCal,ActChgCal1stDay,Cal_PutIconsCalendar,false); } void Cal_PrintCalendar (void) @@ -300,21 +300,30 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, } /*****************************************************************************/ -/************************ Put icon to print calendar *************************/ +/******************** Put contextual icons in calendar ***********************/ /*****************************************************************************/ -static void Cal_PutIconToPrintCalendarSys (void) +static void Cal_PutIconsCalendar (void) { - extern const char *Txt_Holidays; - /***** Print calendar *****/ - Ico_PutContextualIconToPrint (ActPrnCalSys,NULL); + Ico_PutContextualIconToPrint (ActPrnCal,NULL); /***** View holidays *****/ if (Gbl.CurrentIns.Ins.InsCod > 0 && // Institution selected (Gbl.Hlds.Num || // There are holidays Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM)) // Institution admin or system admin - Lay_PutContextualLinkOnlyIcon (ActSeeHld,NULL,NULL, - "calendar-day.svg", - Txt_Holidays); + Hld_PutIconToSeeHlds (); + } + +/*****************************************************************************/ +/************************** Put icon to see calendar *************************/ +/*****************************************************************************/ + +void Cal_PutIconToSeeCalendar (void) + { + extern const char *Txt_Calendar; + + Lay_PutContextualLinkOnlyIcon (ActSeeCal,NULL,NULL, + "calendar.svg", + Txt_Calendar); } diff --git a/swad_calendar.h b/swad_calendar.h index a74fcc1e..2ee28545 100644 --- a/swad_calendar.h +++ b/swad_calendar.h @@ -50,7 +50,9 @@ unsigned Cal_GetFirstDayOfWeekFromStr (const char *Str); void Cal_DrawCurrentMonth (void); -void Cal_DrawCalendarSys (void); +void Cal_ShowCalendar (void); void Cal_PrintCalendar (void); +void Cal_PutIconToSeeCalendar (void); + #endif diff --git a/swad_changelog.h b/swad_changelog.h index 47758a65..04f4e958 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -386,11 +386,12 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.45.2 (2019-02-15)" +#define Log_PLATFORM_VERSION "SWAD 18.45.3 (2019-02-15)" #define CSS_FILE "swad18.41.1.css" #define JS_FILE "swad18.32.1.js" /* - Version 18.45.2: Feb 15, 2019 Changed holidays icon. (? lines) + Version 18.45.3: Feb 15, 2019 Contextual icon to see calendar from holidays. (238434 lines) + Version 18.45.2: Feb 15, 2019 Changed holidays icon. (238411 lines) Copy the following icons to icon public directory: sudo cp icon/calendar.svg /var/www/html/swad/icon/ sudo cp icon/calendar-minus.svg /var/www/html/swad/icon/ diff --git a/swad_course.c b/swad_course.c index 0c4dfa24..e78e792a 100644 --- a/swad_course.c +++ b/swad_course.c @@ -1064,7 +1064,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void) /***** Start form *****/ Frm_StartFormGoTo (Gbl.Usrs.Me.MyCrss.Num ? ActSeeCrsInf : - ActSysReqSch); + ActReqSch); /***** Start selector of courses *****/ fprintf (Gbl.F.Out,"