Version19.116.2

This commit is contained in:
Antonio Cañas Vargas 2020-01-14 09:18:06 +01:00
parent 84c45f21f5
commit 5136e258d4
4 changed files with 27 additions and 12 deletions

View File

@ -494,7 +494,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.116.1 (2020-01-14)" #define Log_PLATFORM_VERSION "SWAD 19.116.2 (2020-01-14)"
#define CSS_FILE "swad19.115.css" #define CSS_FILE "swad19.115.css"
#define JS_FILE "swad19.91.1.js" #define JS_FILE "swad19.91.1.js"
/* /*
@ -503,6 +503,7 @@ ps2pdf source.ps destination.pdf
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué? // TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
// TODO: Mapas más estrechos en móvil // TODO: Mapas más estrechos en móvil
Version 19.116.2: Jan 14, 2020 Form to go to institution map in statistics. (278529 lines)
Version 19.116.1: Jan 14, 2020 Form to go to centre map in statistics. (278518 lines) Version 19.116.1: Jan 14, 2020 Form to go to centre map in statistics. (278518 lines)
Version 19.116: Jan 11, 2020 Changes in number of digits printed in doubles. Version 19.116: Jan 11, 2020 Changes in number of digits printed in doubles.
Code refactoring related to printing some strings. (278506 lines) Code refactoring related to printing some strings. (278506 lines)

View File

@ -369,7 +369,6 @@ static void Ins_PutIconToEditInstitutions (void)
static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns) static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns)
{ {
extern const char *Txt_Map;
extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT]; extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT];
const char *TxtClassNormal; const char *TxtClassNormal;
const char *TxtClassStrong; const char *TxtClassStrong;
@ -409,13 +408,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns)
/***** Map *****/ /***** Map *****/
HTM_TD_Begin ("class=\"%s CM %s\"",TxtClassNormal,BgColor); HTM_TD_Begin ("class=\"%s CM %s\"",TxtClassNormal,BgColor);
if (Ins_GetIfMapIsAvailable (Ins->InsCod)) Ins_FormToGoToMap (Ins);
{
Ins_EditingIns = Ins; // Used to pass parameter with the code of the institution
Lay_PutContextualLinkOnlyIcon (ActSeeInsInf,NULL,Ins_PutParamGoToIns,
"map-marker-alt.svg",
Txt_Map);
}
HTM_TD_End (); HTM_TD_End ();
/***** Other stats *****/ /***** Other stats *****/
@ -2113,6 +2106,23 @@ static void Ins_EditingInstitutionDestructor (void)
} }
} }
/*****************************************************************************/
/************************ Form to go to centre map ***************************/
/*****************************************************************************/
void Ins_FormToGoToMap (struct Instit *Ins)
{
extern const char *Txt_Map;
if (Ins_GetIfMapIsAvailable (Ins->InsCod))
{
Ins_EditingIns = Ins; // Used to pass parameter with the code of the institution
Lay_PutContextualLinkOnlyIcon (ActSeeInsInf,NULL,Ins_PutParamGoToIns,
"map-marker-alt.svg",
Txt_Map);
}
}
/*****************************************************************************/ /*****************************************************************************/
/********** Check if any of the centres in an institution has map ************/ /********** Check if any of the centres in an institution has map ************/
/*****************************************************************************/ /*****************************************************************************/

View File

@ -139,6 +139,7 @@ unsigned Ins_GetNumInssWithUsrs (Rol_Role_t Role,const char *SubQuery);
void Ins_ListInssFound (MYSQL_RES **mysql_res,unsigned NumInss); void Ins_ListInssFound (MYSQL_RES **mysql_res,unsigned NumInss);
void Ins_FormToGoToMap (struct Instit *Ins);
bool Ins_GetIfMapIsAvailable (long InsCod); bool Ins_GetIfMapIsAvailable (long InsCod);
#endif #endif

View File

@ -139,7 +139,7 @@ static void Sta_ShowNumHitsPerCountry (unsigned long NumRows,
static void Sta_WriteCountry (long CtyCod); static void Sta_WriteCountry (long CtyCod);
static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows, static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
MYSQL_RES *mysql_res); MYSQL_RES *mysql_res);
static void Sta_WriteInstitution (long InsCod); static void Sta_WriteInstit (long InsCod);
static void Sta_ShowNumHitsPerCentre (unsigned long NumRows, static void Sta_ShowNumHitsPerCentre (unsigned long NumRows,
MYSQL_RES *mysql_res); MYSQL_RES *mysql_res);
static void Sta_WriteCentre (long CtrCod); static void Sta_WriteCentre (long CtrCod);
@ -3344,7 +3344,7 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
HTM_TD_End (); HTM_TD_End ();
/* Write institution */ /* Write institution */
Sta_WriteInstitution (InsCod); Sta_WriteInstit (InsCod);
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
Hits.Num = Str_GetDoubleFromStr (row[1]); Hits.Num = Str_GetDoubleFromStr (row[1]);
@ -3359,7 +3359,7 @@ static void Sta_ShowNumHitsPerInstitution (unsigned long NumRows,
/********************** Write institution with an icon ***********************/ /********************** Write institution with an icon ***********************/
/*****************************************************************************/ /*****************************************************************************/
static void Sta_WriteInstitution (long InsCod) static void Sta_WriteInstit (long InsCod)
{ {
struct Instit Ins; struct Instit Ins;
@ -3376,6 +3376,9 @@ static void Sta_WriteInstitution (long InsCod)
/***** Form to go to institution *****/ /***** Form to go to institution *****/
Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeInsInf, Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeInsInf,
"BT_LINK LT LOG","CT"); "BT_LINK LT LOG","CT");
/***** Map *****/
Ins_FormToGoToMap (&Ins);
} }
else // Hit with no institution selected else // Hit with no institution selected
{ {