mirror of https://github.com/acanas/swad-core.git
Version19.108.6
This commit is contained in:
parent
359dd28b28
commit
bb29e96ada
|
@ -2003,12 +2003,11 @@ void Ctr_ListCtrsFound (MYSQL_RES **mysql_res,unsigned NumCtrs)
|
|||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of centres found */
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumCtrs,(NumCtrs == 1) ? Txt_centre :
|
||||
Txt_centres);
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumCtrs,
|
||||
(NumCtrs == 1) ? Txt_centre :
|
||||
Txt_centres),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Ctr_PutHeadCentresForSeeing (false); // Order not selectable
|
||||
|
|
|
@ -492,7 +492,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.108.5 (2019-12-30)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.108.6 (2019-12-30)"
|
||||
#define CSS_FILE "swad19.101.5.css"
|
||||
#define JS_FILE "swad19.91.1.js"
|
||||
/*
|
||||
|
@ -502,6 +502,7 @@ ps2pdf source.ps destination.pdf
|
|||
|
||||
Version 19.10x: Dec 30, 2019 Map in country information. (? lines)
|
||||
Version 19.10x: Dec 30, 2019 Map in institution information. (? lines)
|
||||
Version 19.108.6: Dec 30, 2019 Code refactoring related to printing messages. (249717 lines)
|
||||
Version 19.108.5: Dec 30, 2019 Code refactoring related to printing messages. (249712 lines)
|
||||
Version 19.108.4: Dec 30, 2019 Code refactoring related to printing messages. (249709 lines)
|
||||
Version 19.108.3: Dec 30, 2019 Code refactoring related to printing messages. (249725 lines)
|
||||
|
|
|
@ -2044,12 +2044,11 @@ void Cty_ListCtysFound (MYSQL_RES **mysql_res,unsigned NumCtys)
|
|||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of countries found */
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumCtys,NumCtys == 1 ? Txt_country :
|
||||
Txt_countries);
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumCtys,
|
||||
NumCtys == 1 ? Txt_country :
|
||||
Txt_countries),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Cty_PutHeadCountriesForSeeing (false); // Order not selectable
|
||||
|
|
|
@ -2505,12 +2505,11 @@ void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss)
|
|||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of courses found */
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumCrss,(NumCrss == 1) ? Txt_course :
|
||||
Txt_courses);
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumCrss,
|
||||
(NumCrss == 1) ? Txt_course :
|
||||
Txt_courses),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Heading row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
|
|
@ -1957,12 +1957,11 @@ void Deg_ListDegsFound (MYSQL_RES **mysql_res,unsigned NumDegs)
|
|||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of degrees found */
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumDegs,(NumDegs == 1) ? Txt_degree :
|
||||
Txt_degrees);
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumDegs,
|
||||
(NumDegs == 1) ? Txt_degree :
|
||||
Txt_degrees),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Deg_PutHeadDegreesForSeeing ();
|
||||
|
|
|
@ -11807,12 +11807,11 @@ void Brw_ListDocsFound (MYSQL_RES **mysql_res,unsigned long NumDocs,
|
|||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of documents found */
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%lu %s",
|
||||
NumDocs,(NumDocs == 1) ? TitleSingular :
|
||||
TitlePlural);
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumDocs,
|
||||
(NumDocs == 1) ? TitleSingular :
|
||||
TitlePlural),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Write heading *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
|
|
@ -1968,12 +1968,11 @@ void Ins_ListInssFound (MYSQL_RES **mysql_res,unsigned NumInss)
|
|||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of institutions found */
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumInss,NumInss == 1 ? Txt_institution :
|
||||
Txt_institutions);
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumInss,
|
||||
NumInss == 1 ? Txt_institution :
|
||||
Txt_institutions),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Ins_PutHeadInstitutionsForSeeing (false); // Order not selectable
|
||||
|
|
17
swad_match.c
17
swad_match.c
|
@ -2696,24 +2696,27 @@ static void Mch_ShowFormColumns (const struct Match *Match)
|
|||
NumCols <= Mch_MAX_COLS;
|
||||
NumCols++)
|
||||
{
|
||||
/* Begin container for this option */
|
||||
HTM_DIV_Begin ("class=\"%s\"",
|
||||
(Match->Status.NumCols == NumCols) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
|
||||
/***** Begin form *****/
|
||||
/* Begin form */
|
||||
Frm_StartForm (ActChgNumColMch);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Mch_PutParamNumCols (NumCols); // Number of columns
|
||||
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumCols,NumCols == 1 ? Txt_column :
|
||||
Txt_columns);
|
||||
Ico_PutSettingIconLink (NumColsIcon[NumCols],Gbl.Title);
|
||||
/* Number of columns */
|
||||
Ico_PutSettingIconLink (NumColsIcon[NumCols],
|
||||
Str_BuildMsgLongStr ((long) NumCols,
|
||||
NumCols == 1 ? Txt_column :
|
||||
Txt_columns));
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** End form *****/
|
||||
/* End form */
|
||||
Frm_EndForm ();
|
||||
|
||||
/* End container for this option */
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
||||
|
|
|
@ -2953,6 +2953,17 @@ char *Str_BuildMsgLong (const char *fmt,long Num)
|
|||
return Str_Msg;
|
||||
}
|
||||
|
||||
// Str_FreeMsg() must be called after calling this function
|
||||
|
||||
char *Str_BuildMsgLongStr (long Num,const char *Str)
|
||||
{
|
||||
Str_FreeMsg ();
|
||||
if (asprintf (&Str_Msg,"%ld %s",Num,Str) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
return Str_Msg;
|
||||
}
|
||||
|
||||
void Str_FreeMsg (void)
|
||||
{
|
||||
if (Str_Msg != NULL)
|
||||
|
|
|
@ -138,6 +138,7 @@ void Str_Concat (char *Dst,const char *Src,size_t DstSize);
|
|||
|
||||
char *Str_BuildMsgStr (const char *fmt,const char *Str);
|
||||
char *Str_BuildMsgLong (const char *fmt,long Num);
|
||||
char *Str_BuildMsgLongStr (long Num,const char *Str);
|
||||
void Str_FreeMsg (void);
|
||||
|
||||
#endif
|
||||
|
|
16
swad_user.c
16
swad_user.c
|
@ -7390,15 +7390,13 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
|||
/***** Begin box and table *****/
|
||||
/* Number of users found */
|
||||
Sex = Usr_GetSexOfUsrsLst (Role);
|
||||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
"%u %s",
|
||||
NumUsrs,
|
||||
(Role == Rol_UNK) ? ((NumUsrs == 1) ? Txt_user[Sex] :
|
||||
Txt_users[Sex]) :
|
||||
((NumUsrs == 1) ? Txt_ROLES_SINGUL_abc[Role][Sex] :
|
||||
Txt_ROLES_PLURAL_abc[Role][Sex]));
|
||||
Box_BoxTableBegin (NULL,Gbl.Title,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxTableBegin (NULL,Str_BuildMsgLongStr ((long) NumUsrs,
|
||||
(Role == Rol_UNK) ? ((NumUsrs == 1) ? Txt_user[Sex] :
|
||||
Txt_users[Sex]) :
|
||||
((NumUsrs == 1) ? Txt_ROLES_SINGUL_abc[Role][Sex] :
|
||||
Txt_ROLES_PLURAL_abc[Role][Sex])),
|
||||
NULL,NULL,Box_NOT_CLOSABLE,2);
|
||||
Str_FreeMsg ();
|
||||
|
||||
/***** Heading row with column names *****/
|
||||
Gbl.Usrs.Listing.WithPhotos = true;
|
||||
|
|
Loading…
Reference in New Issue