Version 14.34.3

This commit is contained in:
Antonio Cañas Vargas 2014-12-08 17:35:48 +01:00
parent 051d219475
commit 5502ec4092
14 changed files with 121 additions and 257 deletions

View File

@ -246,12 +246,8 @@ static void Ctr_Configuration (bool PrintView)
(unsigned) Gbl.CurrentCtr.Ctr.CtrCod); (unsigned) Gbl.CurrentCtr.Ctr.CtrCod);
PhotoExists = Fil_CheckIfPathExists (PathPhoto); PhotoExists = Fil_CheckIfPathExists (PathPhoto);
if (PrintView) /***** Links to print view and upload photo *****/
{ if (!PrintView)
/* Calendar head */
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
}
else
{ {
fprintf (Gbl.F.Out,"<div align=\"center\">"); fprintf (Gbl.F.Out,"<div align=\"center\">");
@ -264,11 +260,11 @@ static void Ctr_Configuration (bool PrintView)
Ctr_PutFormToChangeCtrPhoto (PhotoExists); Ctr_PutFormToChangeCtrPhoto (PhotoExists);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/* Frame head */
Lay_StartRoundFrameTable10 (NULL,2,NULL);
} }
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,2,NULL);
/***** Title *****/ /***** Title *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">"); "<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
@ -402,9 +398,6 @@ static void Ctr_Configuration (bool PrintView)
QR_LinkToCentre (200); QR_LinkToCentre (200);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End of the frame *****/
Lay_EndSquareFrameTable ();
} }
else else
{ {
@ -443,10 +436,10 @@ static void Ctr_Configuration (bool PrintView)
The_ClassFormul[Gbl.Prefs.Theme], The_ClassFormul[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_ROLE_STUDENT,Gbl.CurrentCtr.Ctr.CtrCod)); Usr_GetNumUsrsInCrssOfCtr (Rol_ROLE_STUDENT,Gbl.CurrentCtr.Ctr.CtrCod));
/***** End of the frame *****/
Lay_EndRoundFrameTable10 ();
} }
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
} }
} }

View File

@ -35,12 +35,13 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.34.2 (2014/12/08)" #define Log_PLATFORM_VERSION "SWAD 14.34.3 (2014/12/08)"
// 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 | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
/* /*
Version 14.34.3 :Dic 08, 2014 Tables are printed with rounded corners. (170602 lines)
Version 14.34.2 :Dic 08, 2014 Button to show more details on list of attendances. (170728 lines) Version 14.34.2 :Dic 08, 2014 Button to show more details on list of attendances. (170728 lines)
Version 14.34.1 :Dic 08, 2014 Translation of a message when refreshing list of attendances. (170710 lines) Version 14.34.1 :Dic 08, 2014 Translation of a message when refreshing list of attendances. (170710 lines)
Version 14.34 :Dic 08, 2014 Teachers can refresh list of attendances after selecting events. (170688 lines) Version 14.34 :Dic 08, 2014 Teachers can refresh list of attendances after selecting events. (170688 lines)

View File

@ -224,23 +224,18 @@ static void Cty_Configuration (bool PrintView)
if (Gbl.CurrentCty.Cty.CtyCod > 0) if (Gbl.CurrentCty.Cty.CtyCod > 0)
{ {
if (PrintView) /***** Link to print view *****/
if (!PrintView)
{ {
/* Calendar head */
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
}
else
{
/* Link to print view */
fprintf (Gbl.F.Out,"<div align=\"center\">"); fprintf (Gbl.F.Out,"<div align=\"center\">");
Lay_PutLinkToPrintView1 (ActPrnCtyInf); Lay_PutLinkToPrintView1 (ActPrnCtyInf);
Lay_PutLinkToPrintView2 (); Lay_PutLinkToPrintView2 ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/* Frame head */
Lay_StartRoundFrameTable10 (NULL,2,NULL);
} }
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,2,NULL);
/***** Title *****/ /***** Title *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">"); "<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
@ -352,9 +347,6 @@ static void Cty_Configuration (bool PrintView)
QR_LinkToCountry (200); QR_LinkToCountry (200);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End of the frame *****/
Lay_EndSquareFrameTable ();
} }
else else
{ {
@ -411,10 +403,10 @@ static void Cty_Configuration (bool PrintView)
The_ClassFormul[Gbl.Prefs.Theme], The_ClassFormul[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCty (Rol_ROLE_STUDENT,Gbl.CurrentCty.Cty.CtyCod)); Usr_GetNumUsrsInCrssOfCty (Rol_ROLE_STUDENT,Gbl.CurrentCty.Cty.CtyCod));
/***** End of the frame *****/
Lay_EndRoundFrameTable10 ();
} }
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
} }
} }

