From 470331d39c86232b193b4b565ad7f6c3324ce35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 9 Oct 2019 21:05:58 +0200 Subject: [PATCH] Version19.31.31 --- swad_changelog.h | 3 +- swad_place.c | 74 +++---- swad_plugin.c | 58 ++--- swad_privacy.c | 7 +- swad_profile.c | 30 ++- swad_project.c | 540 ++++++++++++++++++++++++++--------------------- swad_record.c | 10 +- 7 files changed, 380 insertions(+), 342 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index a206d9585..d70daa21a 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.30 (2019-10-08)" +#define Log_PLATFORM_VERSION "SWAD 19.31.31 (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.31: Oct 08, 2019 Code refactoring in HTML tables. (246762 lines) Version 19.31.30: Oct 08, 2019 Code refactoring in HTML tables. (246731 lines) Version 19.31.29: Oct 08, 2019 Code refactoring in HTML tables. (246740 lines) Version 19.31.28: Oct 08, 2019 Code refactoring in HTML tables. (246783 lines) diff --git a/swad_place.c b/swad_place.c index 8f87f38e5..95e24fef9 100644 --- a/swad_place.c +++ b/swad_place.c @@ -142,14 +142,12 @@ void Plc_SeePlaces (void) /* Write data of this place */ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s", - Gbl.Plcs.Lst[NumPlc].FullName); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",Gbl.Plcs.Lst[NumPlc].FullName); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Gbl.Plcs.Lst[NumPlc].NumCtrs); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Gbl.Plcs.Lst[NumPlc].NumCtrs); Tbl_EndCell (); Tbl_EndRow (); @@ -158,8 +156,8 @@ void Plc_SeePlaces (void) /***** Separation row *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - " "); + Tbl_StartCellAttr ("colspan=\"2\" class=\"DAT\""); + fprintf (Gbl.F.Out," "); Tbl_EndCell (); Tbl_EndRow (); @@ -167,14 +165,12 @@ void Plc_SeePlaces (void) NumCtrsInOtherPlcs = Ctr_GetNumCtrsInPlc (0); Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s", - Txt_Other_places); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",Txt_Other_places); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - NumCtrsInOtherPlcs); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",NumCtrsInOtherPlcs); Tbl_EndCell (); Tbl_EndRow (); @@ -183,15 +179,13 @@ void Plc_SeePlaces (void) /***** Write centres (of the current institution) with no place *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s", - Txt_Place_unspecified); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",Txt_Place_unspecified); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Ctr_GetNumCtrsInIns (Gbl.Hierarchy.Ins.InsCod) - - NumCtrsWithPlc); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Ctr_GetNumCtrsInIns (Gbl.Hierarchy.Ins.InsCod) - + NumCtrsWithPlc); Tbl_EndCell (); Tbl_EndRow (); @@ -532,9 +526,10 @@ static void Plc_ListPlacesForEdition (void) { Plc = &Gbl.Plcs.Lst[NumPlc]; - /* Put icon to remove place */ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /* Put icon to remove place */ + Tbl_StartCellAttr ("class=\"BM\""); if (Plc->NumCtrs) // Place has centres ==> deletion forbidden Ico_PutIconRemovalNotAllowed (); else @@ -547,13 +542,12 @@ static void Plc_ListPlacesForEdition (void) Tbl_EndCell (); /* Place code */ - fprintf (Gbl.F.Out,"" - "%ld", - Plc->PlcCod); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%ld",Plc->PlcCod); Tbl_EndCell (); /* Place short name */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActRenPlcSho); Plc_PutParamPlcCod (Plc->PlcCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActRenPlcFul); Plc_PutParamPlcCod (Plc->PlcCod); fprintf (Gbl.F.Out,"" - "%u", - Plc->NumCtrs); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Plc->NumCtrs); Tbl_EndCell (); Tbl_EndRow (); @@ -815,18 +808,19 @@ static void Plc_PutFormToCreatePlace (void) /***** Write heading *****/ Plc_PutHeadPlaces (); - /***** Column to remove place, disabled here *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /***** Column to remove place, disabled here *****/ + Tbl_StartCellAttr ("class=\"BM\""); Tbl_EndCell (); /***** Place code *****/ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CODE\""); Tbl_EndCell (); /***** Place short name *****/ - fprintf (Gbl.F.Out,"" - "", @@ -834,8 +828,8 @@ static void Plc_PutFormToCreatePlace (void) Tbl_EndCell (); /***** Place full name *****/ - fprintf (Gbl.F.Out,"" - "", @@ -843,8 +837,8 @@ static void Plc_PutFormToCreatePlace (void) Tbl_EndCell (); /***** Number of centres *****/ - fprintf (Gbl.F.Out,"" - "0"); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"0"); Tbl_EndCell (); Tbl_EndRow (); diff --git a/swad_plugin.c b/swad_plugin.c index 6562c5cad..4b825d0b3 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -138,8 +138,8 @@ void Plg_ListPlugins (void) // TODO: Change plugin icons to 32x32 Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "" + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\" style=\"width:45px;\""); + fprintf (Gbl.F.Out,"" "\"%s\"" @@ -149,8 +149,8 @@ void Plg_ListPlugins (void) Plg->Name,Plg->Name); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "" + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"" "%s" "", URL,Plg->Name, @@ -395,9 +395,10 @@ static void Plg_ListPluginsForEdition (void) { Plg = &Gbl.Plugins.Lst[NumPlg]; - /* Put icon to remove plugin */ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /* Put icon to remove plugin */ + Tbl_StartCellAttr ("class=\"BM\""); Frm_StartForm (ActRemPlg); Plg_PutParamPlgCod (Plg->PlgCod); Ico_PutIconRemove (); @@ -405,15 +406,14 @@ static void Plg_ListPluginsForEdition (void) Tbl_EndCell (); /* Plugin code */ - fprintf (Gbl.F.Out,"" - "%ld", - Plg->PlgCod); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%ld",Plg->PlgCod); Tbl_EndCell (); /* Plugin logo */ // TODO: Change plugin icons to 32x32 - fprintf (Gbl.F.Out,"" - "\"%s\"", Cfg_URL_ICON_PLUGINS_PUBLIC, @@ -423,7 +423,7 @@ static void Plg_ListPluginsForEdition (void) Tbl_EndCell (); /* Plugin name */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActRenPlg); Plg_PutParamPlgCod (Plg->PlgCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActChgPlgDes); Plg_PutParamPlgCod (Plg->PlgCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActChgPlgLog); Plg_PutParamPlgCod (Plg->PlgCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActChgPlgAppKey); Plg_PutParamPlgCod (Plg->PlgCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActChgPlgURL); Plg_PutParamPlgCod (Plg->PlgCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\""); Frm_StartForm (ActChgPlgIP); Plg_PutParamPlgCod (Plg->PlgCod); fprintf (Gbl.F.Out,"" - "", Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name); Tbl_EndCell (); /***** Plugin description *****/ - fprintf (Gbl.F.Out,"" - "", Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg_EditingPlg->Description); Tbl_EndCell (); /***** Plugin logo *****/ - fprintf (Gbl.F.Out,"" - "", Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo); Tbl_EndCell (); /***** Plugin application key *****/ - fprintf (Gbl.F.Out,"" - "", Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey); Tbl_EndCell (); /***** Plugin URL *****/ - fprintf (Gbl.F.Out,"" - "", Cns_MAX_CHARS_WWW,Plg_EditingPlg->URL); Tbl_EndCell (); /***** Plugin IP address *****/ - fprintf (Gbl.F.Out,"" - "", Cns_MAX_CHARS_IP,Plg_EditingPlg->IP); diff --git a/swad_privacy.c b/swad_privacy.c index ec56f332d..735601d42 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -158,13 +158,12 @@ static void Pri_PutFormVisibility (const char *TxtLabel, Tbl_StartRow (); /***** Select visibility *****/ - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme],TxtLabel); + Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",TxtLabel); Tbl_EndCell (); /***** Form with list of options *****/ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); if (Action != ActUnk) Frm_StartFormAnchor (Action,Pri_PRIVACY_ID); fprintf (Gbl.F.Out,"