diff --git a/css/swad_desktop.css b/css/swad_desktop.css index 05e742ea7..2f1142808 100644 --- a/css/swad_desktop.css +++ b/css/swad_desktop.css @@ -271,7 +271,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} /********************************* Frame 10 **********************************/ .FRAME10 { - margin:4px 0; + margin:0; padding:0; background-color:white; border-radius:4px; @@ -732,7 +732,7 @@ a:hover img.CENTRE_PHOTO_SHOW .HEAD_REC {font-family:Georgia, "DejaVu LGC Serif", "Bitstream Vera Serif", serif; color:#808080; font-size:10pt;} .HEAD_REC_SMALL {font-family:Georgia, "DejaVu LGC Serif", "Bitstream Vera Serif", serif; color:#808080; font-size:9pt;} .REC_NAME {color:#808080; font-size:16pt; font-weight:bold;} -.REC_NICK {color:#808080; font-size:14pt; font-weight:bold;} +.REC_NICK {color:#808080; font-size:12pt; font-weight:bold;} .DAT_REC {color:#404040; font-size:9pt; line-height:110%;} .DAT_REC_SMALL {color:#808080; font-size:9pt; line-height:110%;} .DAT_REC_SMALL_BOLD {color:#202020; font-size:9pt; line-height:110%;} @@ -823,10 +823,33 @@ a:hover img.CENTRE_PHOTO_SHOW /***************************** Public user's profile *************************/ .FOLLOW { - color:#808080; + color:#C0C0C0; font-size:24pt; font-weight:bold; } +.FOLLOW_B + { + color:#404040; + font-size:24pt; + font-weight:bold; + } +.PRF_ICON_CONTAINER + { + width:20px; + } +.PRF_ICON + { + margin:auto; + display:block; + width:16px; + height:16px; + opacity:0.33; + } +.PRF_FIG + { + text-align:left; + vertical-align:middle; + } .CON {color:#B8D070; font-size:9pt; line-height:110%; white-space:nowrap;} .CON_CRS {color:#398000; font-size:9pt; line-height:110%; white-space:nowrap;} diff --git a/css/swad_mobile.css b/css/swad_mobile.css index e0f9f343c..97aeaae41 100644 --- a/css/swad_mobile.css +++ b/css/swad_mobile.css @@ -235,7 +235,7 @@ p {margin:0;} /********************************* Frame 10 **********************************/ .FRAME10 { - margin:4px 0; + margin:0; padding:0; background-color:white; border-radius:8px; @@ -636,10 +636,33 @@ a:hover img.CENTRE_PHOTO_SHOW /***************************** Public user's profile *************************/ .FOLLOW { - color:#808080; + color:#C0C0C0; font-size:28pt; font-weight:bold; } +.FOLLOW_B + { + color:#000000; + font-size:28pt; + font-weight:bold; + } +.PRF_ICON_CONTAINER + { + width:20px; + } +.PRF_ICON + { + margin:auto; + display:block; + width:16px; + height:16px; + opacity:0.33; + } +.PRF_FIG + { + text-align:left; + vertical-align:middle; + } .CON {color:#B8D070; font-size:9pt; line-height:110%; white-space:nowrap;} .CON_CRS {color:#398000; font-size:9pt; line-height:110%; white-space:nowrap;} diff --git a/icon/500px320x320.png b/icon/500px320x320.png new file mode 100644 index 000000000..0045a4f0a Binary files /dev/null and b/icon/500px320x320.png differ diff --git a/icon/click64x64.gif b/icon/click64x64.gif new file mode 100644 index 000000000..5cdf07fbb Binary files /dev/null and b/icon/click64x64.gif differ diff --git a/icon/clock64x64.gif b/icon/clock64x64.gif new file mode 100644 index 000000000..896ad2ed0 Binary files /dev/null and b/icon/clock64x64.gif differ diff --git a/icon/deviantart320x320.png b/icon/deviantart320x320.png new file mode 100644 index 000000000..beed0f3fd Binary files /dev/null and b/icon/deviantart320x320.png differ diff --git a/icon/download64x64.gif b/icon/download64x64.gif new file mode 100644 index 000000000..131d5fd06 Binary files /dev/null and b/icon/download64x64.gif differ diff --git a/icon/follow320x320.png b/icon/follow320x320.png new file mode 100644 index 000000000..95cd0b0df Binary files /dev/null and b/icon/follow320x320.png differ diff --git a/icon/forum64x64.gif b/icon/forum64x64.gif new file mode 100644 index 000000000..bac475dab Binary files /dev/null and b/icon/forum64x64.gif differ diff --git a/icon/iconset/awesome/action64x64/adm64x64.gif b/icon/iconset/awesome/action64x64/adm64x64.gif new file mode 100644 index 000000000..f97bb87f2 Binary files /dev/null and b/icon/iconset/awesome/action64x64/adm64x64.gif differ diff --git a/icon/iconset/awesome/action64x64/adms64x64.gif b/icon/iconset/awesome/action64x64/adms64x64.gif new file mode 100644 index 000000000..c43efa08e Binary files /dev/null and b/icon/iconset/awesome/action64x64/adms64x64.gif differ diff --git a/icon/iconset/awesome/action64x64/click64x64.gif b/icon/iconset/awesome/action64x64/click64x64.gif new file mode 100644 index 000000000..5cdf07fbb Binary files /dev/null and b/icon/iconset/awesome/action64x64/click64x64.gif differ diff --git a/icon/iconset/awesome/action64x64/deg_alt64x64.gif b/icon/iconset/awesome/action64x64/deg_alt64x64.gif deleted file mode 100644 index 649fa5acc..000000000 Binary files a/icon/iconset/awesome/action64x64/deg_alt64x64.gif and /dev/null differ diff --git a/icon/iconset/awesome/action64x64/tch64x64.gif b/icon/iconset/awesome/action64x64/tch64x64.gif new file mode 100644 index 000000000..dd04a0f4a Binary files /dev/null and b/icon/iconset/awesome/action64x64/tch64x64.gif differ diff --git a/icon/iconset/awesome/action64x64/tchs64x64.gif b/icon/iconset/awesome/action64x64/tchs64x64.gif new file mode 100644 index 000000000..142f74253 Binary files /dev/null and b/icon/iconset/awesome/action64x64/tchs64x64.gif differ diff --git a/icon/iconset/awesome/action64x64/usrs64x64.gif b/icon/iconset/awesome/action64x64/usrs64x64.gif new file mode 100644 index 000000000..e6f962072 Binary files /dev/null and b/icon/iconset/awesome/action64x64/usrs64x64.gif differ diff --git a/icon/iconset/nuvola/action64x64/adm64x64.gif b/icon/iconset/nuvola/action64x64/adm64x64.gif new file mode 100644 index 000000000..5b95c3298 Binary files /dev/null and b/icon/iconset/nuvola/action64x64/adm64x64.gif differ diff --git a/icon/iconset/nuvola/action64x64/adms64x64.gif b/icon/iconset/nuvola/action64x64/adms64x64.gif new file mode 100644 index 000000000..89f43234f Binary files /dev/null and b/icon/iconset/nuvola/action64x64/adms64x64.gif differ diff --git a/icon/iconset/nuvola/action64x64/click64x64.gif b/icon/iconset/nuvola/action64x64/click64x64.gif new file mode 100644 index 000000000..1398eece7 Binary files /dev/null and b/icon/iconset/nuvola/action64x64/click64x64.gif differ diff --git a/icon/iconset/nuvola/action64x64/tch64x64.gif b/icon/iconset/nuvola/action64x64/tch64x64.gif new file mode 100644 index 000000000..5b95c3298 Binary files /dev/null and b/icon/iconset/nuvola/action64x64/tch64x64.gif differ diff --git a/icon/iconset/nuvola/action64x64/tchs64x64.gif b/icon/iconset/nuvola/action64x64/tchs64x64.gif new file mode 100644 index 000000000..5b95c3298 Binary files /dev/null and b/icon/iconset/nuvola/action64x64/tchs64x64.gif differ diff --git a/icon/iconset/nuvola/action64x64/usrs64x64.gif b/icon/iconset/nuvola/action64x64/usrs64x64.gif new file mode 100644 index 000000000..ecf887e16 Binary files /dev/null and b/icon/iconset/nuvola/action64x64/usrs64x64.gif differ diff --git a/icon/msg64x64.gif b/icon/msg64x64.gif new file mode 100644 index 000000000..d96da85f1 Binary files /dev/null and b/icon/msg64x64.gif differ diff --git a/icon/std64x64.gif b/icon/std64x64.gif new file mode 100644 index 000000000..85442a188 Binary files /dev/null and b/icon/std64x64.gif differ diff --git a/icon/tch64x64.gif b/icon/tch64x64.gif new file mode 100644 index 000000000..dd04a0f4a Binary files /dev/null and b/icon/tch64x64.gif differ diff --git a/icon/unfollow320x320.png b/icon/unfollow320x320.png new file mode 100644 index 000000000..d8990c527 Binary files /dev/null and b/icon/unfollow320x320.png differ diff --git a/icon/usr64x64.gif b/icon/usr64x64.gif new file mode 100644 index 000000000..e6f962072 Binary files /dev/null and b/icon/usr64x64.gif differ diff --git a/swad_changelog.h b/swad_changelog.h index 2daae2c9c..5d6ce738c 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.98.5 (2015/03/21)" +#define Log_PLATFORM_VERSION "SWAD 14.99 (2015/03/21)" // 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 14.99: Mar 21, 2015 Icons instead of text in user's profile. + Lot of changes in layout of user's profile. (183519 lines) Version 14.98.5: Mar 21, 2015 New icons for some options. (183431 lines) Version 14.98.4: Mar 20, 2015 Fixed bugs in marks. (183430 lines) Version 14.98.3: Mar 19, 2015 Changes in user's profile to speedup page generation. (183397 lines) diff --git a/swad_follow.c b/swad_follow.c index f54f9e173..606b00c32 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -42,7 +42,7 @@ /***************************** Private constants *****************************/ /*****************************************************************************/ -#define Fol_NUM_COLUMNS_FOLLOW 3 +#define Fol_NUM_COLUMNS_FOLLOW 5 /*****************************************************************************/ /****************************** Internal types *******************************/ @@ -62,6 +62,10 @@ extern struct Globals Gbl; /***************************** Private prototypes ****************************/ /*****************************************************************************/ +static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, + unsigned NumUsrs, + Act_Action_t Action, + const char *Title); static unsigned Fol_GetNumFollowing (long UsrCod); static unsigned Fol_GetNumFollowers (long UsrCod); static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat); @@ -90,69 +94,87 @@ bool Fol_CheckUsrIsFollowerOf (long FollowerCod,long FollowedCod) void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat) { - extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_Following; extern const char *Txt_Followers; - unsigned Following = Fol_GetNumFollowing (UsrDat->UsrCod); - unsigned Followers = Fol_GetNumFollowers (UsrDat->UsrCod); /***** Start table *****/ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"
" ""); /***** Followed users *****/ - fprintf (Gbl.F.Out,"", - The_ClassFormul[Gbl.Prefs.Theme], - Txt_Following); + Fol_ShowNumberOfFollowingOrFollowers (UsrDat, + Fol_GetNumFollowing (UsrDat->UsrCod), + ActSeeFlg,Txt_Following); /***** Followers *****/ - fprintf (Gbl.F.Out,"", - The_ClassFormul[Gbl.Prefs.Theme], - Txt_Followers); + Fol_ShowNumberOfFollowingOrFollowers (UsrDat, + Fol_GetNumFollowers (UsrDat->UsrCod), + ActSeeFlr,Txt_Followers); /***** End table *****/ fprintf (Gbl.F.Out,"" "
" - "
"); - if (Following) - { - /* Form to list followed users */ - Act_FormStart (ActSeeFlg); - Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); - Act_LinkFormSubmit (Txt_Following,"FOLLOW"); - } - fprintf (Gbl.F.Out,"%u",Following); - if (Following) - { - fprintf (Gbl.F.Out,""); - Act_FormEnd (); - } - fprintf (Gbl.F.Out,"
" - "
" - "%s
" - "
" - "
"); - if (Followers) - { - /* Form to list followers */ - Act_FormStart (ActSeeFlr); - Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); - Act_LinkFormSubmit (Txt_Followers,"FOLLOW"); - } - fprintf (Gbl.F.Out,"%u",Followers); - if (Followers) - { - fprintf (Gbl.F.Out,""); - Act_FormEnd (); - } - fprintf (Gbl.F.Out,"
" - "
" - "%s
" - "
"); } +/*****************************************************************************/ +/**************** Show following and followers of a user *********************/ +/*****************************************************************************/ + +static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, + unsigned NumUsrs, + Act_Action_t Action, + const char *Title) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *The_ClassFormulB[The_NUM_THEMES]; + + + fprintf (Gbl.F.Out,""); + /* Number */ + fprintf (Gbl.F.Out,"
", + (Gbl.CurrentAct == Action) ? "FOLLOW_B" : + "FOLLOW"); + if (NumUsrs) + { + /* Form to list followed users */ + Act_FormStart (Action); + Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); + Act_LinkFormSubmit (Title, + (Gbl.CurrentAct == Action) ? "FOLLOW_B" : + "FOLLOW"); + } + fprintf (Gbl.F.Out,"%u",NumUsrs); + if (NumUsrs) + { + fprintf (Gbl.F.Out,""); + Act_FormEnd (); + } + fprintf (Gbl.F.Out,"
"); + + /* Text */ + fprintf (Gbl.F.Out,"
", + (Gbl.CurrentAct == Action) ? The_ClassFormulB[Gbl.Prefs.Theme] : + The_ClassFormul[Gbl.Prefs.Theme]); + if (NumUsrs) + { + /* Form to list followed users */ + Act_FormStart (Action); + Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); + Act_LinkFormSubmit (Title, + (Gbl.CurrentAct == Action) ? The_ClassFormulB[Gbl.Prefs.Theme] : + The_ClassFormul[Gbl.Prefs.Theme]); + } + fprintf (Gbl.F.Out,"%s",Title); + if (NumUsrs) + { + fprintf (Gbl.F.Out,""); + Act_FormEnd (); + } + fprintf (Gbl.F.Out,"
" + ""); + } + /*****************************************************************************/ /*************************** Get number of followed **************************/ /*****************************************************************************/ @@ -213,7 +235,8 @@ void Fol_ListFollowing (void) Usr_UsrDataConstructor (&UsrDat); /***** Start listing *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Following); + fprintf (Gbl.F.Out,""); for (NumUsr = 0; NumUsr < NumUsrs; @@ -236,7 +259,7 @@ void Fol_ListFollowing (void) } /***** End listing *****/ - Lay_EndRoundFrameTable10 (); + fprintf (Gbl.F.Out,"
"); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -284,7 +307,8 @@ void Fol_ListFollowers (void) Usr_UsrDataConstructor (&UsrDat); /***** Start listing *****/ - Lay_StartRoundFrameTable10 (NULL,2,Txt_Followers); + fprintf (Gbl.F.Out,""); for (NumUsr = 0; NumUsr < NumUsrs; @@ -307,7 +331,7 @@ void Fol_ListFollowers (void) } /***** End listing *****/ - Lay_EndRoundFrameTable10 (); + fprintf (Gbl.F.Out,"
"); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -337,7 +361,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat) bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod); /***** Put form to follow / unfollow *****/ - fprintf (Gbl.F.Out,""); if (Visible && Gbl.Usrs.Me.Logged && @@ -350,7 +374,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat) Act_LinkFormSubmit (Txt_Unfollow,NULL); fprintf (Gbl.F.Out,"
" "\"%s\"" + " style=\"width:16px; height:16px;\" alt=\"%s\" />" "
" "", Gbl.Prefs.IconsURL, @@ -388,7 +412,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat) fprintf (Gbl.F.Out,""); /***** Put form to go to public profile *****/ - fprintf (Gbl.F.Out,""); if (Visible && UsrDat->Nickname[0]) @@ -396,7 +420,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat) Act_FormStart (ActSeePubPrf); Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Txt_View_public_profile,"DAT"); - Usr_RestrictLengthAndWriteName (UsrDat,20); + Usr_RestrictLengthAndWriteName (UsrDat,8); fprintf (Gbl.F.Out,""); Act_FormEnd (); } diff --git a/swad_profile.c b/swad_profile.c index 3e728436a..b6f2b3024 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -232,22 +232,28 @@ bool Prf_ShowUserProfile (void) fprintf (Gbl.F.Out,"
" "" "" - "" "" + "" + "" + "" + "" "" "
"); /***** Common record *****/ Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat); - /***** Show following and followers *****/ - Fol_ShowFollowingAndFollowers (&Gbl.Usrs.Other.UsrDat); - fprintf (Gbl.F.Out,""); + " vertical-align:top;\">"); /***** Show details of user's profile *****/ Prf_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat); + fprintf (Gbl.F.Out,"
"); + + /***** Show following and followers *****/ + Fol_ShowFollowingAndFollowers (&Gbl.Usrs.Other.UsrDat); + fprintf (Gbl.F.Out,"
" @@ -326,7 +332,7 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) // char StrTimeGenerationInMicroseconds[64]; /***** Start table *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"
"); /* if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM) { @@ -341,18 +347,16 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) NumTchs = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_TEACHER); NumStds = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_STUDENT); fprintf (Gbl.F.Out,"" - "" - "" "", - The_ClassFormul[Gbl.Prefs.Theme], + Gbl.Prefs.IconsURL, Txt_ROLES_SINGUL_Abc[Rol_ROLE_TEACHER][UsrDat->Sex], NumCrssUsrIsTeacher, (NumCrssUsrIsTeacher == 1) ? Txt_course : @@ -367,18 +371,16 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) NumTchs = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_STUDENT,Rol_ROLE_TEACHER); NumStds = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_STUDENT,Rol_ROLE_STUDENT); fprintf (Gbl.F.Out,"" - "" - "" "", - The_ClassFormul[Gbl.Prefs.Theme], + Gbl.Prefs.IconsURL, Txt_ROLES_SINGUL_Abc[Rol_ROLE_STUDENT][UsrDat->Sex], NumCrssUsrIsStudent, (NumCrssUsrIsStudent == 1) ? Txt_course : @@ -395,18 +397,16 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) else NumPublicFiles = 0; fprintf (Gbl.F.Out,"" - "" - "" "", - The_ClassFormul[Gbl.Prefs.Theme], + Gbl.Prefs.IconsURL, Txt_Files, NumFiles, (NumFiles == 1) ? Txt_file : @@ -418,20 +418,18 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) /* First click time */ fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" diff --git a/swad_record.c b/swad_record.c index 17ed1fef0..8a57f88f7 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1485,7 +1485,7 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat) extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY]; extern const char *Txt_Send; - unsigned RecordWidth = Rec_WIDTH_SHARE_RECORD_BIG; + unsigned RecordWidth = Rec_RECORD_WIDTH_WIDE; char StrRecordWidth[10+1]; unsigned FrameWidth = 10; unsigned Col1Width = 140; @@ -2012,11 +2012,6 @@ void Rec_ShowCommonRecordUnmodifiable (struct UsrData *UsrDat) /*****************************************************************************/ // Show form or only data depending on TypeOfView -#define C1_WIDTH 52 -#define C2_WIDTH 144 -#define C3_WIDTH 210 -#define C4_WIDTH 154 - void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, struct UsrData *UsrDat) { @@ -2050,6 +2045,11 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, extern const char *Txt_Local_address; extern const char *Txt_Family_address; extern const char *Txt_USER_comments; + unsigned RecordWidth; + unsigned C1Width; + unsigned C2Width; + unsigned C3Width; + unsigned C4Width; char StrRecordWidth[10+1]; const char *ClassHead; const char *ClassForm; @@ -2172,15 +2172,33 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, break; } + switch (TypeOfView) + { + case Rec_RECORD_PUBLIC: + RecordWidth = Rec_RECORD_WIDTH_NARROW; + C1Width = Rec_C1_WIDTH_NARROW; + C2Width = Rec_C2_WIDTH_NARROW; + C3Width = Rec_C3_WIDTH_NARROW; + C4Width = Rec_C4_WIDTH_NARROW; + break; + default: + RecordWidth = Rec_RECORD_WIDTH_WIDE; + C1Width = Rec_C1_WIDTH_WIDE; + C2Width = Rec_C2_WIDTH_WIDE; + C3Width = Rec_C3_WIDTH_WIDE; + C4Width = Rec_C4_WIDTH_WIDE; + break; + } + /***** Start frame *****/ - sprintf (StrRecordWidth,"%upx",Rec_WIDTH_SHARE_RECORD_BIG); + sprintf (StrRecordWidth,"%upx",RecordWidth); Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL); /***** Institution *****/ fprintf (Gbl.F.Out,"" ""); @@ -2201,7 +2219,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); fprintf (Gbl.F.Out,"" "" "", - C2_WIDTH + C3_WIDTH, + C2Width + C3Width, UsrDat->FirstName , UsrDat->Surname1, UsrDat->Surname2); @@ -2403,7 +2421,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, fprintf (Gbl.F.Out,"" "" "", - C2_WIDTH,C3_WIDTH,C4_WIDTH); + C2Width,C3Width,C4Width); /***** Country *****/ fprintf (Gbl.F.Out,"" "" @@ -2499,8 +2517,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "" "" "" ""); @@ -2537,7 +2555,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, fprintf (Gbl.F.Out,"" "" "" "", - ClassForm,C2_WIDTH, + ClassForm,C2Width, TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_Sex : Txt_Role, - ClassData,C3_WIDTH + C4_WIDTH, + ClassData,C3Width + C4Width, TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_SEX_SINGULAR_Abc[UsrDat->Sex] : Txt_ROLES_SINGUL_Abc[UsrDat->RoleInCurrentCrsDB][UsrDat->Sex]); @@ -2684,17 +2702,17 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" @@ -3028,8 +3046,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "" "" diff --git a/swad_record.h b/swad_record.h index 340962cd9..f845f38e2 100644 --- a/swad_record.h +++ b/swad_record.h @@ -35,7 +35,17 @@ /***************************** Public constants ******************************/ /*****************************************************************************/ -#define Rec_WIDTH_SHARE_RECORD_BIG 560 +#define Rec_RECORD_WIDTH_WIDE 560 +#define Rec_C1_WIDTH_WIDE 52 +#define Rec_C2_WIDTH_WIDE 144 +#define Rec_C3_WIDTH_WIDE 210 +#define Rec_C4_WIDTH_WIDE 154 + +#define Rec_RECORD_WIDTH_NARROW 460 +#define Rec_C1_WIDTH_NARROW 52 +#define Rec_C2_WIDTH_NARROW 94 +#define Rec_C3_WIDTH_NARROW 160 +#define Rec_C4_WIDTH_NARROW 154 #define Rec_MAX_LENGTH_NAME_FIELD 255 #define Rec_MIN_LINES_IN_EDITION_FIELD 1
" - "%s" + "" + "" "" - "%u %s
" - "%u %s + %u %s" + "
" + "%u %s (%u %s + %u %s)" "" "
" - "%s" + "" + "" "" - "%u %s
" - "%u %s + %u %s" + "
" + "%u %s (%u %s + %u %s)" "" "
" - "%s" + "" + "" "" - "%u %s
" - "%u %s" + "
" + "%u %s (%u %s)" "" "
" - "%s" + "" + "" "", - The_ClassFormul[Gbl.Prefs.Theme], + "", + Gbl.Prefs.IconsURL, Txt_From_TIME); if (UsrFigures.FirstClickTime.Date.Year) { Dat_WriteDate (UsrFigures.FirstClickTime.Date.YYYYMMDD); if (UsrFigures.NumDays >= 0) - fprintf (Gbl.F.Out,"
" - "%d %s", + fprintf (Gbl.F.Out," (%d %s)", UsrFigures.NumDays, (UsrFigures.NumDays == 1) ? Txt_day : Txt_days); @@ -452,13 +450,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) /* Number of clicks */ fprintf (Gbl.F.Out,"
" - "%s" + "" + "" "", - The_ClassFormul[Gbl.Prefs.Theme], + "", + Gbl.Prefs.IconsURL, Txt_Clicks); if (UsrFigures.NumClicks >= 0) { @@ -468,12 +465,13 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) Prf_GetNumUsrsWithFigure ("NumClicks")); if (UsrFigures.NumDays >= 0) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out," ("); Str_WriteFloatNum ((float) UsrFigures.NumClicks / (float) (UsrFigures.NumDays + 1)); fprintf (Gbl.F.Out," / %s ",Txt_day); Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod), Prf_GetNumUsrsWithNumClicksPerDay ()); + fprintf (Gbl.F.Out,")"); } } else // Number of clicks is unknown @@ -492,13 +490,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) /***** Number of file views *****/ fprintf (Gbl.F.Out,"
" - "%s" + "" + "" "", - The_ClassFormul[Gbl.Prefs.Theme], + "", + Gbl.Prefs.IconsURL, Txt_Downloads); if (UsrFigures.NumFileViews >= 0) { @@ -510,10 +507,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) Prf_GetNumUsrsWithFigure ("NumFileViews")); if (UsrFigures.NumDays >= 0) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out," ("); Str_WriteFloatNum ((float) UsrFigures.NumFileViews / (float) (UsrFigures.NumDays + 1)); - fprintf (Gbl.F.Out," / %s",Txt_day); + fprintf (Gbl.F.Out," / %s)",Txt_day); } } else // Number of file views is unknown @@ -532,13 +529,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) /***** Number of posts in forums *****/ fprintf (Gbl.F.Out,"
" - "%s" + "" + "" "", - The_ClassFormul[Gbl.Prefs.Theme], + "", + Gbl.Prefs.IconsURL, Txt_Forums); if (UsrFigures.NumForPst >= 0) { @@ -550,10 +546,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) Prf_GetNumUsrsWithFigure ("NumForPst")); if (UsrFigures.NumDays >= 0) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out," ("); Str_WriteFloatNum ((float) UsrFigures.NumForPst / (float) (UsrFigures.NumDays + 1)); - fprintf (Gbl.F.Out," / %s",Txt_day); + fprintf (Gbl.F.Out," / %s)",Txt_day); } } else // Number of forum posts is unknown @@ -572,13 +568,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) /***** Number of messages sent *****/ fprintf (Gbl.F.Out,"
" - "%s" + "" + "" "", - The_ClassFormul[Gbl.Prefs.Theme], + "", + Gbl.Prefs.IconsURL, Txt_Messages); if (UsrFigures.NumMsgSnt >= 0) { @@ -590,10 +585,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) Prf_GetNumUsrsWithFigure ("NumMsgSnt")); if (UsrFigures.NumDays >= 0) { - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out," ("); Str_WriteFloatNum ((float) UsrFigures.NumMsgSnt / (float) (UsrFigures.NumDays + 1)); - fprintf (Gbl.F.Out," / %s",Txt_day); + fprintf (Gbl.F.Out," / %s)",Txt_day); } } else // Number of clicks is unknown @@ -1459,7 +1454,7 @@ static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank) " height:40px; background-color:%s;\">" "#%u" "
", Gbl.ColorRows[Gbl.RowEvenOdd], Rank, @@ -1472,7 +1467,7 @@ static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank) ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, - "PHOTO18x24",Pho_ZOOM); + "PHOTO24x32",Pho_ZOOM); } fprintf (Gbl.F.Out,"
", - C1_WIDTH,C1_WIDTH); + C1Width,C1Width); if (UsrDat->InsCod > 0) { Ins.InsCod = UsrDat->InsCod; @@ -2192,7 +2210,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassHead,C2_WIDTH + C3_WIDTH,C1_WIDTH); + ClassHead,C2Width + C3Width,C1Width); if (UsrDat->InsCod > 0) fprintf (Gbl.F.Out,"%s",Ins.FullName); fprintf (Gbl.F.Out,"", - C4_WIDTH); + C4Width); Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO150x200",Pho_NO_ZOOM); @@ -2219,7 +2237,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, CommandsRowspan += 5; // Institution, Centre, Department, Office, Phone fprintf (Gbl.F.Out,"
", - CommandsRowspan,C1_WIDTH); + CommandsRowspan,C1Width); if (CommandForms) { @@ -2394,7 +2412,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "%s
%s
%s" "
" "
", - C2_WIDTH + C3_WIDTH); + C2Width + C3Width); if (UsrDat->Nickname[0]) { if (GoToPublicProfileForm) @@ -2434,13 +2452,13 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "
", - ClassData,C2_WIDTH + C3_WIDTH); + ClassData,C2Width + C3Width); if (ShowData) { if (CountryForm) @@ -2455,7 +2473,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, fprintf (Gbl.F.Out,"" "
", - C4_WIDTH); + C4Width); Net_ShowWebsAndSocialNets (UsrDat); fprintf (Gbl.F.Out,"
" "
", - ClassForm,C2_WIDTH,Txt_Email, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Email, + ClassData,C3Width + C4Width); if (UsrDat->Email[0]) { if (ShowEmail) @@ -2525,8 +2543,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_ID, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_ID, + ClassData,C3Width + C4Width); ID_WriteUsrIDs (UsrDat,ShowID); fprintf (Gbl.F.Out,"
", - ClassForm,C2_WIDTH); + ClassForm,C2Width); if (TypeOfView == Rec_FORM_MY_COMMON_RECORD) fprintf (Gbl.F.Out,"%s*",Txt_Sex); else @@ -2545,7 +2563,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, fprintf (Gbl.F.Out,":", - ClassData,C3_WIDTH + C4_WIDTH); + ClassData,C3Width + C4Width); switch (TypeOfView) { case Rec_FORM_SIGN_UP: // I want to apply for enrollment @@ -2671,10 +2689,10 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "%s" "
" "%s", - ClassForm,C2_WIDTH,Txt_Surname_1); + ClassForm,C2Width,Txt_Surname_1); if (TypeOfView == Rec_FORM_MY_COMMON_RECORD) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":", - ClassData,C3_WIDTH + C4_WIDTH); + ClassData,C3Width + C4Width); if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, UsrDat->Surname1); else if (UsrDat->Surname1[0]) @@ -2710,13 +2728,13 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH, + ClassForm,C2Width, Txt_Surname_2, - ClassData,C3_WIDTH + C4_WIDTH); + ClassData,C3Width + C4Width); if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, UsrDat->Surname2); else if (UsrDat->Surname2[0]) @@ -2730,17 +2748,17 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "" "%s", - ClassForm,C2_WIDTH,Txt_First_name); + ClassForm,C2Width,Txt_First_name); if (TypeOfView == Rec_FORM_MY_COMMON_RECORD) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":", - ClassData,C3_WIDTH + C4_WIDTH); + ClassData,C3Width + C4Width); if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, UsrDat->FirstName); else if (UsrDat->FirstName[0]) @@ -2759,14 +2777,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Place_of_origin, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Place_of_origin, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Cns_MAX_LENGTH_STRING, UsrDat->OriginPlace); else if (UsrDat->OriginPlace[0]) @@ -2783,8 +2801,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Date_of_birth, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Date_of_birth, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) @@ -2807,14 +2825,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Local_address, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Local_address, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Cns_MAX_LENGTH_STRING, UsrDat->LocalAddress); else if (UsrDat->LocalAddress[0]) @@ -2831,14 +2849,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Phone, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Phone, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Usr_MAX_LENGTH_PHONE, UsrDat->LocalPhone); else if (UsrDat->LocalPhone[0]) @@ -2855,14 +2873,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Family_address, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Family_address, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Cns_MAX_LENGTH_STRING, UsrDat->FamilyAddress); else if (UsrDat->FamilyAddress[0]) @@ -2879,14 +2897,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Phone, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Phone, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, Usr_MAX_LENGTH_PHONE, UsrDat->FamilyPhone); else if (UsrDat->FamilyPhone[0]) @@ -2903,14 +2921,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_USER_comments, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_USER_comments, + ClassData,C3Width + C4Width); if (ShowData) { if (DataForm) fprintf (Gbl.F.Out,"", - C3_WIDTH + C4_WIDTH - 60, + C3Width + C4Width - 60, UsrDat->Comments); else if (UsrDat->Comments[0]) { @@ -2934,8 +2952,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Institution, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Institution, + ClassData,C3Width + C4Width); if (ShowData) { if (UsrDat->InsCod > 0) @@ -2959,8 +2977,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Centre, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Centre, + ClassData,C3Width + C4Width); if (ShowData) { if (UsrDat->Tch.CtrCod > 0) @@ -2986,8 +3004,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Department, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Department, + ClassData,C3Width + C4Width); if (ShowData) { if (UsrDat->Tch.DptCod > 0) @@ -3013,8 +3031,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, "", - ClassForm,C2_WIDTH,Txt_Office, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Office, + ClassData,C3Width + C4Width); if (ShowData) fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office); fprintf (Gbl.F.Out,"", - ClassForm,C2_WIDTH,Txt_Phone, - ClassData,C3_WIDTH + C4_WIDTH); + ClassForm,C2Width,Txt_Phone, + ClassData,C3Width + C4Width); if (ShowData) fprintf (Gbl.F.Out,"%s",UsrDat->Tch.OfficePhone); fprintf (Gbl.F.Out,"