Version 15.136.3

This commit is contained in:
Antonio Cañas Vargas 2016-02-04 01:41:59 +01:00
parent 07fae31936
commit 1d53aa6ba2
2 changed files with 42 additions and 58 deletions

View File

@ -121,13 +121,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.136.2 (2016-02-02)"
#define CSS_FILE "swad15.136.1.css"
#define Log_PLATFORM_VERSION "SWAD 15.136.3 (2016-02-04)"
#define CSS_FILE "swad15.136.3.css"
#define JS_FILE "swad15.131.3.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 15.136.3: Feb 04, 2016 Change in layout of main title (country/institution/centre/degree/course). (195686 lines)
Version 15.136.2: Feb 04, 2016 Change in layout of most frequent actions. (195689 lines)
Version 15.136.1: Feb 02, 2016 Change in layout of tabs and menus. (195689 lines)
Version 15.136: Jan 30, 2016 Average number of followed/followers per follower/followed. (195674 lines)

View File

@ -792,83 +792,66 @@ void Deg_WriteCtyInsCtrDeg (void)
}
/*****************************************************************************/
/**************** Write course full name in the top of the page **************/
/*************** Write course full name in the top of the page ***************/
/*****************************************************************************/
#define Deg_MAX_LENGTH_ORIGINAL_NAME 255 // Maximum length of full name
#define Deg_MAX_LENGTH_SHORT_NAME_ON_PAGE_HEAD 32 // Maximum lenght on screen
#define Deg_MAX_LENGTH_FULL_NAME_ON_PAGE_HEAD 55 // Maximum lenght on screen
void Deg_WriteBigNameCtyInsCtrDegCrs (void)
{
extern const char *The_ClassCourse[The_NUM_THEMES];
char ShortName[Deg_MAX_LENGTH_ORIGINAL_NAME+1]; // Short name of country, institution, centre, degree or course
char FullName [Deg_MAX_LENGTH_ORIGINAL_NAME+1]; // Full name of country, institution, centre, degree or course
fprintf (Gbl.F.Out,"<h1 id=\"big_name\" class=\"%s\">",
The_ClassCourse[Gbl.Prefs.Theme]);
if (Gbl.CurrentCty.Cty.CtyCod > 0) // Country selected
{
/* Limit length of short name */
strncpy (ShortName,
(Gbl.CurrentCrs.Crs.CrsCod > 0) ? Gbl.CurrentCrs.Crs.ShortName :
((Gbl.CurrentDeg.Deg.DegCod > 0) ? Gbl.CurrentDeg.Deg.ShortName :
((Gbl.CurrentCtr.Ctr.CtrCod > 0) ? Gbl.CurrentCtr.Ctr.ShortName :
((Gbl.CurrentIns.Ins.InsCod > 0) ? Gbl.CurrentIns.Ins.ShortName :
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]))),
Deg_MAX_LENGTH_ORIGINAL_NAME);
ShortName[Deg_MAX_LENGTH_ORIGINAL_NAME] = '\0';
Str_LimitLengthHTMLStr (ShortName,Deg_MAX_LENGTH_SHORT_NAME_ON_PAGE_HEAD);
/***** Logo *****/
if (Gbl.CurrentCrs.Crs.CrsCod > 0 ||
Gbl.CurrentDeg.Deg.DegCod > 0)
Log_DrawLogo (Sco_SCOPE_DEG,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.ShortName,40,"TOP_LOGO",false);
else if (Gbl.CurrentCtr.Ctr.CtrCod > 0)
Log_DrawLogo (Sco_SCOPE_CTR,Gbl.CurrentCtr.Ctr.CtrCod,
Gbl.CurrentCtr.Ctr.ShortName,40,"TOP_LOGO",false);
else if (Gbl.CurrentIns.Ins.InsCod > 0)
Log_DrawLogo (Sco_SCOPE_INS,Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentIns.Ins.ShortName,40,"TOP_LOGO",false);
else
Cty_DrawCountryMap (&Gbl.CurrentCty.Cty,"COUNTRY_MAP_TITLE");
/* Limit length of full name */
strncpy (FullName,
/***** Text *****/
fprintf (Gbl.F.Out,"<div id=\"big_full_name\">"
"%s" // Full name
"</div>"
"<div class=\"NOT_SHOWN\">"
" / " // To separate
"</div>"
"<div id=\"big_short_name\">"
"%s" // Short name
"</div>",
(Gbl.CurrentCrs.Crs.CrsCod > 0) ? Gbl.CurrentCrs.Crs.FullName :
((Gbl.CurrentDeg.Deg.DegCod > 0) ? Gbl.CurrentDeg.Deg.FullName :
((Gbl.CurrentCtr.Ctr.CtrCod > 0) ? Gbl.CurrentCtr.Ctr.FullName :
((Gbl.CurrentIns.Ins.InsCod > 0) ? Gbl.CurrentIns.Ins.FullName :
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]))),
Deg_MAX_LENGTH_ORIGINAL_NAME);
FullName[Deg_MAX_LENGTH_ORIGINAL_NAME] = '\0';
Str_LimitLengthHTMLStr (FullName ,Deg_MAX_LENGTH_FULL_NAME_ON_PAGE_HEAD);
if (Gbl.CurrentCrs.Crs.CrsCod <= 0)
{
if (Gbl.CurrentDeg.Deg.DegCod > 0)
Log_DrawLogo (Sco_SCOPE_DEG,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.ShortName,40,"TOP_LOGO",false);
else if (Gbl.CurrentCtr.Ctr.CtrCod > 0)
Log_DrawLogo (Sco_SCOPE_CTR,Gbl.CurrentCtr.Ctr.CtrCod,
Gbl.CurrentCtr.Ctr.ShortName,40,"TOP_LOGO",false);
else if (Gbl.CurrentIns.Ins.InsCod > 0)
Log_DrawLogo (Sco_SCOPE_INS,Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentIns.Ins.ShortName,40,"TOP_LOGO",false);
else if (Gbl.CurrentCty.Cty.CtyCod > 0)
Cty_DrawCountryMap (&Gbl.CurrentCty.Cty,"COUNTRY_MAP_TITLE");
}
fprintf (Gbl.F.Out,"<span id=\"big_full_name\">"
"%s"
"</span>"
"<span class=\"NOT_SHOWN\">"
" / " // To separate
"</span>"
"<abbr id=\"big_short_name\">"
"%s"
"</abbr>",
FullName,ShortName);
(Gbl.CurrentCrs.Crs.CrsCod > 0) ? Gbl.CurrentCrs.Crs.ShortName :
((Gbl.CurrentDeg.Deg.DegCod > 0) ? Gbl.CurrentDeg.Deg.ShortName :
((Gbl.CurrentCtr.Ctr.CtrCod > 0) ? Gbl.CurrentCtr.Ctr.ShortName :
((Gbl.CurrentIns.Ins.InsCod > 0) ? Gbl.CurrentIns.Ins.ShortName :
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]))));
}
else // No country selected
/* This main title takes up space but it is invisible */
fprintf (Gbl.F.Out,"<span id=\"big_full_name\" class=\"HIDDEN\">"
"%s"
"</span>"
"<span class=\"NOT_SHOWN\">"
fprintf (Gbl.F.Out,"<div id=\"big_full_name\" class=\"HIDDEN\">"
"%s" // Full name
"</div>"
"<div class=\"NOT_SHOWN\">"
" / " // To separate
"</span>"
"<abbr id=\"big_short_name\" class=\"HIDDEN\">"
"%s"
"</abbr>",
Cfg_PLATFORM_FULL_NAME,Cfg_PLATFORM_SHORT_NAME);
"</div>"
"<div id=\"big_short_name\" class=\"HIDDEN\">"
"%s" // Short name
"</div>",
Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_SHORT_NAME);
fprintf (Gbl.F.Out,"</h1>");
}