View File

@ -157,10 +157,8 @@ static void Crs_Configuration (bool PrintView)
bool IsForm = (!PrintView && Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER); bool IsForm = (!PrintView && Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER);
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0]; bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
if (PrintView) /***** Messages and links above the frame *****/
/* Calendar head */ if (!PrintView)
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
else
{ {
/* Get indicators and show warning */ /* Get indicators and show warning */
Ind_GetIndicatorsCrs (Gbl.CurrentCrs.Crs.CrsCod,&Indicators); Ind_GetIndicatorsCrs (Gbl.CurrentCrs.Crs.CrsCod,&Indicators);
@ -189,11 +187,11 @@ static void Crs_Configuration (bool PrintView)
/* Start form */ /* Start form */
if (IsForm) if (IsForm)
Act_FormStart (ActChgCrsLog); Act_FormStart (ActChgCrsLog);
/* Frame head */
Lay_StartRoundFrameTable10 (NULL,2,NULL);
} }
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,2,NULL);
/***** Title *****/ /***** Title *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">"); "<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
@ -331,9 +329,6 @@ static void Crs_Configuration (bool PrintView)
QR_LinkToCourse (200); QR_LinkToCourse (200);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End of the frame *****/
Lay_EndSquareFrameTable ();
} }
else else
{ {
@ -373,16 +368,16 @@ static void Crs_Configuration (bool PrintView)
Gbl.Prefs.IconsURL, Gbl.Prefs.IconsURL,
(Indicators.CountIndicators == Ind_NUM_INDICATORS) ? "ok_green" : (Indicators.CountIndicators == Ind_NUM_INDICATORS) ? "ok_green" :
"warning"); "warning");
}
/***** End of the frame *****/ /***** End of the frame *****/
Lay_EndRoundFrameTable10 (); Lay_EndRoundFrameTable10 ();
if (IsForm) /***** End form *****/
{ if (IsForm)
/***** End form *****/ {
Lay_PutSendButton (Txt_Save); Lay_PutSendButton (Txt_Save);
fprintf (Gbl.F.Out,"</form>"); fprintf (Gbl.F.Out,"</form>");
}
} }
} }

View File

