diff --git a/css/swad16.146.css b/css/swad16.146.css index 3f46ca9e..6a5e7b75 100644 --- a/css/swad16.146.css +++ b/css/swad16.146.css @@ -1598,6 +1598,30 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} } /************************** Map and name of country **************************/ +.COUNTRY_SMALL + { + display:inline-block; + box-sizing:border-box; + max-width:300px; + margin-left:4px; + text-align:left; + vertical-align:middle; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + } +.COUNTRY_TINY + { + display:inline-block; + box-sizing:border-box; + max-width:120px; + margin-left:4px; + text-align:left; + vertical-align:middle; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + } .COUNTRY_MAP_TITLE { box-sizing:border-box; @@ -1606,13 +1630,6 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} margin-right:10px; vertical-align:top; } -.COUNTRY_MAP_TINY - { - box-sizing:border-box; - width:20px; - height:20px; - vertical-align:middle; - } .COUNTRY_MAP_SMALL { box-sizing:border-box; @@ -1620,6 +1637,13 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} height:64px; vertical-align:middle; } +.COUNTRY_MAP_TINY + { + box-sizing:border-box; + width:20px; + height:20px; + vertical-align:middle; + } .COUNTRY_MAP_SHOW { box-sizing:border-box; @@ -1634,12 +1658,12 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;} height:625px; margin:12px; } -.COUNTRY_TXT + +/********************* List of my courses ************************************/ +.MY_CRSS_LNK { - display:inline-block; box-sizing:border-box; - max-width:100px; - margin-left:4px; + max-width:500px; text-align:left; vertical-align:middle; white-space:nowrap; diff --git a/swad_changelog.h b/swad_changelog.h index 47abce7c..afb5bb04 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -197,13 +197,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.146.6 (2017-03-04)" +#define Log_PLATFORM_VERSION "SWAD 16.146.7 (2017-03-04)" #define CSS_FILE "swad16.146.css" #define JS_FILE "swad16.144.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.146.7: Mar 03, 2017 Changes in layout of my courses. (216339 lines) Version 16.146.6: Mar 03, 2017 Changes in layout of countries. (216331 lines) Version 16.146.5: Mar 03, 2017 Code refactoring related with author of assignments, attendance events and surveys. (216319 lines) Version 16.146.4: Mar 03, 2017 Changes in layout of surveys. (216349 lines) diff --git a/swad_country.c b/swad_country.c index e42db5ec..2ae771de 100644 --- a/swad_country.c +++ b/swad_country.c @@ -164,7 +164,9 @@ void Cty_SeeCtyWithPendingInss (void) "", BgColor); Cty_DrawCountryMapAndNameWithLink (&Cty,ActSeeIns, - "DAT_NOBR","COUNTRY_MAP_SMALL"); + "COUNTRY_SMALL", + "COUNTRY_MAP_SMALL", + "DAT"); fprintf (Gbl.F.Out,""); /* Number of pending institutions (row[1]) */ @@ -703,7 +705,9 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty) /***** Country map (and link to WWW if exists) *****/ fprintf (Gbl.F.Out,"",BgColor); Cty_DrawCountryMapAndNameWithLink (Cty,ActSeeIns, - "DAT_N","COUNTRY_MAP_SMALL"); + "COUNTRY_SMALL", + "COUNTRY_MAP_SMALL", + "DAT_N"); fprintf (Gbl.F.Out,""); /* Write stats of this country */ @@ -794,7 +798,9 @@ static unsigned Cty_GetNumUsrsWhoClaimToBelongToCty (long CtyCod) /*****************************************************************************/ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action, - const char *ClassLink,const char *ClassMap) + const char *ClassContainer, + const char *ClassMap, + const char *ClassLink) { extern const char *Txt_Go_to_X; char CountryName[Cty_MAX_BYTES_COUNTRY_NAME + 1]; @@ -802,6 +808,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action, /***** Start form *****/ Act_FormGoToStart (Action); Cty_PutParamCtyCod (Cty->CtyCod); + fprintf (Gbl.F.Out,"
",ClassContainer); /***** Link to action *****/ sprintf (Gbl.Title,Txt_Go_to_X,Cty->Name[Gbl.Prefs.Language]); @@ -813,8 +820,9 @@ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action, /***** Write country name and end link *****/ Str_Copy (CountryName,Cty->Name[Gbl.Prefs.Language], Cty_MAX_BYTES_COUNTRY_NAME); - fprintf (Gbl.F.Out,"
%s (%s)
" - "", + fprintf (Gbl.F.Out," %s (%s)" + "" + "
", CountryName, Cty->Alpha2); diff --git a/swad_country.h b/swad_country.h index 3d35c44c..27485f37 100644 --- a/swad_country.h +++ b/swad_country.h @@ -84,7 +84,9 @@ void Cty_ListCountries1 (void); void Cty_ListCountries2 (void); void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action, - const char *ClassLink,const char *ClassMap); + const char *ClassContainer, + const char *ClassMap, + const char *ClassLink); void Cty_DrawCountryMap (struct Country *Cty,const char *Class); bool Cty_CheckIfCountryMapExists (struct Country *Cty); diff --git a/swad_course.c b/swad_course.c index 8a4070e5..155cf71c 100644 --- a/swad_course.c +++ b/swad_course.c @@ -519,10 +519,6 @@ static void Crs_WriteListMyCoursesToSelectOne (void) struct Centre Ctr; struct Degree Deg; struct Course Crs; - char InsFullName[Ins_MAX_LENGTH_INSTIT_FULL_NAME + 1]; - char CtrFullName[Ctr_MAX_LENGTH_CENTRE_FULL_NAME + 1]; - char DegFullName[Deg_MAX_LENGTH_DEGREE_FULL_NAME + 1]; - char CrsFullName[Crs_MAX_LENGTH_COURSE_FULL_NAME + 1]; bool IsLastItemInLevel[1 + 5]; bool Highlight; // Highlight because degree, course, etc. is selected MYSQL_RES *mysql_resCty; @@ -542,7 +538,6 @@ static void Crs_WriteListMyCoursesToSelectOne (void) unsigned NumCrs; unsigned NumCrss; char ActTxt[Act_MAX_LENGTH_ACTION_TXT + 1]; - char PathRelRSSFile[PATH_MAX + 1]; const char *ClassNormal; char ClassHighlight[64]; @@ -631,7 +626,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) /***** Write link to institution *****/ Highlight = (Gbl.CurrentCtr.Ctr.CtrCod <= 0 && Gbl.CurrentIns.Ins.InsCod == Ins.InsCod); - fprintf (Gbl.F.Out,"
  • ", + fprintf (Gbl.F.Out,"
  • ", Highlight ? ClassHighlight : ClassNormal); IsLastItemInLevel[2] = (NumIns == NumInss - 1); @@ -642,10 +637,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Highlight ? ClassHighlight : ClassNormal,NULL); Log_DrawLogo (Sco_SCOPE_INS,Ins.InsCod,Ins.ShrtName,20,NULL,true); - Str_Copy (InsFullName,Ins.FullName, - Ins_MAX_LENGTH_INSTIT_FULL_NAME); - Str_LimitLengthHTMLStr (InsFullName,Crs_MAX_BYTES_TXT_LINK); - fprintf (Gbl.F.Out," %s",InsFullName); + fprintf (Gbl.F.Out," %s",Ins.FullName); Act_FormEnd (); fprintf (Gbl.F.Out,"
  • "); @@ -667,7 +659,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) /***** Write link to centre *****/ Highlight = (Gbl.CurrentDeg.Deg.DegCod <= 0 && Gbl.CurrentCtr.Ctr.CtrCod == Ctr.CtrCod); - fprintf (Gbl.F.Out,"
  • ", + fprintf (Gbl.F.Out,"
  • ", Highlight ? ClassHighlight : ClassNormal); IsLastItemInLevel[3] = (NumCtr == NumCtrs - 1); @@ -678,10 +670,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Highlight ? ClassHighlight : ClassNormal,NULL); Log_DrawLogo (Sco_SCOPE_CTR,Ctr.CtrCod,Ctr.ShrtName,20,NULL,true); - Str_Copy (CtrFullName,Ctr.FullName, - Ctr_MAX_LENGTH_CENTRE_FULL_NAME); - Str_LimitLengthHTMLStr (CtrFullName,Crs_MAX_BYTES_TXT_LINK); - fprintf (Gbl.F.Out," %s",CtrFullName); + fprintf (Gbl.F.Out," %s",Ctr.FullName); Act_FormEnd (); fprintf (Gbl.F.Out,"
  • "); @@ -703,7 +692,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) /***** Write link to degree *****/ Highlight = (Gbl.CurrentCrs.Crs.CrsCod <= 0 && Gbl.CurrentDeg.Deg.DegCod == Deg.DegCod); - fprintf (Gbl.F.Out,"
  • ", + fprintf (Gbl.F.Out,"
  • ", Highlight ? ClassHighlight : ClassNormal); IsLastItemInLevel[4] = (NumDeg == NumDegs - 1); @@ -714,10 +703,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Highlight ? ClassHighlight : ClassNormal,NULL); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShrtName,20,NULL,true); - Str_Copy (DegFullName,Deg.FullName, - Deg_MAX_LENGTH_DEGREE_FULL_NAME); - Str_LimitLengthHTMLStr (DegFullName,Crs_MAX_BYTES_TXT_LINK); - fprintf (Gbl.F.Out," %s",DegFullName); + fprintf (Gbl.F.Out," %s",Deg.FullName); Act_FormEnd (); fprintf (Gbl.F.Out,"
  • "); @@ -738,7 +724,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) /***** Write link to course *****/ Highlight = (Gbl.CurrentCrs.Crs.CrsCod == Crs.CrsCod); - fprintf (Gbl.F.Out,"
  • ", + fprintf (Gbl.F.Out,"
  • ", Highlight ? ClassHighlight : ClassNormal); IsLastItemInLevel[5] = (NumCrs == NumCrss - 1); @@ -751,30 +737,14 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal,NULL); fprintf (Gbl.F.Out,"\"%s\"", + " class=\"ICO20x20\" />" + " %s" + "", Gbl.Prefs.IconsURL, Crs.ShrtName, + Crs.FullName, Crs.FullName); - Str_Copy (CrsFullName,Crs.FullName, - Crs_MAX_LENGTH_COURSE_FULL_NAME); - Str_LimitLengthHTMLStr (CrsFullName,Crs_MAX_BYTES_TXT_LINK); - fprintf (Gbl.F.Out," %s",CrsFullName); Act_FormEnd (); - - /***** Write link to RSS file *****/ - sprintf (PathRelRSSFile,"%s/%s/%ld/%s/%s", - Cfg_PATH_SWAD_PUBLIC,Cfg_FOLDER_CRS,Crs.CrsCod,Cfg_RSS_FOLDER,Cfg_RSS_FILE); - if (!Fil_CheckIfPathExists (PathRelRSSFile)) - RSS_UpdateRSSFileForACrs (&Crs); - fprintf (Gbl.F.Out," " - "\"RSS\"" - "", - Gbl.Prefs.IconsURL); - fprintf (Gbl.F.Out,"
  • "); } diff --git a/swad_statistic.c b/swad_statistic.c index 1d15b395..48261f9e 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -3361,7 +3361,9 @@ static void Sta_WriteCountry (long CtyCod) /***** Form to go to country *****/ Cty_DrawCountryMapAndNameWithLink (&Cty,ActSeeCtyInf, - "LOG","COUNTRY_MAP_TINY"); + "COUNTRY_TINY", + "COUNTRY_MAP_TINY", + "LOG"); } else // Hit with no country selected /***** No country selected *****/