mirror of https://github.com/acanas/swad-core.git
Version 16.146
This commit is contained in:
parent
7fccdc15c9
commit
8292282fb2
|
@ -1984,11 +1984,34 @@ a:hover img.CENTRE_PHOTO_SHOW
|
|||
.REC_DAT {color:#808080; font-size:13pt; line-height:110%;}
|
||||
.REC_DAT_BOLD {color:black; font-size:13pt; line-height:110%;}
|
||||
|
||||
/******************************** Class photo ********************************/
|
||||
.CLASSPHOTO_TITLE
|
||||
{
|
||||
color:#606060;
|
||||
font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif;
|
||||
font-size:13pt;
|
||||
}
|
||||
.CLASSPHOTO
|
||||
{
|
||||
color:#606060;
|
||||
font-size:10pt;
|
||||
line-height:110%;
|
||||
white-space:nowrap;
|
||||
}
|
||||
.CLASSPHOTO_CAPTION
|
||||
{
|
||||
display:block;
|
||||
box-sizing:border-box;
|
||||
max-width:60px;
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
.MSJ_AVISO {color:#632921; font-size:12pt;}
|
||||
.TIT_TBL {color:#4D88A1; font-size:12pt; font-weight:bold;}
|
||||
.TIT_CLASSPHOTO {font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif; color:#606060; font-size:13pt;}
|
||||
.CLASSPHOTO {color:#606060; font-size:10pt; line-height:110%; white-space:nowrap;}
|
||||
|
||||
.GRP_TITLE {color:#4D88A1; font-size:15pt; font-weight:bold;}
|
||||
|
|
@ -197,13 +197,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.145.2 (2017-03-02)"
|
||||
#define CSS_FILE "swad16.144.css"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.146 (2017-03-03)"
|
||||
#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: Mar 02, 2017 Changes in layout of class photos. (216351 lines)
|
||||
Version 16.145.2: Mar 02, 2017 Some help URLs translated to spanish. (216338 lines)
|
||||
Version 16.145.1: Mar 02, 2017 Changes in several help URLs. (216337 lines)
|
||||
Version 16.145: Mar 02, 2017 Support for languages in help.
|
||||
|
|
|
@ -1761,11 +1761,12 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
|||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/***** Second column: class photo title *****/
|
||||
fprintf (Gbl.F.Out,"<td class=\"TIT_CLASSPHOTO CENTER_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO_TITLE CENTER_MIDDLE\">");
|
||||
if (InsCod > 0)
|
||||
{
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"TIT_CLASSPHOTO\">",
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\""
|
||||
" class=\"CLASSPHOTO_TITLE\">",
|
||||
Ins.WWW);
|
||||
fprintf (Gbl.F.Out,"%s",Ins.FullName);
|
||||
if (!PrintView)
|
||||
|
@ -1776,7 +1777,8 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
|||
if (Ins.InsCod > 0)
|
||||
fprintf (Gbl.F.Out," - ");
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"TIT_CLASSPHOTO\">",
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\""
|
||||
" class=\"CLASSPHOTO_TITLE\">",
|
||||
Deg.WWW);
|
||||
fprintf (Gbl.F.Out,"%s",Deg.FullName);
|
||||
if (!PrintView)
|
||||
|
@ -1800,7 +1802,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
|||
{
|
||||
if (!PrintView)
|
||||
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\""
|
||||
" class=\"TIT_CLASSPHOTO\">",
|
||||
" class=\"CLASSPHOTO_TITLE\">",
|
||||
Deg.WWW);
|
||||
Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShrtName,40,NULL,true);
|
||||
if (!PrintView)
|
||||
|
|
37
swad_photo.c
37
swad_photo.c
|
@ -1971,8 +1971,10 @@ static void Pho_GetMaxStdsPerDegree (void)
|
|||
unsigned long NumRows;
|
||||
|
||||
/***** Get maximum number of students in a degree from database *****/
|
||||
sprintf (Query,"SELECT MAX(NumStds),MAX(NumStdsWithPhoto),MAX(NumStdsWithPhoto/NumStds)"
|
||||
" FROM sta_degrees WHERE Sex='all' AND NumStds>'0'");
|
||||
sprintf (Query,"SELECT MAX(NumStds),MAX(NumStdsWithPhoto),"
|
||||
"MAX(NumStdsWithPhoto/NumStds)"
|
||||
" FROM sta_degrees"
|
||||
" WHERE Sex='all' AND NumStds>'0'");
|
||||
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get maximum number of students in a degree");
|
||||
|
||||
/***** Count number of rows in result *****/
|
||||
|
@ -2177,7 +2179,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
|
|||
{
|
||||
/***** Show average photo of students belonging to this degree *****/
|
||||
Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto);
|
||||
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE COLOR%u\">",
|
||||
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO CENTER_MIDDLE COLOR%u\">",
|
||||
Gbl.RowEvenOdd);
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto);
|
||||
|
@ -2325,7 +2327,6 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
char PathRelAvgPhoto[PATH_MAX + 1];
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
char PhotoCaption[512];
|
||||
char CopyOfDegShortName[Deg_MAX_LENGTH_DEGREE_SHRT_NAME + 1]; // Short name of degree
|
||||
bool ShowDegPhoto;
|
||||
char IdCaption[Act_MAX_LENGTH_ID];
|
||||
|
||||
|
@ -2333,16 +2334,10 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
PhotoURL[0] = '\0';
|
||||
PhotoCaption[0] = '\0';
|
||||
|
||||
/***** Compute photo width and height to be proportional to number of students *****/
|
||||
/***** Compute photo width and height
|
||||
to be proportional to number of students *****/
|
||||
Pho_ComputePhotoSize (NumStds,NumStdsWithPhoto,&PhotoWidth,&PhotoHeight);
|
||||
|
||||
/***** Make a copy of the degree short name *****/
|
||||
Str_Copy (CopyOfDegShortName,Deg->ShrtName,
|
||||
Deg_MAX_LENGTH_DEGREE_SHRT_NAME);
|
||||
Str_LimitLengthHTMLStr (CopyOfDegShortName,
|
||||
SeeOrPrint == Pho_DEGREES_SEE ? 10 :
|
||||
15);
|
||||
|
||||
/***** Put link to degree *****/
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
{
|
||||
|
@ -2385,7 +2380,9 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
0);
|
||||
Act_SetUniqueId (IdCaption);
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s\" class=\"NOT_SHOWN\">"
|
||||
"<div class=\"ZOOM_TXT_LINE DAT_N\">"
|
||||
"%s"
|
||||
"</div>"
|
||||
"</div>",
|
||||
IdCaption,PhotoCaption);
|
||||
}
|
||||
|
@ -2398,7 +2395,8 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
{
|
||||
fprintf (Gbl.F.Out,"%s\"",PhotoURL);
|
||||
if (PhotoCaption[0])
|
||||
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s');\" onmouseout=\"noZoom();\"",
|
||||
fprintf (Gbl.F.Out," onmouseover=\"zoom(this,'%s','%s');\""
|
||||
" onmouseout=\"noZoom();\"",
|
||||
PhotoURL,IdCaption);
|
||||
}
|
||||
else
|
||||
|
@ -2409,10 +2407,13 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
PhotoWidth,PhotoHeight);
|
||||
|
||||
/***** Caption *****/
|
||||
if (SeeOrPrint == Pho_DEGREES_PRINT)
|
||||
fprintf (Gbl.F.Out,"<span class=\"CLASSPHOTO\">");
|
||||
fprintf (Gbl.F.Out,"<br />%s<br />%d %s<br />%d %s<br />(%d%%)",
|
||||
CopyOfDegShortName,
|
||||
fprintf (Gbl.F.Out,"<div class=\"CLASSPHOTO_CAPTION\">"
|
||||
"%s<br />"
|
||||
"%d %s<br />"
|
||||
"%d %s<br />"
|
||||
"(%d%%)"
|
||||
"</div>",
|
||||
Deg->ShrtName,
|
||||
NumStds,Txt_students_ABBREVIATION,
|
||||
NumStdsWithPhoto,Txt_photos,
|
||||
NumStds > 0 ? (int) (((NumStdsWithPhoto * 100.0) / NumStds) + 0.5) :
|
||||
|
@ -2422,8 +2423,6 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
fprintf (Gbl.F.Out,"</a>");
|
||||
Act_FormEnd ();
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out,"</span>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -142,7 +142,7 @@ static void TT_ShowTimeTableGrpsSelected (void)
|
|||
extern const char *Txt_Groups_OF_A_USER;
|
||||
extern const char *Txt_All_groups;
|
||||
|
||||
fprintf (Gbl.F.Out,"<div class=\"TIT_CLASSPHOTO CENTER_MIDDLE\">");
|
||||
fprintf (Gbl.F.Out,"<div class=\"CLASSPHOTO_TITLE CENTER_MIDDLE\">");
|
||||
switch (Gbl.CurrentCrs.Grps.WhichGrps)
|
||||
{
|
||||
case Grp_ONLY_MY_GROUPS:
|
||||
|
|
17
swad_user.c
17
swad_user.c
|
@ -7949,7 +7949,6 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
bool ShowPhoto;
|
||||
bool UsrIsTheMsgSender;
|
||||
const char *ClassPhoto = "PHOTO21x28"; // Default photo size
|
||||
int LengthUsrData = 10; // Maximum number of characters of user data
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
struct UsrData UsrDat;
|
||||
|
||||
|
@ -7958,16 +7957,13 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
{
|
||||
case Usr_CLASS_PHOTO_SEL:
|
||||
ClassPhoto = "PHOTO21x28";
|
||||
LengthUsrData = 10;
|
||||
break;
|
||||
case Usr_CLASS_PHOTO_SEL_SEE:
|
||||
case Usr_CLASS_PHOTO_SEE:
|
||||
ClassPhoto = "PHOTO45x60";
|
||||
LengthUsrData = 10;
|
||||
break;
|
||||
case Usr_CLASS_PHOTO_PRN:
|
||||
ClassPhoto = "PHOTO45x60";
|
||||
LengthUsrData = 15;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -8013,33 +8009,26 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
ClassPhoto,Pho_ZOOM,false);
|
||||
|
||||
/***** Photo foot *****/
|
||||
fprintf (Gbl.F.Out,"<br />");
|
||||
fprintf (Gbl.F.Out,"<div class=\"CLASSPHOTO_CAPTION\">");
|
||||
|
||||
/* Name */
|
||||
if (UsrDat.FirstName[0])
|
||||
{
|
||||
Str_LimitLengthHTMLStr (UsrDat.FirstName,LengthUsrData);
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat.FirstName);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out," ");
|
||||
fprintf (Gbl.F.Out,"<br />");
|
||||
if (UsrDat.Surname1[0])
|
||||
{
|
||||
Str_LimitLengthHTMLStr (UsrDat.Surname1,LengthUsrData);
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat.Surname1);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out," ");
|
||||
fprintf (Gbl.F.Out,"<br />");
|
||||
if (UsrDat.Surname2[0])
|
||||
{
|
||||
Str_LimitLengthHTMLStr (UsrDat.Surname2,LengthUsrData);
|
||||
fprintf (Gbl.F.Out,"%s",UsrDat.Surname2);
|
||||
}
|
||||
else
|
||||
fprintf (Gbl.F.Out," ");
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** End of user's cell *****/
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
|
|
Loading…
Reference in New Issue