@ -233,11 +233,10 @@ void Dat_DrawCalendar (void)
5, // December --> May 5, // December --> May
}; };
unsigned Row,Col; unsigned Row,Col;
// unsigned Month = (unsigned) (((((int) (Gbl.Now.Date.Month - 1) / 4) - 1) * 4 + 12) % 12 + 1); // Start one row before current month
unsigned Month = StartingMonth[Gbl.Now.Date.Month]; unsigned Month = StartingMonth[Gbl.Now.Date.Month];
unsigned Year = (Month < Gbl.Now.Date.Month) ? Gbl.Now.Date.Year : unsigned Year = (Month < Gbl.Now.Date.Month) ? Gbl.Now.Date.Year :
Gbl.Now.Date.Year - 1; Gbl.Now.Date.Year - 1;
bool PutLinkToEvents = (Gbl.CurrentAct == ActSeeCal); bool PrintView = (Gbl.CurrentAct == ActPrnCal);
/***** Get list of holidays *****/ /***** Get list of holidays *****/
if (!Gbl.Hlds.LstIsRead) if (!Gbl.Hlds.LstIsRead)
@ -247,31 +246,19 @@ void Dat_DrawCalendar (void)
} }
/***** Start of table and title *****/ /***** Start of table and title *****/
switch (Gbl.CurrentAct) if (!PrintView)
{ {
case ActSeeCal: /* Link to print view */
/* Link to print view */ fprintf (Gbl.F.Out,"<div align=\"center\">");
fprintf (Gbl.F.Out,"<div align=\"center\">"); Lay_PutLinkToPrintView1 (ActPrnCal);
Lay_PutLinkToPrintView1 (ActPrnCal); Lay_PutLinkToPrintView2 ();
Lay_PutLinkToPrintView2 (); fprintf (Gbl.F.Out,"</div>");
fprintf (Gbl.F.Out,"</div>");
/* Calendar head */
Lay_StartRoundFrameTable10 (NULL,0,NULL);
Lay_WriteHeaderClassPhoto (1,false,false,
Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentCrs.Crs.CrsCod);
break;
case ActPrnCal:
/* Calendar head */
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
Lay_WriteHeaderClassPhoto (1,true,false,
Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentCrs.Crs.CrsCod);
break;
} }
Lay_StartRoundFrameTable10 (NULL,0,NULL);
Lay_WriteHeaderClassPhoto (1,PrintView,false,
Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentCrs.Crs.CrsCod);
/***** Create list of calls for examination *****/ /***** Create list of calls for examination *****/
Exa_CreateListOfExamAnnouncements (); Exa_CreateListOfExamAnnouncements ();
@ -290,7 +277,7 @@ void Dat_DrawCalendar (void)
Col++) Col++)
{ {
fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"top\" width=\"120\">"); fprintf (Gbl.F.Out,"<td align=\"center\" valign=\"top\" width=\"120\">");
Dat_DrawMonth (Year,Month,true,PutLinkToEvents,(Gbl.CurrentAct == ActPrnCal)); Dat_DrawMonth (Year,Month,true,!PrintView,(Gbl.CurrentAct == ActPrnCal));
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
if (++Month == 13) if (++Month == 13)
{ {
@ -307,16 +294,8 @@ void Dat_DrawCalendar (void)
/***** Free list of dates of exam announcements *****/ /***** Free list of dates of exam announcements *****/
Exa_FreeListExamAnnouncements (); Exa_FreeListExamAnnouncements ();
/***** End of the frame *****/ /***** End frame *****/
switch (Gbl.CurrentAct) Lay_EndRoundFrameTable10 ();
{
case ActSeeCal:
Lay_EndRoundFrameTable10 ();
break;
case ActPrnCal:
Lay_EndSquareFrameTable ();
break;
}
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -284,23 +284,18 @@ static void Deg_Configuration (bool PrintView)
if (Gbl.CurrentDeg.Deg.DegCod > 0) if (Gbl.CurrentDeg.Deg.DegCod > 0)
{ {
if (PrintView) if (!PrintView)
{
/* Calendar head */
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
}
else
{ {
/* Link to print view */ /* Link to print view */
fprintf (Gbl.F.Out,"<div align=\"center\">"); fprintf (Gbl.F.Out,"<div align=\"center\">");
Lay_PutLinkToPrintView1 (ActPrnDegInf); Lay_PutLinkToPrintView1 (ActPrnDegInf);
Lay_PutLinkToPrintView2 (); Lay_PutLinkToPrintView2 ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/* Frame head */
Lay_StartRoundFrameTable10 (NULL,2,NULL);
} }
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,2,NULL);
/***** Title *****/ /***** Title *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">"); "<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
@ -387,9 +382,6 @@ static void Deg_Configuration (bool PrintView)
QR_LinkToDegree (200); QR_LinkToDegree (200);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End of the frame *****/
Lay_EndSquareFrameTable ();
} }
else else
{ {
@ -418,10 +410,10 @@ static void Deg_Configuration (bool PrintView)
The_ClassFormul[Gbl.Prefs.Theme], The_ClassFormul[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfDeg (Rol_ROLE_STUDENT,Gbl.CurrentDeg.Deg.DegCod)); Usr_GetNumUsrsInCrssOfDeg (Rol_ROLE_STUDENT,Gbl.CurrentDeg.Deg.DegCod));
/***** End of the frame *****/
Lay_EndRoundFrameTable10 ();
} }
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
} }
} }

View File

