diff --git a/css/swad16.144.css b/css/swad16.146.css
similarity index 99%
rename from css/swad16.144.css
rename to css/swad16.146.css
index a0ac437d8..4e3d72c36 100644
--- a/css/swad16.144.css
+++ b/css/swad16.146.css
@@ -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;}
diff --git a/swad_changelog.h b/swad_changelog.h
index 159d3307d..3568c01f5 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -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.
diff --git a/swad_layout.c b/swad_layout.c
index b3ab50fa9..d049ef5a1 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -1761,11 +1761,12 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
fprintf (Gbl.F.Out,"");
/***** Second column: class photo title *****/
- fprintf (Gbl.F.Out,"
");
+ fprintf (Gbl.F.Out," | ");
if (InsCod > 0)
{
if (!PrintView)
- fprintf (Gbl.F.Out,"",
+ fprintf (Gbl.F.Out,"",
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,"",
+ fprintf (Gbl.F.Out,"",
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,"",
+ " class=\"CLASSPHOTO_TITLE\">",
Deg.WWW);
Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShrtName,40,NULL,true);
if (!PrintView)
diff --git a/swad_photo.c b/swad_photo.c
index af214474a..37caccb00 100644
--- a/swad_photo.c
+++ b/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," | ",
+ fprintf (Gbl.F.Out," | ",
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,"",
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,"");
- fprintf (Gbl.F.Out," %s %d %s %d %s (%d%%)",
- CopyOfDegShortName,
+ fprintf (Gbl.F.Out,""
+ "%s "
+ "%d %s "
+ "%d %s "
+ "(%d%%)"
+ " ",
+ 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,"");
Act_FormEnd ();
}
- else
- fprintf (Gbl.F.Out,"");
}
/*****************************************************************************/
diff --git a/swad_timetable.c b/swad_timetable.c
index 52952abc8..b4a88397d 100644
--- a/swad_timetable.c
+++ b/swad_timetable.c
@@ -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,"");
+ fprintf (Gbl.F.Out," ");
switch (Gbl.CurrentCrs.Grps.WhichGrps)
{
case Grp_ONLY_MY_GROUPS:
diff --git a/swad_user.c b/swad_user.c
index a9e2a6e97..2b1d3269e 100644
--- a/swad_user.c
+++ b/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," ");
+ fprintf (Gbl.F.Out," ");
/* 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," ");
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," ");
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," ");
+
/***** End of user's cell *****/
fprintf (Gbl.F.Out," | ");