mirror of https://github.com/acanas/swad-core.git
Version 16.167.3
This commit is contained in:
parent
c2af18443b
commit
2ddb854187
|
@ -348,7 +348,7 @@ static void Cal_PutIconToPrintCalendarSys (void)
|
|||
{
|
||||
extern const char *Txt_Print;
|
||||
|
||||
/* Print calendar */
|
||||
/***** Print calendar *****/
|
||||
Lay_PutContextualLink (ActPrnCalSys,NULL,
|
||||
"print64x64.png",
|
||||
Txt_Print,NULL,
|
||||
|
@ -359,7 +359,7 @@ static void Cal_PutIconToPrintCalendarCty (void)
|
|||
{
|
||||
extern const char *Txt_Print;
|
||||
|
||||
/* Print calendar */
|
||||
/***** Print calendar *****/
|
||||
Lay_PutContextualLink (ActPrnCalCty,NULL,
|
||||
"print64x64.png",
|
||||
Txt_Print,NULL,
|
||||
|
@ -371,30 +371,26 @@ static void Cal_PutIconToPrintCalendarIns (void)
|
|||
extern const char *Txt_Print;
|
||||
extern const char *Txt_Holidays;
|
||||
|
||||
/* Print calendar */
|
||||
/***** Print calendar *****/
|
||||
Lay_PutContextualLink (ActPrnCalIns,NULL,
|
||||
"print64x64.png",
|
||||
Txt_Print,NULL,
|
||||
NULL);
|
||||
|
||||
/* View / edit holidays */
|
||||
if (Gbl.Hlds.Num) // There are holidays
|
||||
/***** View holidays *****/
|
||||
if (Gbl.Hlds.Num || // There are holidays
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Institution admin or system admin
|
||||
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 */
|
||||
/***** Print calendar *****/
|
||||
Lay_PutContextualLink (ActPrnCalCtr,NULL,
|
||||
"print64x64.png",
|
||||
Txt_Print,NULL,
|
||||
|
@ -405,7 +401,7 @@ static void Cal_PutIconToPrintCalendarDeg (void)
|
|||
{
|
||||
extern const char *Txt_Print;
|
||||
|
||||
/* Print calendar */
|
||||
/***** Print calendar *****/
|
||||
Lay_PutContextualLink (ActPrnCalDeg,NULL,
|
||||
"print64x64.png",
|
||||
Txt_Print,NULL,
|
||||
|
@ -416,7 +412,7 @@ static void Cal_PutIconToPrintCalendarCrs (void)
|
|||
{
|
||||
extern const char *Txt_Print;
|
||||
|
||||
/* Print calendar */
|
||||
/***** Print calendar *****/
|
||||
Lay_PutContextualLink (ActPrnCalCrs,NULL,
|
||||
"print64x64.png",
|
||||
Txt_Print,NULL,
|
||||
|
|
|
@ -209,13 +209,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.167.2 (2017-03-24)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.167.3 (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.3: Mar 25, 2017 Changes in edition of holidays. (217632 lines)
|
||||
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:
|
||||
|
|
151
swad_holiday.c
151
swad_holiday.c
|
@ -84,6 +84,9 @@ void Hld_SeeHolidays (void)
|
|||
extern const char *Txt_End_date;
|
||||
extern const char *Txt_Holiday;
|
||||
extern const char *Txt_All_places;
|
||||
extern const char *Txt_There_are_no_holidays;
|
||||
extern const char *Txt_Create_another_holiday;
|
||||
extern const char *Txt_Create_holiday;
|
||||
Hld_Order_t Order;
|
||||
unsigned NumHld;
|
||||
|
||||
|
@ -96,75 +99,91 @@ void Hld_SeeHolidays (void)
|
|||
Hld_GetListHolidays ();
|
||||
|
||||
/***** Table head *****/
|
||||
Lay_StartRoundFrameTable (NULL,Txt_Holidays,
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM ? Hld_PutIconToEditHlds :
|
||||
NULL,
|
||||
Hlp_INSTITUTION_Holidays,2);
|
||||
fprintf (Gbl.F.Out,"<tr>");
|
||||
for (Order = Hld_ORDER_BY_PLACE;
|
||||
Order <= Hld_ORDER_BY_START_DATE;
|
||||
Order++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActSeeHld);
|
||||
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
|
||||
Act_LinkFormSubmit (Txt_HOLIDAYS_HELP_ORDER[Order],"TIT_TBL",NULL);
|
||||
if (Order == Gbl.Hlds.SelectedOrder)
|
||||
fprintf (Gbl.F.Out,"<u>");
|
||||
fprintf (Gbl.F.Out,"%s",Txt_HOLIDAYS_ORDER[Order]);
|
||||
if (Order == Gbl.Hlds.SelectedOrder)
|
||||
fprintf (Gbl.F.Out,"</u>");
|
||||
fprintf (Gbl.F.Out,"</a>");
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</th>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
||||
" %s "
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
Txt_End_date,
|
||||
Txt_Holiday);
|
||||
|
||||
/***** Write all the holidays *****/
|
||||
for (NumHld = 0;
|
||||
NumHld < Gbl.Hlds.Num;
|
||||
NumHld++)
|
||||
{
|
||||
/* Write data of this holiday */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
|
||||
Gbl.Hlds.Lst[NumHld].PlaceFullName);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
" %04u-%02u-%02u"
|
||||
"</td>",
|
||||
Gbl.Hlds.Lst[NumHld].StartDate.Year,
|
||||
Gbl.Hlds.Lst[NumHld].StartDate.Month,
|
||||
Gbl.Hlds.Lst[NumHld].StartDate.Day);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
" ");
|
||||
switch (Gbl.Hlds.Lst[NumHld].HldTyp)
|
||||
Lay_StartRoundFrame (NULL,Txt_Holidays,
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM ? Hld_PutIconToEditHlds :
|
||||
NULL,
|
||||
Hlp_INSTITUTION_Holidays);
|
||||
if (Gbl.Hlds.Num)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<table class=\"FRAME_TBL_MARGIN CELLS_PAD_2\">"
|
||||
"<tr>");
|
||||
for (Order = Hld_ORDER_BY_PLACE;
|
||||
Order <= Hld_ORDER_BY_START_DATE;
|
||||
Order++)
|
||||
{
|
||||
case Hld_HOLIDAY:
|
||||
break;
|
||||
case Hld_NON_SCHOOL_PERIOD:
|
||||
fprintf (Gbl.F.Out,"%04u-%02u-%02u",
|
||||
Gbl.Hlds.Lst[NumHld].EndDate.Year,
|
||||
Gbl.Hlds.Lst[NumHld].EndDate.Month,
|
||||
Gbl.Hlds.Lst[NumHld].EndDate.Day);
|
||||
break;
|
||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">");
|
||||
Act_FormStart (ActSeeHld);
|
||||
Par_PutHiddenParamUnsigned ("Order",(unsigned) Order);
|
||||
Act_LinkFormSubmit (Txt_HOLIDAYS_HELP_ORDER[Order],"TIT_TBL",NULL);
|
||||
if (Order == Gbl.Hlds.SelectedOrder)
|
||||
fprintf (Gbl.F.Out,"<u>");
|
||||
fprintf (Gbl.F.Out,"%s",Txt_HOLIDAYS_ORDER[Order]);
|
||||
if (Order == Gbl.Hlds.SelectedOrder)
|
||||
fprintf (Gbl.F.Out,"</u>");
|
||||
fprintf (Gbl.F.Out,"</a>");
|
||||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</th>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
" %s"
|
||||
"</td>"
|
||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
|
||||
" %s "
|
||||
"</th>"
|
||||
"<th class=\"LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
Gbl.Hlds.Lst[NumHld].Name);
|
||||
Txt_End_date,
|
||||
Txt_Holiday);
|
||||
|
||||
/***** Write all the holidays *****/
|
||||
for (NumHld = 0;
|
||||
NumHld < Gbl.Hlds.Num;
|
||||
NumHld++)
|
||||
{
|
||||
/* Write data of this holiday */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
"%s"
|
||||
"</td>",
|
||||
Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
|
||||
Gbl.Hlds.Lst[NumHld].PlaceFullName);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
" %04u-%02u-%02u"
|
||||
"</td>",
|
||||
Gbl.Hlds.Lst[NumHld].StartDate.Year,
|
||||
Gbl.Hlds.Lst[NumHld].StartDate.Month,
|
||||
Gbl.Hlds.Lst[NumHld].StartDate.Day);
|
||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
" ");
|
||||
switch (Gbl.Hlds.Lst[NumHld].HldTyp)
|
||||
{
|
||||
case Hld_HOLIDAY:
|
||||
break;
|
||||
case Hld_NON_SCHOOL_PERIOD:
|
||||
fprintf (Gbl.F.Out,"%04u-%02u-%02u",
|
||||
Gbl.Hlds.Lst[NumHld].EndDate.Year,
|
||||
Gbl.Hlds.Lst[NumHld].EndDate.Month,
|
||||
Gbl.Hlds.Lst[NumHld].EndDate.Day);
|
||||
break;
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">"
|
||||
" %s"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Gbl.Hlds.Lst[NumHld].Name);
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
}
|
||||
else // No holidays created in the current institution
|
||||
Lay_ShowAlert (Lay_INFO,Txt_There_are_no_holidays);
|
||||
|
||||
/***** Button to create centre *****/
|
||||
if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Institution admin or system admin
|
||||
{
|
||||
Act_FormStart (ActEdiHld);
|
||||
Lay_PutConfirmButton (Gbl.Hlds.Num ? Txt_Create_another_holiday :
|
||||
Txt_Create_holiday);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
|
|
52
swad_text.c
52
swad_text.c
|
@ -6155,6 +6155,27 @@ const char *Txt_Create_another_degree =
|
|||
"Criar uma outra titulação";
|
||||
#endif
|
||||
|
||||
const char *Txt_Create_another_holiday =
|
||||
#if L==1
|
||||
"Crear una altra festivitat";
|
||||
#elif L==2
|
||||
"Erstellen Sie ein anderes Feiertag";
|
||||
#elif L==3
|
||||
"Create another holiday";
|
||||
#elif L==4
|
||||
"Crear otra festividad";
|
||||
#elif L==5
|
||||
"Créer un autre fête";
|
||||
#elif L==6
|
||||
"Crear otra festividad"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Crea una altra festività";
|
||||
#elif L==8
|
||||
"Tworzenie inny wakacje";
|
||||
#elif L==9
|
||||
"Criar uma outra féria";
|
||||
#endif
|
||||
|
||||
const char *Txt_Create_another_institution =
|
||||
#if L==1
|
||||
"Crear una altra institució";
|
||||
|
@ -6451,7 +6472,7 @@ const char *Txt_Create_group =
|
|||
|
||||
const char *Txt_Create_holiday =
|
||||
#if L==1
|
||||
"Crear festividad"; // Necessita traduccio
|
||||
"Crear festivitat";
|
||||
#elif L==2
|
||||
"Feiertag eingeben";
|
||||
#elif L==3
|
||||
|
@ -46941,21 +46962,42 @@ const char *Txt_There_are_no_email_domains =
|
|||
#if L==1
|
||||
"No existen dominios de correo para notificaciones."; // Necessita traduccio
|
||||
#elif L==2
|
||||
"There are no email domains for notifications."; // Need Übersetzung
|
||||
"There are no email domains for notifications."; // Need Übersetzung
|
||||
#elif L==3
|
||||
"There are no email domains for notifications.";
|
||||
#elif L==4
|
||||
"No existen dominios de correo para notificaciones.";
|
||||
#elif L==5
|
||||
"There are no email domains for notifications."; // Besoin de traduction
|
||||
"There are no email domains for notifications."; // Besoin de traduction
|
||||
#elif L==6
|
||||
"No existen dominios de correo para notificaciones."; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Non ci sono campi mail per le notifiche.";
|
||||
#elif L==8
|
||||
"There are no email domains for notifications."; // Potrzebujesz tlumaczenie
|
||||
"There are no email domains for notifications."; // Potrzebujesz tlumaczenie
|
||||
#elif L==9
|
||||
"There are no email domains for notifications."; // Necessita de tradução
|
||||
"There are no email domains for notifications."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_There_are_no_holidays =
|
||||
#if L==1
|
||||
"No existen días festivos."; // Necessita traduccio
|
||||
#elif L==2
|
||||
"There are no holidays."; // Need Übersetzung
|
||||
#elif L==3
|
||||
"There are no holidays.";
|
||||
#elif L==4
|
||||
"No existen días festivos.";
|
||||
#elif L==5
|
||||
"There are no holidays."; // Besoin de traduction
|
||||
#elif L==6
|
||||
"No existen días festivos."; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Non ci sono festività.";
|
||||
#elif L==8
|
||||
"There are no holidays."; // Potrzebujesz tlumaczenie
|
||||
#elif L==9
|
||||
"There are no holidays."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_There_are_no_links =
|
||||
|
|
Loading…
Reference in New Issue