@ -761,14 +761,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
Par_PutHiddenParamLong ("ExaCod",ExaCod); Par_PutHiddenParamLong ("ExaCod",ExaCod);
Lay_PutLinkToPrintView2 (); Lay_PutLinkToPrintView2 ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
Lay_StartRoundFrameTable10 ("500px",0,NULL);
break; break;
case Exa_PRINT_VIEW: case Exa_PRINT_VIEW:
StyleTitle = "CONV_TIT_IMPR"; StyleTitle = "CONV_TIT_IMPR";
StyleForm = "CONV_NEG_IMPR"; StyleForm = "CONV_NEG_IMPR";
StyleNormal = "CONV_IMPR"; StyleNormal = "CONV_IMPR";
Lay_StartSquareFrameTable (DARK_GRAY,"white","500px",0);
break; break;
case Exa_FORM_VIEW: case Exa_FORM_VIEW:
StyleForm = The_ClassFormul[Gbl.Prefs.Theme]; StyleForm = The_ClassFormul[Gbl.Prefs.Theme];
@ -776,11 +773,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
Act_FormStart (ActRcvExaAnn); Act_FormStart (ActRcvExaAnn);
if (ExaCod >= 0) if (ExaCod >= 0)
Par_PutHiddenParamLong ("ExaCod",ExaCod); Par_PutHiddenParamLong ("ExaCod",ExaCod);
Lay_StartRoundFrameTable10 ("500px",0,NULL);
break; break;
} }
/***** Start table *****/ /***** Start frame *****/
Lay_StartRoundFrameTable10 ("500px",0,NULL);
fprintf (Gbl.F.Out,"<tr>" \ fprintf (Gbl.F.Out,"<tr>" \
"<td align=\"center\">" \ "<td align=\"center\">" \
"<table cellspacing=\"0\" cellpadding=\"20\" width=\"100%%\">" \ "<table cellspacing=\"0\" cellpadding=\"20\" width=\"100%%\">" \
@ -1186,24 +1183,23 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
break; break;
} }
/***** End of table *****/ /***** End frame *****/
fprintf (Gbl.F.Out,"</table>" \ fprintf (Gbl.F.Out,"</table>" \
"</td>" \ "</td>" \
"</tr>" \ "</tr>" \
"</table>" \ "</table>" \
"</td>" \ "</td>" \
"</tr>"); "</tr>");
Lay_EndRoundFrameTable10 ();
switch (TypeViewExamAnnouncement) switch (TypeViewExamAnnouncement)
{ {
case Exa_NORMAL_VIEW: case Exa_NORMAL_VIEW:
Lay_EndRoundFrameTable10 ();
break; break;
case Exa_PRINT_VIEW: case Exa_PRINT_VIEW:
Lay_EndSquareFrameTable ();
QR_ExamAnnnouncement (); QR_ExamAnnnouncement ();
break; break;
case Exa_FORM_VIEW: case Exa_FORM_VIEW:
Lay_EndRoundFrameTable10 ();
Lay_PutSendButton (Txt_Send_announcement_of_exam); Lay_PutSendButton (Txt_Send_announcement_of_exam);
fprintf (Gbl.F.Out,"</form>"); fprintf (Gbl.F.Out,"</form>");
break; break;

View File

@ -229,23 +229,18 @@ static void Ins_Configuration (bool PrintView)
if (Gbl.CurrentIns.Ins.InsCod > 0) if (Gbl.CurrentIns.Ins.InsCod > 0)
{ {
if (PrintView) /***** Link to print view *****/
if (!PrintView)
{ {
/* Calendar head */
Lay_StartSquareFrameTable (NULL,NULL,NULL,2);
}
else
{
/* Link to print view */
fprintf (Gbl.F.Out,"<div align=\"center\">"); fprintf (Gbl.F.Out,"<div align=\"center\">");
Lay_PutLinkToPrintView1 (ActPrnInsInf); Lay_PutLinkToPrintView1 (ActPrnInsInf);
Lay_PutLinkToPrintView2 (); Lay_PutLinkToPrintView2 ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/* Frame head */
Lay_StartRoundFrameTable10 (NULL,2,NULL);
} }
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,2,NULL);
/***** Title *****/ /***** Title *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">"); "<td colspan=\"2\" align=\"center\" class=\"TITLE_LOCATION\">");
@ -331,9 +326,6 @@ static void Ins_Configuration (bool PrintView)
QR_LinkToInstitution (200); QR_LinkToInstitution (200);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End of the frame *****/
Lay_EndSquareFrameTable ();
} }
else else
{ {
@ -390,10 +382,10 @@ static void Ins_Configuration (bool PrintView)
The_ClassFormul[Gbl.Prefs.Theme], The_ClassFormul[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_ROLE_STUDENT][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfIns (Rol_ROLE_STUDENT,Gbl.CurrentIns.Ins.InsCod)); Usr_GetNumUsrsInCrssOfIns (Rol_ROLE_STUDENT,Gbl.CurrentIns.Ins.InsCod));
/***** End of the frame *****/
Lay_EndRoundFrameTable10 ();
} }
/***** End of the frame *****/
Lay_EndRoundFrameTable10 ();
} }
} }

