Version19.115

This commit is contained in:
Antonio Cañas Vargas 2020-01-09 16:44:14 +01:00
parent 247222608a
commit 2e562d8e06
5 changed files with 29 additions and 22 deletions

View File

@ -132,23 +132,19 @@ void QR_ImageQRCode (const char *QRString)
void QR_LinkTo (unsigned Size,const char *ParamName,long Cod)
{
extern const char *Txt_Shortcut;
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
char *URL;
/***** Show QR code with link *****/
if (ParamName)
{
if (asprintf (&URL,"https://chart.googleapis.com/chart?cht=qr&chs=%ux%u&chl=%s/%s?%s=%ld",
Size,Size,
Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language],
ParamName,Cod) < 0)
if (asprintf (&URL,"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?%s=%ld",
Size,Size,Cfg_URL_SWAD_CGI,ParamName,Cod) < 0)
Lay_NotEnoughMemoryExit ();
}
else
{
if (asprintf (&URL,"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/%s",
Size,Size,
Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language]) < 0)
if (asprintf (&URL,"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/",
Size,Size,Cfg_URL_SWAD_CGI) < 0)
Lay_NotEnoughMemoryExit ();
}
HTM_IMG (URL,NULL,Txt_Shortcut,

View File

@ -502,7 +502,8 @@ ps2pdf source.ps destination.pdf
// TODO: Mapas más estrechos en móvil
Version 19.115: Jan 09, 2020 Map column in listing of institutions.
Fixed bug in edition of timetable, reported by Miguel Damas Hermoso. (? lines)
Fixed bug in edition of timetable, reported by Miguel Damas Hermoso.
Language removed from shortcuts. (278515 lines)
Version 19.114: Jan 08, 2020 New option in System tab to view platform configuration.
Optimizations in number of users in courses. (278462 lines)
Version 19.113: Jan 08, 2020 Code refactoring related to hierarchy.

View File

@ -342,6 +342,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
{
extern const char *Txt_COUNTRIES_HELP_ORDER[2];
extern const char *Txt_COUNTRIES_ORDER[2];
extern const char *Txt_Map;
extern const char *Txt_Institutions_ABBREVIATION;
extern const char *Txt_Centres_ABBREVIATION;
extern const char *Txt_Degrees_ABBREVIATION;
@ -377,6 +378,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
HTM_TH_End ();
}
HTM_TH (1,1,"CM",Txt_Map);
HTM_TH (1,1,"RM",Txt_Institutions_ABBREVIATION);
HTM_TH (1,1,"RM",Txt_Centres_ABBREVIATION);
HTM_TH (1,1,"RM",Txt_Degrees_ABBREVIATION);
@ -396,6 +398,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty)
{
extern const char *Txt_Map;
const char *BgColor;
BgColor = (Cty->CtyCod == Gbl.Hierarchy.Cty.CtyCod) ? "LIGHT_BLUE" :
@ -416,11 +419,23 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty)
"BT_LINK DAT_N");
HTM_TD_End ();
/* Write stats of this country */
/***** Number of users who claim to belong to this country *****/
HTM_TD_Begin ("class=\"DAT RM %s\"",BgColor);
HTM_Unsigned (Usr_GetNumUsrsWhoClaimToBelongToCty (Cty));
HTM_TD_End ();
/***** Map *****/
HTM_TD_Begin ("class=\"DAT CM %s\"",BgColor);
if (Cty_GetIfMapIsAvailable (Cty->CtyCod))
{
Cty_EditingCty = Cty; // Used to pass parameter with the code of the country
Lay_PutContextualLinkOnlyIcon (ActSeeCtyInf,NULL,Cty_PutParamGoToCty,
"map-marker-alt.svg",
Txt_Map);
}
HTM_TD_End ();
/***** Other stats *****/
HTM_TD_Begin ("class=\"DAT RM %s\"",BgColor);
HTM_Unsigned (Ins_GetNumInssInCty (Cty->CtyCod));
HTM_TD_End ();

View File

@ -194,7 +194,6 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
void HieCfg_Shortcut (bool PrintView,const char *ParamName,long HieCod)
{
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
extern const char *Txt_Shortcut;
/***** Short cut *****/
@ -208,24 +207,20 @@ void HieCfg_Shortcut (bool PrintView,const char *ParamName,long HieCod)
if (!PrintView)
{
if (ParamName)
HTM_A_Begin ("href=\"%s/%s?%s=%ld\" class=\"DAT\" target=\"_blank\"",
HTM_A_Begin ("href=\"%s/?%s=%ld\" class=\"DAT\" target=\"_blank\"",
Cfg_URL_SWAD_CGI,
Lan_STR_LANG_ID[Gbl.Prefs.Language],
ParamName,HieCod);
else
HTM_A_Begin ("href=\"%s/%s\" class=\"DAT\" target=\"_blank\"",
Cfg_URL_SWAD_CGI,
Lan_STR_LANG_ID[Gbl.Prefs.Language]);
HTM_A_Begin ("href=\"%s/\" class=\"DAT\" target=\"_blank\"",
Cfg_URL_SWAD_CGI);
}
if (ParamName)
HTM_TxtF ("%s/%s?%s=%ld",
HTM_TxtF ("%s/?%s=%ld",
Cfg_URL_SWAD_CGI,
Lan_STR_LANG_ID[Gbl.Prefs.Language],
ParamName,HieCod);
else
HTM_TxtF ("%s/%s",
Cfg_URL_SWAD_CGI,
Lan_STR_LANG_ID[Gbl.Prefs.Language]);
HTM_TxtF ("%s/",
Cfg_URL_SWAD_CGI);
if (!PrintView)
HTM_A_End ();
HTM_TD_End ();

View File

@ -204,7 +204,7 @@ static bool SysCfg_GetIfMapIsAvailable (void)
{
/* Get if map is available */
row = mysql_fetch_row (mysql_res);
MapIsAvailable = (row[0] == '1');
MapIsAvailable = (row[0][0] == '1');
}
/* Free structure that stores the query result */