diff --git a/css/swad16.147.css b/css/swad16.147.css index be72b5031..16b8a8e9a 100644 --- a/css/swad16.147.css +++ b/css/swad16.147.css @@ -1044,7 +1044,7 @@ a:hover /* Default ==> underlined */ .BLUE_SUBTITLE_ACTION {color:#4D88A1; font-size:12pt;} .YELLOW_SUBTITLE_ACTION {color:#BD4815; font-size:12pt;} -/************************* Users connected globally **************************/ +/***************************** Users connected *******************************/ .CONNECTED { box-sizing:border-box; @@ -1078,6 +1078,34 @@ a:hover /* Default ==> underlined */ color:#398000; font-size:12pt; } +.CON_USR_NARROW + { + width:68px; + text-align:left; + vertical-align:middle; + } +.CON_USR_WIDE + { + width:320px; + text-align:left; + vertical-align:middle; + } +.CON_NAME_NARROW + { + max-width:68px; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + } +.CON_NAME_WIDE + { + max-width:320px; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + } +.CON_NO_CRS {color:#B8D070; font-size:11pt; line-height:110%; white-space:nowrap;} +.CON_CRS {color:#398000; font-size:11pt; line-height:110%; white-space:nowrap;} /*************************** Most frequent actions ***************************/ #MFU_actions @@ -2890,7 +2918,7 @@ a:hover img.CENTRE_PHOTO_SHOW font-size:30pt; font-weight:bold; } -.FOLLOW_USR_PHOTO +.FOLLOW_PHOTO { box-sizing:border-box; width:72px; @@ -2898,22 +2926,27 @@ a:hover img.CENTRE_PHOTO_SHOW text-align:left; vertical-align:bottom; } +.FOLLOW_USR + { + box-sizing:border-box; + width:100px; + height:90px; + } .FOLLOW_USR_NAME { box-sizing:border-box; - min-width:106px; - height:90px; + max-width:100px; text-align:left; vertical-align:bottom; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; } .FOLLOW_USR_ICO { padding:4px; } -.CON {color:#B8D070; font-size:11pt; line-height:110%; white-space:nowrap;} -.CON_CRS {color:#398000; font-size:11pt; line-height:110%; white-space:nowrap;} - /****************************** Users ranking ********************************/ .RANK_USR { diff --git a/swad_changelog.h b/swad_changelog.h index be8ebe6d6..b9537638d 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -197,13 +197,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.147.2 (2017-03-04)" +#define Log_PLATFORM_VERSION "SWAD 16.147.3 (2017-03-04)" #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.3: Mar 05, 2017 Changes in layout of followed users, users to follow and connected users. (216365 lines) Version 16.147.2: Mar 05, 2017 Changes in layout of notice author. (216316 lines) Version 16.147.1: Mar 05, 2017 Changes in layout of notice author. (216300 lines) Version 16.147: Mar 04, 2017 Changes in layout of file browser. (216292 lines) diff --git a/swad_connected.c b/swad_connected.c index a304bd0d9..4dfa1481f 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -946,7 +946,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) bool ShowPhoto; char PhotoURL[PATH_MAX + 1]; const char *Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_CRS" : - "CON"); + "CON_NO_CRS"); long UsrCod; struct UsrData OtherUsrDat; struct UsrData *UsrDat; @@ -983,17 +983,20 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) fprintf (Gbl.F.Out,""); /***** Write full name and link *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Font,Gbl.RowEvenOdd); Act_FormStartUnique ((Role == Rol_STUDENT) ? ActSeeRecOneStd : ActSeeRecOneTch); // Must be unique because // the list of connected users // is dynamically updated via AJAX Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + fprintf (Gbl.F.Out,"
"); // To limit width Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font); - Usr_RestrictLengthAndWriteName (UsrDat,8); - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s
%s",UsrDat->FirstName,UsrDat->Surname1); + if (UsrDat->Surname2[0]) + fprintf (Gbl.F.Out," %s",UsrDat->Surname2); + fprintf (Gbl.F.Out,"" + "
"); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1156,7 +1159,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R /* Get course code (row[1]) */ ThisCrs = (Str_ConvertStrCodToLongCod (row[1]) == Gbl.CurrentCrs.Crs.CrsCod); Font = (ThisCrs ? "CON_CRS" : - "CON"); + "CON_NO_CRS"); /* Compute time from last access */ if (sscanf (row[2],"%ld",&TimeDiff) != 1) @@ -1174,22 +1177,25 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R fprintf (Gbl.F.Out,""); /***** Write full name and link *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Font,Gbl.RowEvenOdd); if (PutLinkToRecord) { Act_FormStart ((Role == Rol_STUDENT) ? ActSeeRecOneStd : - ActSeeRecOneTch); + ActSeeRecOneTch); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); - Act_LinkFormSubmit (UsrDat.FullName,Font,NULL); } - Usr_RestrictLengthAndWriteName (&UsrDat,40); + fprintf (Gbl.F.Out,"
"); // To limit width + if (PutLinkToRecord) + Act_LinkFormSubmit (UsrDat.FullName,Font,NULL); + fprintf (Gbl.F.Out,"%s
%s",UsrDat.FirstName,UsrDat.Surname1); + if (UsrDat.Surname2[0]) + fprintf (Gbl.F.Out," %s",UsrDat.Surname2); if (PutLinkToRecord) - { fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"
"); + if (PutLinkToRecord) Act_FormEnd (); - } fprintf (Gbl.F.Out,""); /***** Write time from last access *****/ diff --git a/swad_follow.c b/swad_follow.c index 7c150f698..3feb2d7ca 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -821,7 +821,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat); /***** Show user's photo *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); if (Visible) { ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); @@ -832,15 +832,19 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) fprintf (Gbl.F.Out,""); /***** Show user's name and icon to follow/unfollow *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); if (Visible) { /* Put form to go to public profile */ Act_FormStart (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + fprintf (Gbl.F.Out,"
"); // To limit width Act_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL); - Usr_RestrictLengthAndWriteName (UsrDat,10); - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s
%s",UsrDat->FirstName,UsrDat->Surname1); + if (UsrDat->Surname2[0]) + fprintf (Gbl.F.Out," %s",UsrDat->Surname2); + fprintf (Gbl.F.Out,"" + "
"); Act_FormEnd (); } @@ -887,7 +891,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) fprintf (Gbl.F.Out,""); /***** User's name *****/ - fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); if (Visible) @@ -895,9 +899,13 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) /* Put form to go to public profile */ Act_FormStart (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + fprintf (Gbl.F.Out,"
"); // To limit width Act_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL); - Usr_RestrictLengthAndWriteName (UsrDat,10); - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s
%s",UsrDat->FirstName,UsrDat->Surname1); + if (UsrDat->Surname2[0]) + fprintf (Gbl.F.Out," %s",UsrDat->Surname2); + fprintf (Gbl.F.Out,"" + "
"); Act_FormEnd (); } fprintf (Gbl.F.Out,"");