View File

@ -1522,36 +1522,6 @@ void Lay_WriteTitle (const char *Title)
fprintf (Gbl.F.Out,"<div class=\"TIT\">%s</div>",Title); fprintf (Gbl.F.Out,"<div class=\"TIT\">%s</div>",Title);
} }
/*****************************************************************************/
/*********************** Start and end a table with frame ********************/
/*****************************************************************************/
void Lay_StartSquareFrameTable (const char *BorderColor,const char *BgColor,const char *Width,unsigned CellPadding)
{
fprintf (Gbl.F.Out,"<div align=\"center\">"
"<table cellspacing=\"1\" cellpadding=\"0\"");
if (BorderColor)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",BorderColor);
if (Width)
fprintf (Gbl.F.Out," style=\"width:%s;\"",
Width);
fprintf (Gbl.F.Out,"><tr>"
"<td align=\"center\" valign=\"top\"");
if (BgColor)
fprintf (Gbl.F.Out," bgcolor=\"%s\"",BgColor);
fprintf (Gbl.F.Out,"><table cellspacing=\"0\" cellpadding=\"%u\" width=\"100%%\">",
CellPadding);
}
void Lay_EndSquareFrameTable (void)
{
fprintf (Gbl.F.Out,"</table>"
"</td>"
"</tr>"
"</table>"
"</div>");
}
/*****************************************************************************/ /*****************************************************************************/
/****************** Start and end a table with rounded frame *****************/ /****************** Start and end a table with rounded frame *****************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -87,8 +87,6 @@ void Lay_DisableIncompatibleTabs (void);
void Lay_PutFormToEdit (Act_Action_t Action); void Lay_PutFormToEdit (Act_Action_t Action);
void Lay_PutSendIcon (const char *Icon,const char *Alt,const char *Text); void Lay_PutSendIcon (const char *Icon,const char *Alt,const char *Text);
void Lay_PutSendButton (const char *TextSendButton); void Lay_PutSendButton (const char *TextSendButton);
void Lay_StartSquareFrameTable (const char *BorderColor,const char *BgColor,const char *Width,unsigned CellPadding);
void Lay_EndSquareFrameTable (void);
void Lay_StartRoundFrameTable10 (const char *Width,unsigned CellPadding,const char *Title); void Lay_StartRoundFrameTable10 (const char *Width,unsigned CellPadding,const char *Title);
void Lay_StartRoundFrameTable10Shadow (const char *Width,unsigned CellPadding); void Lay_StartRoundFrameTable10Shadow (const char *Width,unsigned CellPadding);
void Lay_EndRoundFrameTable10 (void); void Lay_EndRoundFrameTable10 (void);

View File

@ -1727,17 +1727,11 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
struct Date DateAvgPhoto; struct Date DateAvgPhoto;
bool TRIsOpen = false; bool TRIsOpen = false;
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,0,Txt_Degrees);
/***** Class photo start *****/ /***** Class photo start *****/
if (SeeOrPrint == Pho_DEGREES_SEE) Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,SeeOrPrint == Pho_DEGREES_PRINT,true,-1L,-1L,-1L);
{
Lay_StartRoundFrameTable10 (NULL,0,Txt_Degrees);
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true,-1L,-1L,-1L);
}
else
{
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0);
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,-1L,-1L,-1L);
}
/***** Get degrees from database *****/ /***** Get degrees from database *****/
Pho_BuildQueryOfDegrees (Query); Pho_BuildQueryOfDegrees (Query);
@ -1791,11 +1785,8 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
/***** Photos end *****/ /***** End frame *****/
if (SeeOrPrint == Pho_DEGREES_SEE) Lay_EndRoundFrameTable10 ();
Lay_EndRoundFrameTable10 ();
else
Lay_EndSquareFrameTable ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1490,12 +1490,9 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
Col2Width = RecordWidth - FrameWidth*2 - Col1Width; Col2Width = RecordWidth - FrameWidth*2 - Col1Width;
/***** Start table *****/ /***** Start frame *****/
sprintf (StrRecordWidth,"%upx",RecordWidth); sprintf (StrRecordWidth,"%upx",RecordWidth);
if (TypeOfView == Rec_RECORD_PRINT) Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
Lay_StartSquareFrameTable (DARK_BLUE,"white",StrRecordWidth,2);
else
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
/***** Header *****/ /***** Header *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -1585,11 +1582,8 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
} }
/***** End of table *****/ /***** End frame *****/
if (TypeOfView == Rec_RECORD_PRINT) Lay_EndRoundFrameTable10 ();
Lay_EndSquareFrameTable ();
else
Lay_EndRoundFrameTable10 ();
if (DataForm) if (DataForm)
{ {
@ -2106,12 +2100,9 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
Col2Width = Cols1and2Width - Col1Width; Col2Width = Cols1and2Width - Col1Width;
Cols2and3Width = Col2Width + Col3Width; Cols2and3Width = Col2Width + Col3Width;
/***** Start record frame *****/ /***** Start frame *****/
sprintf (StrRecordWidth,"%upx",RecordWidth); sprintf (StrRecordWidth,"%upx",RecordWidth);
if (TypeOfView == Rec_RECORD_PRINT) Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
Lay_StartSquareFrameTable (DARK_BLUE,"white",StrRecordWidth,2);
else
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
/***** Institution *****/ /***** Institution *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -2778,11 +2769,8 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
"</tr>"); "</tr>");
} }
/***** End of table *****/ /***** End frame *****/
if (TypeOfView == Rec_RECORD_PRINT) Lay_EndRoundFrameTable10 ();
Lay_EndSquareFrameTable ();
else
Lay_EndRoundFrameTable10 ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -225,8 +225,8 @@ void TT_ShowClassTimeTable (void)
Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER); Gbl.Usrs.Me.LoggedRole >= Rol_ROLE_TEACHER);
bool PutEditOfficeHours = (Gbl.CurrentAct == ActSeeMyTimTbl && bool PutEditOfficeHours = (Gbl.CurrentAct == ActSeeMyTimTbl &&
(Gbl.Usrs.Me.AvailableRoles & (1 << Rol_ROLE_TEACHER))); (Gbl.Usrs.Me.AvailableRoles & (1 << Rol_ROLE_TEACHER)));
bool PutPrintButton = (Gbl.CurrentAct == ActSeeCrsTimTbl || bool PrintView = (Gbl.CurrentAct == ActSeeCrsTimTbl ||
Gbl.CurrentAct == ActSeeMyTimTbl); Gbl.CurrentAct == ActSeeMyTimTbl);
/***** Get whether to show only my groups or all groups *****/ /***** Get whether to show only my groups or all groups *****/
Grp_GetParamWhichGrps (); Grp_GetParamWhichGrps ();
@ -245,7 +245,7 @@ void TT_ShowClassTimeTable (void)
} }
/***** Put buttons *****/ /***** Put buttons *****/
if (PutEditButton || PutEditOfficeHours || PutPrintButton) if (PutEditButton || PutEditOfficeHours || PrintView)
{ {
fprintf (Gbl.F.Out,"<div align=\"center\">"); fprintf (Gbl.F.Out,"<div align=\"center\">");
@ -266,7 +266,7 @@ void TT_ShowClassTimeTable (void)
fprintf (Gbl.F.Out,"</form>"); fprintf (Gbl.F.Out,"</form>");
} }
if (PutPrintButton) if (PrintView)
{ {
Lay_PutLinkToPrintView1 (Gbl.CurrentAct == ActSeeCrsTimTbl ? ActPrnCrsTimTbl : Lay_PutLinkToPrintView1 (Gbl.CurrentAct == ActSeeCrsTimTbl ? ActPrnCrsTimTbl :
ActPrnMyTimTbl); ActPrnMyTimTbl);
@ -276,37 +276,28 @@ void TT_ShowClassTimeTable (void)
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
switch (Gbl.CurrentAct) /***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,0,NULL);
/***** Start time table drawing *****/
if (TimeTableType == TT_COURSE_TIMETABLE)
Lay_WriteHeaderClassPhoto (1,PrintView,false,
Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod);
if (PrintView)
{ {
case ActSeeCrsTimTbl: /***** Select whether show only my groups or all groups *****/
case ActSeeMyTimTbl: fprintf (Gbl.F.Out,"<tr>"
/***** Start time table drawing *****/ "<td align=\"center\">");
Lay_StartRoundFrameTable10 ("98%",0,NULL); Act_FormStart (Gbl.CurrentAct);
if (TimeTableType == TT_COURSE_TIMETABLE) Grp_ShowSelectorWhichGrps ();
Lay_WriteHeaderClassPhoto (1,false,false, fprintf (Gbl.F.Out,"</form>"
Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod); "</td>"
"</tr>");
/***** Select whether show only my groups or all groups *****/
fprintf (Gbl.F.Out,"<tr>"
"<td align=\"center\">");
Act_FormStart (Gbl.CurrentAct);
Grp_ShowSelectorWhichGrps ();
fprintf (Gbl.F.Out,"</form>"
"</td>"
"</tr>");
break;
case ActPrnCrsTimTbl:
case ActPrnMyTimTbl:
/***** Start time table drawing *****/
Lay_StartSquareFrameTable (DARK_BLUE,"white","90%",0);
if (TimeTableType == TT_COURSE_TIMETABLE)
Lay_WriteHeaderClassPhoto (1,true,false,
Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod);
/***** Show whether only my groups or all groups are selected *****/
TT_ShowTimeTableGrpsSelected ();
break;
} }
else
/***** Show whether only my groups or all groups are selected *****/
TT_ShowTimeTableGrpsSelected ();
/***** Show the time table *****/ /***** Show the time table *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -315,18 +306,8 @@ void TT_ShowClassTimeTable (void)
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
/***** End of frame *****/ /***** End frame *****/
switch (Gbl.CurrentAct) Lay_EndRoundFrameTable10 ();
{
case ActSeeCrsTimTbl:
case ActSeeMyTimTbl:
Lay_EndRoundFrameTable10 ();
break;
case ActPrnCrsTimTbl:
case ActPrnMyTimTbl:
Lay_EndSquareFrameTable ();
break;
}
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -6902,13 +6902,11 @@ void Usr_ListAllDataGsts (void)
NumColumnsCommonCard = Usr_NUM_ALL_FIELDS_DATA_INV; NumColumnsCommonCard = Usr_NUM_ALL_FIELDS_DATA_INV;
/***** Start table with list of guests *****/ /***** Start table with list of guests *****/
Lay_StartSquareFrameTable (NULL,NULL,NULL,0);
/***** Heading row with column names *****/
/* Start row */ /* Start row */
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">"
"<tr>");
/* Columns fot the data */ /* Columns for the data */
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 : for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
1); 1);
NumCol < NumColumnsCommonCard; NumCol < NumColumnsCommonCard;
@ -6941,7 +6939,7 @@ void Usr_ListAllDataGsts (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
/***** End of table *****/ /***** End of table *****/
Lay_EndSquareFrameTable (); fprintf (Gbl.F.Out,"</table>");
} }
else // Gbl.Usrs.LstGsts.NumUsrs == 0 else // Gbl.Usrs.LstGsts.NumUsrs == 0
Usr_ShowWarningNoUsersFound (Rol_ROLE_GUEST); Usr_ShowWarningNoUsersFound (Rol_ROLE_GUEST);
@ -7036,7 +7034,7 @@ void Usr_ListAllDataStds (void)
Lay_ShowErrorAndExit ("Not enough memory to store names of groups."); Lay_ShowErrorAndExit ("Not enough memory to store names of groups.");
/***** Start table with list of students *****/ /***** Start table with list of students *****/
Lay_StartSquareFrameTable (NULL,NULL,NULL,0); fprintf (Gbl.F.Out,"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">");
if (!Gbl.Usrs.ClassPhoto.AllGroups) if (!Gbl.Usrs.ClassPhoto.AllGroups)
{ {
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
@ -7117,7 +7115,7 @@ void Usr_ListAllDataStds (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
/***** End of table *****/ /***** End of table *****/
Lay_EndSquareFrameTable (); fprintf (Gbl.F.Out,"</table>");
/***** Free memory used by the string with the list of group names where student belongs to *****/ /***** Free memory used by the string with the list of group names where student belongs to *****/
if (Gbl.Scope.Current == Sco_SCOPE_COURSE) if (Gbl.Scope.Current == Sco_SCOPE_COURSE)
@ -7263,11 +7261,9 @@ void Usr_ListAllDataTchs (void)
NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH; NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH;
/***** Start table with list of teachers *****/ /***** Start table with list of teachers *****/
Lay_StartSquareFrameTable (NULL,NULL,NULL,0);
/***** Heading row with column names *****/
/* Start row */ /* Start row */
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">"
"<tr>");
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 : for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
1); 1);
NumCol < NumColumns; NumCol < NumColumns;
@ -7298,7 +7294,7 @@ void Usr_ListAllDataTchs (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
/***** End of table *****/ /***** End of table *****/
Lay_EndSquareFrameTable (); fprintf (Gbl.F.Out,"</table>");
} }
else // Gbl.Usrs.LstTchs.NumUsrs == 0 else // Gbl.Usrs.LstTchs.NumUsrs == 0
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_ROLE_TEACHER]); Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_ROLE_TEACHER]);
@ -8336,14 +8332,14 @@ void Usr_SeeGstClassPhotoPrn (void)
if (Gbl.Usrs.LstGsts.NumUsrs) if (Gbl.Usrs.LstGsts.NumUsrs)
{ {
/***** Draw the guests' class photo *****/ /***** Draw the guests' class photo *****/
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0); Lay_StartRoundFrameTable10 (NULL,0,NULL);
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true, Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,
(Gbl.Scope.Current == Sco_SCOPE_CENTRE || (Gbl.Scope.Current == Sco_SCOPE_CENTRE ||
Gbl.Scope.Current == Sco_SCOPE_INSTITUTION) ? Gbl.CurrentIns.Ins.InsCod : Gbl.Scope.Current == Sco_SCOPE_INSTITUTION) ? Gbl.CurrentIns.Ins.InsCod :
-1L, -1L,
-1L,-1L); -1L,-1L);
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_GUEST); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_GUEST);
Lay_EndSquareFrameTable (); Lay_EndRoundFrameTable10 ();
} }
else else
Usr_ShowWarningNoUsersFound (Rol_ROLE_GUEST); Usr_ShowWarningNoUsersFound (Rol_ROLE_GUEST);
@ -8376,7 +8372,7 @@ void Usr_SeeStdClassPhotoPrn (void)
if (Gbl.Usrs.LstStds.NumUsrs) if (Gbl.Usrs.LstStds.NumUsrs)
{ {
/***** Draw the students' class photo *****/ /***** Draw the students' class photo *****/
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0); Lay_StartRoundFrameTable10 (NULL,0,NULL);
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true, Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,
(Gbl.Scope.Current == Sco_SCOPE_COURSE || (Gbl.Scope.Current == Sco_SCOPE_COURSE ||
Gbl.Scope.Current == Sco_SCOPE_DEGREE || Gbl.Scope.Current == Sco_SCOPE_DEGREE ||
@ -8389,7 +8385,7 @@ void Usr_SeeStdClassPhotoPrn (void)
Gbl.Scope.Current == Sco_SCOPE_COURSE ? Gbl.CurrentCrs.Crs.CrsCod : Gbl.Scope.Current == Sco_SCOPE_COURSE ? Gbl.CurrentCrs.Crs.CrsCod :
-1L); -1L);
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_STUDENT); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_STUDENT);
Lay_EndSquareFrameTable (); Lay_EndRoundFrameTable10 ();
} }
else else
Usr_ShowWarningNoUsersFound (Rol_ROLE_STUDENT); Usr_ShowWarningNoUsersFound (Rol_ROLE_STUDENT);
@ -8430,7 +8426,7 @@ void Usr_SeeTchClassPhotoPrn (void)
if (Gbl.Usrs.LstTchs.NumUsrs) if (Gbl.Usrs.LstTchs.NumUsrs)
{ {
/***** Draw the teachers' class photo *****/ /***** Draw the teachers' class photo *****/
Lay_StartSquareFrameTable (DARK_BLUE,"white",NULL,0); Lay_StartRoundFrameTable10 (NULL,0,NULL);
Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true, Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,true,true,
(Gbl.Scope.Current == Sco_SCOPE_COURSE || (Gbl.Scope.Current == Sco_SCOPE_COURSE ||
Gbl.Scope.Current == Sco_SCOPE_DEGREE || Gbl.Scope.Current == Sco_SCOPE_DEGREE ||
@ -8443,7 +8439,7 @@ void Usr_SeeTchClassPhotoPrn (void)
Gbl.Scope.Current == Sco_SCOPE_COURSE ? Gbl.CurrentCrs.Crs.CrsCod : Gbl.Scope.Current == Sco_SCOPE_COURSE ? Gbl.CurrentCrs.Crs.CrsCod :
-1L); -1L);
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_TEACHER); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_ROLE_TEACHER);
Lay_EndSquareFrameTable (); Lay_EndRoundFrameTable10 ();
} }
else else
Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_ROLE_TEACHER]); Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_ROLE_TEACHER]);