mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-16 13:44:06 +02:00
Version 16.135.1
This commit is contained in:
parent
b9c7db3d8f
commit
4f7463ae71
|
@ -190,7 +190,6 @@ void Cal_DrawCurrentMonth (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_STR_LANG_ID[1 + Txt_NUM_LANGUAGES];
|
extern const char *Txt_STR_LANG_ID[1 + Txt_NUM_LANGUAGES];
|
||||||
char ParamsStr[256 + 256 + Ses_LENGTH_SESSION_ID + 256];
|
char ParamsStr[256 + 256 + Ses_LENGTH_SESSION_ID + 256];
|
||||||
Act_Action_t ActionSeeCalendar;
|
|
||||||
|
|
||||||
/***** Get list of holidays *****/
|
/***** Get list of holidays *****/
|
||||||
if (!Gbl.Hlds.LstIsRead)
|
if (!Gbl.Hlds.LstIsRead)
|
||||||
|
@ -213,25 +212,37 @@ void Cal_DrawCurrentMonth (void)
|
||||||
Gbl.CurrentCtr.Ctr.PlcCod,
|
Gbl.CurrentCtr.Ctr.PlcCod,
|
||||||
Cfg_URL_SWAD_CGI,
|
Cfg_URL_SWAD_CGI,
|
||||||
Txt_STR_LANG_ID[Gbl.Prefs.Language]);
|
Txt_STR_LANG_ID[Gbl.Prefs.Language]);
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
Act_SetParamsForm (ParamsStr,Cal_GetActionToSeeCalendar (),true);
|
||||||
ActionSeeCalendar = ActSeeCalCrs;
|
|
||||||
else if (Gbl.CurrentDeg.Deg.DegCod > 0) // Degree selected
|
|
||||||
ActionSeeCalendar = ActSeeCalDeg;
|
|
||||||
else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) // Centre selected
|
|
||||||
ActionSeeCalendar = ActSeeCalCtr;
|
|
||||||
else if (Gbl.CurrentIns.Ins.InsCod > 0) // Institution selected
|
|
||||||
ActionSeeCalendar = ActSeeCalIns;
|
|
||||||
else if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected
|
|
||||||
ActionSeeCalendar = ActSeeCalCty;
|
|
||||||
else
|
|
||||||
ActionSeeCalendar = ActSeeCalSys;
|
|
||||||
Act_SetParamsForm (ParamsStr,ActionSeeCalendar,true);
|
|
||||||
fprintf (Gbl.F.Out,"'%s',",ParamsStr);
|
fprintf (Gbl.F.Out,"'%s',",ParamsStr);
|
||||||
Act_SetParamsForm (ParamsStr,ActSeeDatExaAnn,true);
|
Act_SetParamsForm (ParamsStr,ActSeeDatExaAnn,true);
|
||||||
fprintf (Gbl.F.Out,"'%s');"
|
fprintf (Gbl.F.Out,"'%s');"
|
||||||
"</script>",ParamsStr);
|
"</script>",ParamsStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********** Get action to see calendar depending on current scope ************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
Act_Action_t Cal_GetActionToSeeCalendar ()
|
||||||
|
{
|
||||||
|
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
|
||||||
|
return ActSeeCalCrs;
|
||||||
|
|
||||||
|
if (Gbl.CurrentDeg.Deg.DegCod > 0) // Degree selected
|
||||||
|
return ActSeeCalDeg;
|
||||||
|
|
||||||
|
if (Gbl.CurrentCtr.Ctr.CtrCod > 0) // Centre selected
|
||||||
|
return ActSeeCalCtr;
|
||||||
|
|
||||||
|
if (Gbl.CurrentIns.Ins.InsCod > 0) // Institution selected
|
||||||
|
return ActSeeCalIns;
|
||||||
|
|
||||||
|
if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected
|
||||||
|
return ActSeeCalCty;
|
||||||
|
|
||||||
|
return ActSeeCalSys;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************ Draw an academic calendar **************************/
|
/************************ Draw an academic calendar **************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -49,6 +49,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (),
|
||||||
void Cal_ChangeFirstDayOfWeek (void);
|
void Cal_ChangeFirstDayOfWeek (void);
|
||||||
|
|
||||||
void Cal_DrawCurrentMonth (void);
|
void Cal_DrawCurrentMonth (void);
|
||||||
|
Act_Action_t Cal_GetActionToSeeCalendar ();
|
||||||
|
|
||||||
void Cal_DrawCalendarSys (void);
|
void Cal_DrawCalendarSys (void);
|
||||||
void Cal_DrawCalendarCty (void);
|
void Cal_DrawCalendarCty (void);
|
||||||
|
|
|
@ -196,13 +196,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.135 (2017-02-09)"
|
#define Log_PLATFORM_VERSION "SWAD 16.135.1 (2017-02-09)"
|
||||||
#define CSS_FILE "swad16.135.css"
|
#define CSS_FILE "swad16.135.css"
|
||||||
#define JS_FILE "swad16.123.js"
|
#define JS_FILE "swad16.123.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.135.1: Feb 09, 2017 Link from current date to calendar depending on scope. (212461 lines)
|
||||||
Version 16.135: Feb 09, 2017 Changes in layout of tabs. (212452 lines)
|
Version 16.135: Feb 09, 2017 Changes in layout of tabs. (212452 lines)
|
||||||
Version 16.134.3: Feb 09, 2017 Changes in visible tabs depending on scope. (212451 lines)
|
Version 16.134.3: Feb 09, 2017 Changes in visible tabs depending on scope. (212451 lines)
|
||||||
Version 16.134.2: Feb 09, 2017 Changed country, institution, centre and degree configuration icons. (212447 lines)
|
Version 16.134.2: Feb 09, 2017 Changed country, institution, centre and degree configuration icons. (212447 lines)
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <string.h> // For string functions
|
#include <string.h> // For string functions
|
||||||
#include <time.h> // For time functions (mktime...)
|
#include <time.h> // For time functions (mktime...)
|
||||||
|
|
||||||
|
#include "swad_calendar.h"
|
||||||
#include "swad_config.h"
|
#include "swad_config.h"
|
||||||
#include "swad_database.h"
|
#include "swad_database.h"
|
||||||
#include "swad_date.h"
|
#include "swad_date.h"
|
||||||
|
@ -169,7 +170,7 @@ void Dat_ShowClientLocalTime (void)
|
||||||
|
|
||||||
/* Month with link to calendar */
|
/* Month with link to calendar */
|
||||||
fprintf (Gbl.F.Out,"<div id=\"current_month\">");
|
fprintf (Gbl.F.Out,"<div id=\"current_month\">");
|
||||||
Act_FormStart (ActSeeCalCrs);
|
Act_FormStart (Cal_GetActionToSeeCalendar ());
|
||||||
Act_LinkFormSubmit (Txt_Show_calendar,"CURRENT_MONTH",NULL);
|
Act_LinkFormSubmit (Txt_Show_calendar,"CURRENT_MONTH",NULL);
|
||||||
fprintf (Gbl.F.Out,"<span id=\"current_month_txt\">" // JavaScript will write HTML here
|
fprintf (Gbl.F.Out,"<span id=\"current_month_txt\">" // JavaScript will write HTML here
|
||||||
"</span>"
|
"</span>"
|
||||||
|
|
|
@ -491,8 +491,10 @@ static void Lay_WriteScripts (void)
|
||||||
|
|
||||||
/***** Prepare script to draw months *****/
|
/***** Prepare script to draw months *****/
|
||||||
if ((Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) || // Left column visible
|
if ((Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) || // Left column visible
|
||||||
Gbl.Action.Act == ActSeeCalCrs ||
|
Gbl.Action.Act == ActSeeCalIns || Gbl.Action.Act == ActPrnCalIns ||
|
||||||
Gbl.Action.Act == ActPrnCalCrs)
|
Gbl.Action.Act == ActSeeCalCtr || Gbl.Action.Act == ActPrnCalCtr ||
|
||||||
|
Gbl.Action.Act == ActSeeCalDeg || Gbl.Action.Act == ActPrnCalDeg ||
|
||||||
|
Gbl.Action.Act == ActSeeCalCrs || Gbl.Action.Act == ActPrnCalCrs)
|
||||||
{
|
{
|
||||||
/***** Get list of holidays *****/
|
/***** Get list of holidays *****/
|
||||||
if (!Gbl.Hlds.LstIsRead)
|
if (!Gbl.Hlds.LstIsRead)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user