diff --git a/swad_changelog.h b/swad_changelog.h
index a6d7d1f74..2689e8d21 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 19.31.27 (2019-10-08)"
+#define Log_PLATFORM_VERSION "SWAD 19.31.28 (2019-10-08)"
#define CSS_FILE "swad19.29.css"
#define JS_FILE "swad19.30.js"
/*
@@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
+ Version 19.31.28: Oct 08, 2019 Code refactoring in HTML tables. (246783 lines)
Version 19.31.27: Oct 08, 2019 Code refactoring in HTML tables. (246823 lines)
Version 19.31.26: Oct 08, 2019 Code refactoring in HTML tables. (246850 lines)
Version 19.31.25: Oct 08, 2019 Code refactoring in HTML tables. (246872 lines)
diff --git a/swad_info.c b/swad_info.c
index 1735854b2..f81e1f68d 100644
--- a/swad_info.c
+++ b/swad_info.c
@@ -1134,12 +1134,13 @@ void Inf_FormsToSelSendInfo (void)
InfoSrc < Inf_NUM_INFO_SOURCES;
InfoSrc++)
{
- /* Select info source */
Tbl_StartRow ();
- fprintf (Gbl.F.Out,"
");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_TOP LIGHT_BLUE\"");
+ else
+ Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
Frm_StartForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]);
fprintf (Gbl.F.Out," ",
- BgColor);
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE %s\"",BgColor);
Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeCtr,
"DAT_NOBR","CENTER_MIDDLE");
Tbl_EndCell ();
/* Number of pending centres (row[1]) */
- fprintf (Gbl.F.Out," "
- "%s",
- BgColor,row[1]);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor);
+ fprintf (Gbl.F.Out,"%s",row[1]);
Tbl_EndCell ();
Tbl_EndRow ();
@@ -359,13 +357,13 @@ static void Ins_Configuration (bool PrintView)
/***** Country *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Country);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
if (!PrintView &&
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
// Only system admins can move an institution to another country
@@ -402,13 +400,13 @@ static void Ins_Configuration (bool PrintView)
/***** Institution full name *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Institution);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT_N LEFT_MIDDLE\"");
if (!PrintView &&
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
// Only system admins can edit institution full name
@@ -434,13 +432,13 @@ static void Ins_Configuration (bool PrintView)
/***** Institution short name *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Short_name);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT_N LEFT_MIDDLE\"");
if (!PrintView &&
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
// Only system admins can edit institution short name
@@ -466,13 +464,13 @@ static void Ins_Configuration (bool PrintView)
/***** Institution WWW *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+ Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Web);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
if (!PrintView &&
Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM)
// Only institution admins and system admins
@@ -504,14 +502,12 @@ static void Ins_Configuration (bool PrintView)
/***** Shortcut to the institution *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Shortcut);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Shortcut);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- ""
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out," "
"%s/%s?ins=%ld"
" ",
Cfg_URL_SWAD_CGI,
@@ -529,13 +525,11 @@ static void Ins_Configuration (bool PrintView)
/***** QR code with link to the institution *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_QR_code);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_QR_code);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
QR_LinkTo (250,"ins",Gbl.Hierarchy.Ins.InsCod);
Tbl_EndCell ();
@@ -546,29 +540,24 @@ static void Ins_Configuration (bool PrintView)
/***** Number of users who claim to belong to this institution *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Users_of_the_institution);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Users_of_the_institution);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%u",
- Usr_GetNumUsrsWhoClaimToBelongToIns (Gbl.Hierarchy.Ins.InsCod));
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Usr_GetNumUsrsWhoClaimToBelongToIns (Gbl.Hierarchy.Ins.InsCod));
Tbl_EndCell ();
Tbl_EndRow ();
Tbl_StartRow ();
/***** Number of centres *****/
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Centres);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Centres);
Tbl_EndCell ();
/* Form to go to see centres of this institution */
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartFormGoTo (ActSeeCtr);
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
snprintf (Gbl.Title,sizeof (Gbl.Title),
@@ -585,15 +574,12 @@ static void Ins_Configuration (bool PrintView)
/***** Number of degrees *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Degrees);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Degrees);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%u",
- Deg_GetNumDegsInIns (Gbl.Hierarchy.Ins.InsCod));
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Deg_GetNumDegsInIns (Gbl.Hierarchy.Ins.InsCod));
Tbl_EndCell ();
Tbl_EndRow ();
@@ -601,15 +587,12 @@ static void Ins_Configuration (bool PrintView)
/***** Number of courses *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Courses);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Courses);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%u",
- Crs_GetNumCrssInIns (Gbl.Hierarchy.Ins.InsCod));
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Crs_GetNumCrssInIns (Gbl.Hierarchy.Ins.InsCod));
Tbl_EndCell ();
Tbl_EndRow ();
@@ -617,15 +600,12 @@ static void Ins_Configuration (bool PrintView)
/***** Number of departments *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
- Txt_Departments);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",Txt_Departments);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%u",
- Dpt_GetNumDepartmentsInInstitution (Gbl.Hierarchy.Ins.InsCod));
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Dpt_GetNumDepartmentsInInstitution (Gbl.Hierarchy.Ins.InsCod));
Tbl_EndCell ();
Tbl_EndRow ();
@@ -673,16 +653,14 @@ static void Ins_ShowNumUsrsInCrssOfIns (Rol_Role_t Role)
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s:",
- The_ClassFormInBox[Gbl.Prefs.Theme],
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ fprintf (Gbl.F.Out,"%s:",
(Role == Rol_UNK) ? Txt_Users_in_courses :
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%u",
- Usr_GetNumUsrsInCrssOfIns (Role,Gbl.Hierarchy.Ins.InsCod));
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Usr_GetNumUsrsInCrssOfIns (Role,Gbl.Hierarchy.Ins.InsCod));
Tbl_EndCell ();
Tbl_EndRow ();
@@ -824,59 +802,50 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns)
Tbl_StartRow ();
/***** Number of institution in this list *****/
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,
- NumIns);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",NumIns);
Tbl_EndCell ();
/***** Institution logo and name *****/
- fprintf (Gbl.F.Out," ",BgColor);
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE %s\"",BgColor);
Ins_DrawInstitutionLogoAndNameWithLink (Ins,ActSeeCtr,
TxtClassStrong,"CENTER_MIDDLE");
Tbl_EndCell ();
/***** Stats *****/
/* Number of users who claim to belong to this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,Ins->NumUsrsWhoClaimToBelongToIns);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",Ins->NumUsrsWhoClaimToBelongToIns);
Tbl_EndCell ();
/* Number of centres in this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,Ins->Ctrs.Num);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",Ins->Ctrs.Num);
Tbl_EndCell ();
/* Number of degrees in this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,Ins->NumDegs);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",Ins->NumDegs);
Tbl_EndCell ();
/* Number of courses in this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,Ins->NumCrss);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",Ins->NumCrss);
Tbl_EndCell ();
/* Number of departments in this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,Ins->NumDpts);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",Ins->NumDpts);
Tbl_EndCell ();
/* Number of users in courses of this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- TxtClassNormal,BgColor,Ins->NumUsrs);
+ Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE %s\"",TxtClassNormal,BgColor);
+ fprintf (Gbl.F.Out,"%u",Ins->NumUsrs);
Tbl_EndCell ();
/***** Institution status *****/
StatusTxt = Ins_GetStatusTxtFromStatusBits (Ins->Status);
- fprintf (Gbl.F.Out," ",
- TxtClassNormal,BgColor);
+ Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE %s\"",TxtClassNormal,BgColor);
if (StatusTxt != Ins_STATUS_ACTIVE) // If active ==> do not show anything
fprintf (Gbl.F.Out,"%s",Txt_INSTITUTION_STATUS[StatusTxt]);
Tbl_EndCell ();
@@ -1516,9 +1485,10 @@ static void Ins_ListInstitutionsForEdition (void)
ICanEdit = Ins_CheckIfICanEdit (Ins);
- /* Put icon to remove institution */
Tbl_StartRow ();
- fprintf (Gbl.F.Out," ");
+
+ /* Put icon to remove institution */
+ Tbl_StartCellAttr ("class=\"BM\">");
if (Ins->Ctrs.Num ||
Ins->NumUsrsWhoClaimToBelongToIns ||
Ins->NumUsrs || // Institution has centres or users ==> deletion forbidden
@@ -1534,20 +1504,18 @@ static void Ins_ListInstitutionsForEdition (void)
Tbl_EndCell ();
/* Institution code */
- fprintf (Gbl.F.Out," "
- "%ld",
- Ins->InsCod);
+ Tbl_StartCellAttr ("class=\"DAT CODE\"");
+ fprintf (Gbl.F.Out,"%ld",Ins->InsCod);
Tbl_EndCell ();
/* Institution logo */
- fprintf (Gbl.F.Out," ",
- Ins->FullName);
+ Tbl_StartCellAttr ("title=\"%s\" class=\"LEFT_MIDDLE\" style=\"width:25px;\"",
+ Ins->FullName);
Log_DrawLogo (Hie_INS,Ins->InsCod,Ins->ShrtName,20,NULL,true);
Tbl_EndCell ();
/* Institution short name */
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
if (ICanEdit)
{
Frm_StartForm (ActRenInsSho);
@@ -1565,7 +1533,7 @@ static void Ins_ListInstitutionsForEdition (void)
Tbl_EndCell ();
/* Institution full name */
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
if (ICanEdit)
{
Frm_StartForm (ActRenInsFul);
@@ -1584,7 +1552,7 @@ static void Ins_ListInstitutionsForEdition (void)
Tbl_EndCell ();
/* Institution WWW */
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
if (ICanEdit)
{
Frm_StartForm (ActChgInsWWW);
@@ -1614,33 +1582,30 @@ static void Ins_ListInstitutionsForEdition (void)
Tbl_EndCell ();
/* Number of users who claim to belong to this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- Ins->NumUsrsWhoClaimToBelongToIns);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Ins->NumUsrsWhoClaimToBelongToIns);
Tbl_EndCell ();
/* Number of centres */
- fprintf (Gbl.F.Out," "
- "%u",
- Ins->Ctrs.Num);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Ins->Ctrs.Num);
Tbl_EndCell ();
/* Number of users in courses of this institution */
- fprintf (Gbl.F.Out," "
- "%u",
- Ins->NumUsrs);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Ins->NumUsrs);
Tbl_EndCell ();
/* Institution requester */
UsrDat.UsrCod = Ins->RequesterUsrCod;
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS);
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT INPUT_REQUESTER LEFT_TOP\"");
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
Tbl_EndCell ();
/* Institution status */
StatusTxt = Ins_GetStatusTxtFromStatusBits (Ins->Status);
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM &&
StatusTxt == Ins_STATUS_PENDING)
{
@@ -2276,21 +2241,21 @@ static void Ins_PutFormToCreateInstitution (void)
Tbl_StartRow ();
/***** Column to remove institution, disabled here *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"BM\"");
Tbl_EndCell ();
/***** Institution code *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CODE\"");
Tbl_EndCell ();
/***** Institution logo *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:25px;\"");
Log_DrawLogo (Hie_INS,-1L,"",20,NULL,true);
Tbl_EndCell ();
/***** Institution short name *****/
- fprintf (Gbl.F.Out," "
- " ",
@@ -2298,8 +2263,8 @@ static void Ins_PutFormToCreateInstitution (void)
Tbl_EndCell ();
/***** Institution full name *****/
- fprintf (Gbl.F.Out," "
- " ",
@@ -2307,8 +2272,8 @@ static void Ins_PutFormToCreateInstitution (void)
Tbl_EndCell ();
/***** Institution WWW *****/
- fprintf (Gbl.F.Out," "
- " ",
@@ -2316,27 +2281,27 @@ static void Ins_PutFormToCreateInstitution (void)
Tbl_EndCell ();
/***** Number of users who claim to belong to this institution ****/
- fprintf (Gbl.F.Out," "
- "0");
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"0");
Tbl_EndCell ();
/***** Number of centres *****/
- fprintf (Gbl.F.Out," "
- "0");
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"0");
Tbl_EndCell ();
/***** Number of users in courses of this institution ****/
- fprintf (Gbl.F.Out," "
- "0");
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"0");
Tbl_EndCell ();
/***** Institution requester *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT INPUT_REQUESTER LEFT_TOP\"");
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
Tbl_EndCell ();
/***** Institution status *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
Tbl_EndCell ();
Tbl_EndRow ();
diff --git a/swad_layout.c b/swad_layout.c
index 0b3370e1c..1b75b2648 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -1620,7 +1620,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
Tbl_StartRow ();
/***** First column: institution logo *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"LEFT_TOP\" style=\"width:80px;\"");
if (InsCod > 0)
{
if (!PrintView)
@@ -1632,7 +1632,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
Tbl_EndCell ();
/***** Second column: class photo title *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CLASSPHOTO_TITLE CENTER_MIDDLE\"");
if (InsCod > 0)
{
if (!PrintView)
@@ -1668,7 +1668,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
Tbl_EndCell ();
/***** Third column: degree logo *****/
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"RIGHT_TOP\" style=\"width:80px;\"");
if (DegCod > 0)
{
if (!PrintView)
@@ -1706,8 +1706,8 @@ void Lay_AdvertisementMobile (void)
/***** Show advertisement *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- ""
"%s "
" ");
+
+ /* Put icon to remove link */
+ Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartForm (ActRemLnk);
Lnk_PutParamLnkCod (Lnk->LnkCod);
Ico_PutIconRemove ();
@@ -432,13 +433,12 @@ static void Lnk_ListLinksForEdition (void)
Tbl_EndCell ();
/* Link code */
- fprintf (Gbl.F.Out," "
- "%ld",
- Lnk->LnkCod);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%ld",Lnk->LnkCod);
Tbl_EndCell ();
/* Link short name */
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActRenLnkSho);
Lnk_PutParamLnkCod (Lnk->LnkCod);
fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActRenLnkFul);
Lnk_PutParamLnkCod (Lnk->LnkCod);
fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActChgLnkWWW);
Lnk_PutParamLnkCod (Lnk->LnkCod);
fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"BM\"");
Tbl_EndCell ();
Tbl_PutEmptyCells (1);
/***** Link short name *****/
- fprintf (Gbl.F.Out," "
- " ",
@@ -763,8 +764,8 @@ static void Lnk_PutFormToCreateLink (void)
Tbl_EndCell ();
/***** Link full name *****/
- fprintf (Gbl.F.Out," "
- " ",
@@ -772,8 +773,8 @@ static void Lnk_PutFormToCreateLink (void)
Tbl_EndCell ();
/***** Link WWW *****/
- fprintf (Gbl.F.Out," "
- " ",
diff --git a/swad_mail.c b/swad_mail.c
index 11686ce60..e61a72214 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -156,19 +156,16 @@ void Mai_SeeMailDomains (void)
/* Write data of this mail domain */
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s",
- Gbl.Mails.Lst[NumMai].Domain);
+ Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
+ fprintf (Gbl.F.Out,"%s",Gbl.Mails.Lst[NumMai].Domain);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%s",
- Gbl.Mails.Lst[NumMai].Info);
+ Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
+ fprintf (Gbl.F.Out,"%s",Gbl.Mails.Lst[NumMai].Info);
Tbl_EndCell ();
- fprintf (Gbl.F.Out," "
- "%u",
- Gbl.Mails.Lst[NumMai].NumUsrs);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP\"");
+ fprintf (Gbl.F.Out,"%u",Gbl.Mails.Lst[NumMai].NumUsrs);
Tbl_EndCell ();
Tbl_EndRow ();
@@ -488,9 +485,10 @@ static void Mai_ListMailDomainsForEdition (void)
{
Mai = &Gbl.Mails.Lst[NumMai];
- /* Put icon to remove mail */
Tbl_StartRow ();
- fprintf (Gbl.F.Out," ");
+
+ /* Put icon to remove mail */
+ Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartForm (ActRemMai);
Mai_PutParamMaiCod (Mai->MaiCod);
Ico_PutIconRemove ();
@@ -498,13 +496,12 @@ static void Mai_ListMailDomainsForEdition (void)
Tbl_EndCell ();
/* Mail code */
- fprintf (Gbl.F.Out," "
- "%ld",
- Mai->MaiCod);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%ld",Mai->MaiCod);
Tbl_EndCell ();
/* Mail domain */
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActRenMaiSho);
Mai_PutParamMaiCod (Mai->MaiCod);
fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
Frm_StartForm (ActRenMaiFul);
Mai_PutParamMaiCod (Mai->MaiCod);
fprintf (Gbl.F.Out," "
- "%u",
- Mai->NumUsrs);
+ Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
+ fprintf (Gbl.F.Out,"%u",Mai->NumUsrs);
Tbl_EndCell ();
Tbl_EndRow ();
@@ -770,16 +766,16 @@ static void Mai_PutFormToCreateMailDomain (void)
Tbl_StartRow ();
/***** Mail domain *****/
- fprintf (Gbl.F.Out," "
- " ",
Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain);
Tbl_EndCell ();
/***** Mail domain info *****/
- fprintf (Gbl.F.Out," "
- " ",
Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info);
@@ -1278,36 +1274,36 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
row = mysql_fetch_row (mysql_res);
Confirmed = (row[1][0] == 'Y');
+ Tbl_StartRow ();
+
if (NumEmail == 1)
{
/* The first mail is the current one */
- Tbl_StartRow ();
-
- fprintf (Gbl.F.Out," "
- ""
+ Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
+ fprintf (Gbl.F.Out,""
"%s:"
" ",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Current_email);
Tbl_EndCell ();
- fprintf (Gbl.F.Out,"");
+ Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP USR_ID\"");
}
else // NumEmail >= 2
{
- Tbl_StartRow ();
-
if (NumEmail == 2)
- fprintf (Gbl.F.Out," "
- ""
+ {
+ Tbl_StartCellAttr ("rowspan=\"%u\" class=\"REC_C1_BOT RIGHT_TOP\"",
+ NumEmails - 1);
+ fprintf (Gbl.F.Out,""
"%s:"
" ",
- NumEmails - 1,
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Other_emails);
- Tbl_EndCell ();
+ Tbl_EndCell ();
+ }
- fprintf (Gbl.F.Out,"");
+ Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP DAT\"");
}
/* Form to remove email */
@@ -1392,14 +1388,14 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
/***** Form to enter new email *****/
Tbl_StartRow ();
- fprintf (Gbl.F.Out," "
- "%s: ",
+ Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
+ fprintf (Gbl.F.Out,"%s: ",
The_ClassFormInBox[Gbl.Prefs.Theme],
NumEmails ? Txt_New_email : // A new email
Txt_Email); // The first email
Tbl_EndCell ();
- fprintf (Gbl.F.Out," ");
+ Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP DAT\"");
if (ItsMe)
Frm_StartFormAnchor (ActChgMyMai,Mai_EMAIL_SECTION_ID);
else
diff --git a/swad_mark.c b/swad_mark.c
index 1cacb99bd..f7c27fda0 100644
--- a/swad_mark.c
+++ b/swad_mark.c
@@ -121,7 +121,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
Mrk_GetNumRowsHeaderAndFooter (&Marks);
/***** Write the number of rows of header *****/
- fprintf (Gbl.F.Out," ",
+ Tbl_StartCellAttr ("class=\"%s RIGHT_TOP COLOR%u\"",
The_ClassFormInBoxNoWrap[Gbl.Prefs.Theme],
Gbl.RowEvenOdd);
Frm_StartForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowHeaGrp : // Group zone
@@ -141,7 +141,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
Tbl_EndCell ();
/***** Write the number of rows of footer *****/
- fprintf (Gbl.F.Out," ",
+ Tbl_StartCellAttr ("class=\"%s RIGHT_TOP COLOR%u\"",
The_ClassFormInBoxNoWrap[Gbl.Prefs.Theme],
Gbl.RowEvenOdd);
Frm_StartForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowFooGrp : // Group zone