diff --git a/css/swad19.44.2.css b/css/swad19.44.3.css
similarity index 99%
rename from css/swad19.44.2.css
rename to css/swad19.44.3.css
index 46396f34..8247d8ed 100644
--- a/css/swad19.44.2.css
+++ b/css/swad19.44.3.css
@@ -74,7 +74,7 @@ form
}
address
{
- font-style: normal;
+ font-style:normal;
}
/*********************** Text decoration of links ****************************/
@@ -2237,6 +2237,15 @@ a:hover img.CENTRE_PHOTO_SHOW
height:25px;
}
+.LIST_I_MUST_READ
+ {
+ display:inline-block;
+ padding:0;
+ margin:12px 0;
+ text-align:left;
+ vertical-align:middle;
+ }
+
/******************************* File browsers *******************************/
.FILENAME
{
diff --git a/swad_HTML.c b/swad_HTML.c
index 69242207..4314f342 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -60,6 +60,7 @@ static unsigned HTM_TR_NestingLevel = 0;
static unsigned HTM_TH_NestingLevel = 0;
static unsigned HTM_TD_NestingLevel = 0;
static unsigned HTM_DIV_NestingLevel = 0;
+static unsigned HTM_UL_NestingLevel = 0;
/*****************************************************************************/
/***************************** Private prototypes ****************************/
@@ -76,6 +77,8 @@ static void HTM_TD_BeginWithoutAttr (void);
static void HTM_DIV_BeginWithoutAttr (void);
+static void HTM_UL_BeginWithoutAttr (void);
+
/*****************************************************************************/
/******************************* Start/end table *****************************/
/*****************************************************************************/
@@ -412,7 +415,7 @@ static void HTM_TD_BeginWithoutAttr (void)
void HTM_TD_End (void)
{
- if (HTM_TD_NestingLevel == 0) // No TH open
+ if (HTM_TD_NestingLevel == 0) // No TD open
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened TD.");
fprintf (Gbl.F.Out,"");
@@ -490,12 +493,12 @@ static void HTM_DIV_BeginWithoutAttr (void)
void HTM_DIV_End (void)
{
- if (HTM_DIV_NestingLevel == 0) // No TH open
+ if (HTM_DIV_NestingLevel == 0) // No DIV open
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened DIV.");
fprintf (Gbl.F.Out,"");
- HTM_TD_NestingLevel--;
+ HTM_DIV_NestingLevel--;
}
/*****************************************************************************/
@@ -543,13 +546,51 @@ void HTM_SECTION_End (void)
/*****************************************************************************/
/****************************** Unordered lists ******************************/
/*****************************************************************************/
-/*
-void HTM_UL_Begin (const char *SectionId)
+
+void HTM_UL_Begin (const char *fmt,...)
{
- fprintf (Gbl.F.Out,"
",SectionId);
+ va_list ap;
+ int NumBytesPrinted;
+ char *Attr;
+
+ if (fmt)
+ {
+ if (fmt[0])
+ {
+ va_start (ap,fmt);
+ NumBytesPrinted = vasprintf (&Attr,fmt,ap);
+ va_end (ap);
+
+ if (NumBytesPrinted < 0) // If memory allocation wasn't possible,
+ // or some other error occurs,
+ // vasprintf will return -1
+ Lay_NotEnoughMemoryExit ();
+
+ /***** Print HTML *****/
+ fprintf (Gbl.F.Out,"",Attr);
+
+ free ((void *) Attr);
+ }
+ else
+ HTM_UL_BeginWithoutAttr ();
+ }
+ else
+ HTM_UL_BeginWithoutAttr ();
+
+ HTM_UL_NestingLevel++;
}
-*/
+
+static void HTM_UL_BeginWithoutAttr (void)
+ {
+ fprintf (Gbl.F.Out,"");
+ }
+
void HTM_UL_End (void)
{
+ if (HTM_UL_NestingLevel == 0) // No UL open
+ Ale_ShowAlert (Ale_ERROR,"Trying to close unopened UL.");
+
fprintf (Gbl.F.Out,"
");
+
+ HTM_UL_NestingLevel--;
}
diff --git a/swad_HTML.h b/swad_HTML.h
index c11966a9..23dd10a2 100644
--- a/swad_HTML.h
+++ b/swad_HTML.h
@@ -74,6 +74,7 @@ void HTM_ARTICLE_End (void);
void HTM_SECTION_Begin (const char *SectionId);
void HTM_SECTION_End (void);
+void HTM_UL_Begin (const char *fmt,...);
void HTM_UL_End (void);
#endif
diff --git a/swad_MFU.c b/swad_MFU.c
index 9103c118..e9c502e0 100644
--- a/swad_MFU.c
+++ b/swad_MFU.c
@@ -223,7 +223,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
HTM_DIV_Begin ("id=\"MFU_actions_big\"");
/***** Write list of frequently used actions *****/
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin ("class=\"LIST_LEFT\"");
for (NumAct = 0;
NumAct < ListMFUActions->NumActions;
NumAct++)
@@ -286,7 +286,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
Frm_EndForm ();
/***** Write list of frequently used actions *****/
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin (NULL);
for (NumAct = 0;
NumAct < ListMFUActions->NumActions;
NumAct++)
diff --git a/swad_banner.c b/swad_banner.c
index 2f77451a..10f62cfb 100644
--- a/swad_banner.c
+++ b/swad_banner.c
@@ -144,7 +144,7 @@ static void Ban_WriteListOfBanners (void)
unsigned NumBan;
/***** List start *****/
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin ("class=\"LIST_LEFT\"");
/***** Write all the banners *****/
for (NumBan = 0;
diff --git a/swad_changelog.h b/swad_changelog.h
index 11f13e3b..d08527d3 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -488,14 +488,13 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.44.3 (2019-10-26)"
-#define CSS_FILE "swad19.44.2.css"
+#define CSS_FILE "swad19.44.3.css"
#define JS_FILE "swad19.39.js"
/*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables.
-// TODO: Buscar emparejamientos ");
+ HTM_UL_Begin ("class=\"LIST_TREE\"");
/***** Title of top level *****/
fprintf (Gbl.F.Out,"- "
diff --git a/swad_course.c b/swad_course.c
index 03f9fe13..14c0d49d 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -583,7 +583,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_My_courses,Crs_PutIconToSearchCourses,
Hlp_PROFILE_Courses,Box_NOT_CLOSABLE);
- fprintf (Gbl.F.Out,"
");
+ HTM_UL_Begin ("class=\"LIST_TREE\"");
/***** Write link to platform *****/
Highlight = (Gbl.Hierarchy.Cty.CtyCod <= 0);
diff --git a/swad_date.c b/swad_date.c
index a1394d0b..490201b5 100644
--- a/swad_date.c
+++ b/swad_date.c
@@ -111,7 +111,7 @@ void Dat_PutBoxToSelectDateFormat (void)
/***** Form with list of options *****/
Frm_StartForm (ActChgDatFmt);
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin ("class=\"LIST_LEFT\"");
for (Format = (Dat_Format_t) 0;
Format <= (Dat_Format_t) (Dat_NUM_OPTIONS_FORMAT - 1);
Format++)
diff --git a/swad_enrolment.c b/swad_enrolment.c
index eb2fc9e9..827e4ab4 100644
--- a/swad_enrolment.c
+++ b/swad_enrolment.c
@@ -952,8 +952,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void)
extern const char *Txt_Eliminate_from_the_platform_the_users_indicated_in_step_1;
/***** Start list of options *****/
- fprintf (Gbl.F.Out,"",
- The_ClassFormInBox[Gbl.Prefs.Theme]);
+ HTM_UL_Begin ("class=\"LIST_LEFT %s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
/***** Register / remove users listed or not listed *****/
if (Gbl.Hierarchy.Level == Hie_CRS) // Course selected
@@ -1497,8 +1496,7 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
}
/***** Start list of options *****/
- fprintf (Gbl.F.Out,"",
- The_ClassFormInBox[Gbl.Prefs.Theme]);
+ HTM_UL_Begin ("class=\"LIST_LEFT %s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
/***** Register user in course / Modify user's data *****/
if (Gbl.Hierarchy.Level == Hie_CRS && Gbl.Usrs.Me.Role.Logged >= Rol_STD)
diff --git a/swad_file_browser.c b/swad_file_browser.c
index 96169978..60a43205 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -3260,7 +3260,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
Brw_PutHiddenParamFullTreeIfSelected ();
/***** List start *****/
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin ("class=\"LIST_LEFT\"");
/***** Select the complete course, not a group *****/
fprintf (Gbl.F.Out,"- "
diff --git a/swad_forum.c b/swad_forum.c
index 9ba64cbc..82c896ff 100644
--- a/swad_forum.c
+++ b/swad_forum.c
@@ -1583,7 +1583,7 @@ static void For_ShowForumList (void)
For_PutFormWhichForums ();
/***** Start list *****/
- fprintf (Gbl.F.Out,"
");
+ HTM_UL_Begin ("class=\"LIST_TREE\"");
/***** Links to global forums *****/
For_WriteLinksToGblForums (IsLastItemInLevel);
@@ -1758,7 +1758,7 @@ static void For_PutFormWhichForums (void)
Frm_StartForm (ActSeeFor);
For_PutParamForumOrder (Gbl.Forum.ThreadsOrder);
HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE\"");
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin (NULL);
for (ForumSet = (For_ForumSet_t) 0;
ForumSet < For_NUM_FORUM_SETS;
diff --git a/swad_info.c b/swad_info.c
index 273ee95d..a7b3dbf8 100644
--- a/swad_info.c
+++ b/swad_info.c
@@ -603,8 +603,7 @@ void Inf_WriteMsgYouMustReadInfo (void)
/***** Write every information I must read *****/
HTM_DIV_Begin ("class=\"CM\"");
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin ("class=\"LIST_I_MUST_READ\"");
for (InfoType = (Inf_InfoType_t) 0;
InfoType < Inf_NUM_INFO_TYPES;
InfoType++)
diff --git a/swad_link.c b/swad_link.c
index 55d66954..d785df53 100644
--- a/swad_link.c
+++ b/swad_link.c
@@ -188,7 +188,7 @@ static void Lnk_WriteListOfLinks (void)
unsigned NumLnk;
/***** List start *****/
- fprintf (Gbl.F.Out,"");
+ HTM_UL_Begin ("class=\"LIST_LEFT\"");
/***** Write all links *****/
for (NumLnk = 0;
diff --git a/swad_menu.c b/swad_menu.c
index 7244049b..1265d369 100644
--- a/swad_menu.c
+++ b/swad_menu.c
@@ -339,8 +339,8 @@ void Mnu_WriteMenuThisTab (void)
bool IsTheSelectedAction;
/***** Menu start *****/
- fprintf (Gbl.F.Out,"