diff --git a/swad_account.c b/swad_account.c
index 1ac4164c..213108b6 100644
--- a/swad_account.c
+++ b/swad_account.c
@@ -279,17 +279,16 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
/***** Write number of user in the list *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out,"
"
- "%u",
- Gbl.RowEvenOdd,NumUsr);
+
+ Tbl_StartCellAttr ("rowspan=\"2\" class=\"USR_LIST_NUM_N RIGHT_TOP COLOR%u\"",
+ Gbl.RowEvenOdd);
+ fprintf (Gbl.F.Out,"%u",NumUsr);
Tbl_EndCell ();
/***** Write user's ID and name *****/
- fprintf (Gbl.F.Out," "
- "%s: %s "
+ Tbl_StartCellAttr ("class=\"DAT_N LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
+ fprintf (Gbl.F.Out,"%s: %s "
"%s: ",
- Gbl.RowEvenOdd,
Txt_ID,ID,
Txt_Name);
if (UsrDat->FullName[0])
@@ -299,24 +298,24 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
Tbl_EndCell ();
/***** Button to login with this account *****/
- fprintf (Gbl.F.Out," ",
- Gbl.RowEvenOdd);
+ Tbl_StartCellAttr ("class=\"RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Frm_StartForm (ActLogInNew);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Btn_PutCreateButtonInline (Txt_Its_me);
Frm_EndForm ();
Tbl_EndCell ();
+
Tbl_EndRow ();
+ Tbl_StartRow ();
/***** Courses of this user *****/
- Tbl_StartRow ();
- fprintf (Gbl.F.Out," ",
- Gbl.RowEvenOdd);
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
UsrDat->Sex = Usr_SEX_UNKNOWN;
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
@@ -368,13 +367,15 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
else
NewNicknameWithArroba[0] = '\0';
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Nickname);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- " ",
@@ -382,17 +383,20 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
Txt_HELP_nickname,
NewNicknameWithArroba);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Email *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Email);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- " ",
@@ -400,6 +404,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
Txt_HELP_email,
NewEmail);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Password *****/
diff --git a/swad_agenda.c b/swad_agenda.c
index 745aa038..ecc39c85 100644
--- a/swad_agenda.c
+++ b/swad_agenda.c
@@ -748,36 +748,34 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
StartEndTime++)
{
- fprintf (Gbl.F.Out," "
- "",
(unsigned) StartEndTime,UniqueId,
- AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] :
- Dat_TimeStatusClassVisible[AgdEvent.TimeStatus],
- Gbl.RowEvenOdd,
- (unsigned) StartEndTime,UniqueId,
AgdEvent.TimeUTC[StartEndTime],
(unsigned) Gbl.Prefs.DateFormat,Txt_Today);
Tbl_EndCell ();
}
/* Event */
- fprintf (Gbl.F.Out," ",
- AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
- "ASG_TITLE",
- Gbl.RowEvenOdd);
+ Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\"",
+ AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
+ "ASG_TITLE",
+ Gbl.RowEvenOdd);
Lay_StartArticle (Anchor);
fprintf (Gbl.F.Out,"%s",AgdEvent.Event);
Lay_EndArticle ();
Tbl_EndCell ();
/* Location */
- fprintf (Gbl.F.Out," "
- "%s
",
- Gbl.RowEvenOdd,
+ Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
+ fprintf (Gbl.F.Out,"%s
",
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
"ASG_TITLE",
AgdEvent.Location);
@@ -787,20 +785,18 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
/***** Write second row of data of this event *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," ",
- Gbl.RowEvenOdd);
- /* Forms to remove/edit this event */
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
switch (AgendaType)
{
case Agd_MY_AGENDA_TODAY:
case Agd_MY_AGENDA:
+ /* Forms to remove/edit this event */
Agd_PutFormsToRemEditOneEvent (&AgdEvent,Anchor);
break;
default:
break;
}
-
Tbl_EndCell ();
/* Text of the event */
@@ -808,13 +804,14 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
- fprintf (Gbl.F.Out," "
- "%s
",
- Gbl.RowEvenOdd,
+
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
+ fprintf (Gbl.F.Out,"%s
",
AgdEvent.Hidden ? "DAT_LIGHT" :
"DAT",
Txt);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Free anchor string *****/
@@ -1503,32 +1500,38 @@ void Agd_RequestCreatOrEditEvent (void)
/***** Event *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Event);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- " ",
Agd_MAX_CHARS_EVENT,AgdEvent.Event);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Location *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Location);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- " ",
Agd_MAX_CHARS_LOCATION,AgdEvent.Location);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Start and end dates *****/
@@ -1537,18 +1540,21 @@ void Agd_RequestCreatOrEditEvent (void)
/***** Text *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Description);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "");
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table, send button and end box *****/
diff --git a/swad_announcement.c b/swad_announcement.c
index 2470fd16..956dda19 100644
--- a/swad_announcement.c
+++ b/swad_announcement.c
@@ -414,12 +414,12 @@ void Ann_ShowFormAnnouncement (void)
/***** Users' roles who can view the announcement *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Users);
+
+ Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s: ",Txt_Users);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+
+ Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
Rol_WriteSelectorRoles (1 << Rol_UNK |
1 << Rol_GST |
1 << Rol_STD |
@@ -432,6 +432,7 @@ void Ann_ShowFormAnnouncement (void)
1 << Rol_TCH,
false,false);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** End table, send button and end box *****/
@@ -451,16 +452,19 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label,
extern const char *The_ClassFormInBox[The_NUM_THEMES];
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
+ fprintf (Gbl.F.Out,"%s: ",
Field,The_ClassFormInBox[Gbl.Prefs.Theme],Label);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "",
Field,Field,Rows);
Tbl_EndCell ();
+
Tbl_EndRow ();
}
diff --git a/swad_assignment.c b/swad_assignment.c
index 6e97589f..bc7596d1 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -358,12 +358,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
/***** Write first row of data of this assignment *****/
/* Forms to remove/edit this assignment */
Tbl_StartRow ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
else
{
- fprintf (Gbl.F.Out," COLOR%u\">",Gbl.RowEvenOdd);
+ Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
Asg_PutFormsToRemEditOneAsg (&Asg,Anchor);
}
Tbl_EndCell ();
@@ -375,16 +375,22 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
StartEndTime++)
{
- fprintf (Gbl.F.Out," "
- "",
@@ -394,37 +400,40 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
}
/* Assignment title */
- fprintf (Gbl.F.Out," ");
+ if (PrintView)
+ Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",
+ Asg.Hidden ? "ASG_TITLE_LIGHT" :
+ "ASG_TITLE");
+ else
+ Tbl_StartCellAttr ("class=\"%s LEFT_TOP COLOR%u\"",
+ Asg.Hidden ? "ASG_TITLE_LIGHT" :
+ "ASG_TITLE",
+ Gbl.RowEvenOdd);
Lay_StartArticle (Anchor);
fprintf (Gbl.F.Out,"%s",Asg.Title);
Lay_EndArticle ();
Tbl_EndCell ();
/* Assignment folder */
- fprintf (Gbl.F.Out," ");
if (Asg.SendWork == Asg_SEND_WORK)
Asg_WriteAssignmentFolder (&Asg,PrintView);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Write second row of data of this assignment *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," ");
/* Author of the assignment */
+ if (PrintView)
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
+ else
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Asg_WriteAsgAuthor (&Asg);
-
Tbl_EndCell ();
/* Text of the assignment */
@@ -432,19 +441,18 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
- fprintf (Gbl.F.Out," ");
-
+ if (PrintView)
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
+ else
+ Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
if (Gbl.Crs.Grps.NumGrps)
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
-
fprintf (Gbl.F.Out,"%s
",
Asg.Hidden ? "DAT_LIGHT" :
"DAT",
Txt);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Free anchor string *****/
@@ -1159,16 +1167,19 @@ void Asg_RequestCreatOrEditAsg (void)
/***** Assignment title *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- " ",
Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Assignment start and end dates *****/
@@ -1176,34 +1187,38 @@ void Asg_RequestCreatOrEditAsg (void)
/***** Send work? *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Upload_files_QUESTION);
+
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Upload_files_QUESTION);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%s:"
+
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s:"
" "
" ",
Txt_Folder,
Brw_MAX_CHARS_FOLDER,Asg.Folder);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Assignment text *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out,""
- "%s: ",
+
+ Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Description);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "");
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Groups *****/
@@ -1241,19 +1256,20 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
{
/***** Start box and table *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Groups);
+
+ Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Groups);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+
+ Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
Box_StartBoxTable ("100%",NULL,NULL,
Hlp_USERS_Groups,Box_NOT_CLOSABLE,0);
/***** First row: checkbox to select the whole course *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- ""
+
+ Tbl_StartCellAttr ("colspan=\"7\" class=\"DAT LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,""
" ",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** List the groups for each group type *****/
@@ -1275,6 +1292,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
/***** End table and box *****/
Box_EndBoxTable ();
Tbl_EndCell ();
+
Tbl_EndRow ();
}
diff --git a/swad_attendance.c b/swad_attendance.c
index fa54185b..f4ae8051 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -388,10 +388,11 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
/***** Write first row of data of this attendance event *****/
/* Forms to remove/edit this attendance event */
Tbl_StartRow ();
- fprintf (Gbl.F.Out,"");
+
+ if (ShowOnlyThisAttEventComplete)
+ Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL\"");
+ else
+ Tbl_StartCellAttr ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
switch (Gbl.Usrs.Me.Role.Logged)
{
case Rol_TCH:
@@ -417,8 +418,8 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
"DATE_RED"));
if (!ShowOnlyThisAttEventComplete)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
- fprintf (Gbl.F.Out,"\">"
- "",
@@ -454,6 +455,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
/***** Write second row of data of this attendance event *****/
Tbl_StartRow ();
+
fprintf (Gbl.F.Out," "
- "%s: ",
+
+ fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- " ");
+ fprintf (Gbl.F.Out," ",
Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title);
Tbl_EndCell ();
+
Tbl_EndRow ();
/***** Assignment start and end dates *****/
@@ -1113,13 +1120,14 @@ void Att_RequestCreatOrEditAttEvent (void)
/***** Visibility of comments *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+
+ fprintf (Gbl.F.Out," ");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Teachers_comment);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "");
+ fprintf (Gbl.F.Out,"");
+ fprintf (Gbl.F.Out,"");
fprintf (Gbl.F.Out,""
- "%s: ",
+
+ fprintf (Gbl.F.Out,"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Description);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "