diff --git a/css/swad16.147.css b/css/swad16.147.css index cddbfe642..851bdd27d 100644 --- a/css/swad16.147.css +++ b/css/swad16.147.css @@ -2480,6 +2480,15 @@ a:hover img.CENTRE_PHOTO_SHOW text-overflow:ellipsis; } +/***************************** Listing of users ******************************/ +.USR_DAT + { + box-sizing:border-box; + max-width:120px; + overflow:hidden; + text-overflow:ellipsis; + } + /**************************** Enrollment requests ****************************/ .REQUESTER_NAME { diff --git a/swad_changelog.h b/swad_changelog.h index 677d0d41e..060c7da12 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -197,13 +197,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.147.9 (2017-03-06)" +#define Log_PLATFORM_VERSION "SWAD 16.147.10 (2017-03-06)" #define CSS_FILE "swad16.147.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.147.10:Mar 06, 2017 Changes in layout of users' listing. (216394 lines) Version 16.147.9: Mar 06, 2017 Changes in layout of header. (216389 lines) Version 16.147.8: Mar 05, 2017 Changes in layout of timetable. (216374 lines) Version 16.147.7: Mar 05, 2017 Changes in layout of social timeline. (216372 lines) diff --git a/swad_user.c b/swad_user.c index 264207e3a..d22353cfa 100644 --- a/swad_user.c +++ b/swad_user.c @@ -140,7 +140,6 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat); static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames); static void Usr_WriteRowTchAllData (struct UsrData *UsrDat); static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat); -static void Usr_RestrictLengthUsrName (struct UsrData *UsrDat); static void Usr_WriteMainUsrDataExceptUsrID (struct UsrData *UsrDat, const char *BgColor); static void Usr_WriteEmail (struct UsrData *UsrDat,const char *BgColor); @@ -3203,7 +3202,6 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, /***** Write rest of main user's data *****/ Ins.InsCod = UsrDat->InsCod; Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA); - Usr_RestrictLengthUsrName (UsrDat); Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor); fprintf (Gbl.F.Out,"",BgColor); Ins_DrawInstitutionLogoWithLink (&Ins,25); @@ -3551,7 +3549,6 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) /***** Write rest of main administrator's data *****/ Ins.InsCod = UsrDat->InsCod; Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA); - Usr_RestrictLengthUsrName (UsrDat); Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]); fprintf (Gbl.F.Out,"",Gbl.ColorRows[Gbl.RowEvenOdd]); Ins_DrawInstitutionLogoWithLink (&Ins,25); @@ -3564,17 +3561,6 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) Usr_NUM_MAIN_FIELDS_DATA_ADM-1); } -/*****************************************************************************/ -/***************** Restrict the length of the user's name ********************/ -/*****************************************************************************/ - -static void Usr_RestrictLengthUsrName (struct UsrData *UsrDat) - { - Str_LimitLengthHTMLStr (UsrDat->FirstName,10); - Str_LimitLengthHTMLStr (UsrDat->Surname1,10); - Str_LimitLengthHTMLStr (UsrDat->Surname2,10); - } - /*****************************************************************************/ /************************* Write main data of a user *************************/ /*****************************************************************************/ @@ -3630,23 +3616,36 @@ static void Usr_WriteUsrData (const char *BgColor, const char *Data,const char *Link, bool NonBreak,bool Accepted) { + /***** Start table cell *****/ fprintf (Gbl.F.Out,"", Accepted ? (NonBreak ? "DAT_SMALL_NOBR_N" : "DAT_SMALL_N") : (NonBreak ? "DAT_SMALL_NOBR" : "DAT_SMALL"), BgColor); - if (Link != NULL) + + /***** Container to limit length *****/ + fprintf (Gbl.F.Out,"
"); + + /***** Start link *****/ + if (Link) fprintf (Gbl.F.Out,"", Link, Accepted ? "DAT_SMALL_NOBR_N" : "DAT_SMALL_NOBR"); + + /***** Write data *****/ fprintf (Gbl.F.Out,"%s",Data); if (NonBreak) fprintf (Gbl.F.Out," "); - if (Link != NULL) + + /***** End link *****/ + if (Link) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + + /***** End container and table cell *****/ + fprintf (Gbl.F.Out,"
" + ""); } /*****************************************************************************/