diff --git a/css/swad15.202.css b/css/swad15.203.css similarity index 99% rename from css/swad15.202.css rename to css/swad15.203.css index 6c36a661c..973cb7eca 100644 --- a/css/swad15.202.css +++ b/css/swad15.203.css @@ -1688,6 +1688,57 @@ a:hover img.CENTRE_PHOTO_SHOW width:20px; margin:8px auto; } + +.REC_C1_TOP + { + box-sizing:border-box; + width:68px; + height:68px; + } +.REC_C2_TOP + { + box-sizing:border-box; + width:282px; + height:68px; + } +.REC_C3_TOP + { + box-sizing:border-box; + width:190px; + } + +.REC_C1_MID + { + box-sizing:border-box; + width:68px; + } +.REC_C2_MID + { + box-sizing:border-box; + width:282px; + } +.REC_C3_MID + { + box-sizing:border-box; + width:190px; + } + +.REC_C1_BOT + { + box-sizing:border-box; + width:170px; + } +.REC_C2_BOT + { + box-sizing:border-box; + width:362px; + } +.REC_C2_BOT_INPUT + { + box-sizing:border-box; + width:358px; + } + .REC_HEAD {font-family:Georgia,"DejaVu LGC Serif","Bitstream Vera Serif",serif; color:#808080; font-size:12pt;} .REC_NAME {color:#808080; font-size:20pt; font-weight:bold;} .REC_NICK {color:#808080; font-size:15pt; font-weight:bold;} diff --git a/swad_changelog.h b/swad_changelog.h index a40cf684c..07d52afd5 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202.19 (2016-04-23)" -#define CSS_FILE "swad15.202.css" +#define Log_PLATFORM_VERSION "SWAD 15.203 (2016-04-23)" +#define CSS_FILE "swad15.203.css" #define JS_FILE "swad15.197.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 15.204: Apr 23, 2016 New form to confirm another user's ID. (? lines) + Version 15.203: Apr 23, 2016 Changes in layout and CSS related to record card. (201076 lines) Version 15.202.19:Apr 23, 2016 User's ID is shown in green or red in user's account. (201120 lines) Version 15.202.18:Apr 23, 2016 Change of message about ID in user's account. (201092 lines) Version 15.202.17:Apr 23, 2016 Code refactoring in record card. (201081 lines) diff --git a/swad_record.c b/swad_record.c index 656297cb7..458f5c693 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1543,7 +1543,6 @@ static void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *U extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY]; extern const char *Txt_Save; char StrRecordWidth[10+1]; - unsigned FrameWidth = 15; unsigned Col1Width = 210; unsigned Col2Width; bool ItsMe; @@ -1592,26 +1591,22 @@ static void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *U Act_FormStart (ActRcvRecCrs); break; } - FrameWidth = 10; break; case Rec_CHECK_MY_COURSE_RECORD_AS_STUDENT: - FrameWidth = 10; break; case Rec_RECORD_LIST: DataForm = true; Act_FormStartAnchor (ActRcvRecOthUsr,Anchor); Usr_PutHiddenParUsrCodAll (ActRcvRecOthUsr,Gbl.Usrs.Select.All); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - FrameWidth = 10; break; case Rec_RECORD_PRINT: - FrameWidth = 1; break; default: break; } - Col2Width = Rec_RECORD_WIDTH - FrameWidth * 2 - Col1Width; + Col2Width = Rec_RECORD_WIDTH - 10 * 2 - Col1Width; /***** Start frame *****/ sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH); @@ -2101,6 +2096,16 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, fprintf (Gbl.F.Out,"" ""); + /***** Show e-mail and user's ID *****/ + if (ShowIDRows) + { + fprintf (Gbl.F.Out,""); + Rec_ShowEmail (UsrDat,ClassForm); + Rec_ShowUsrIDs (UsrDat,ClassForm); + fprintf (Gbl.F.Out,"
"); + } + + /***** Start form *****/ switch (TypeOfView) { case Rec_FORM_MY_COMMON_RECORD: @@ -2126,12 +2131,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, if (ShowIDRows) { - /***** E-mail *****/ - Rec_ShowEmail (UsrDat,ClassForm); - - /***** User's ID *****/ - Rec_ShowUsrIDs (UsrDat,ClassForm); - /***** Role or sex *****/ Rec_ShowRole (UsrDat,TypeOfView,ClassForm); @@ -2189,6 +2188,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, fprintf (Gbl.F.Out,""); + /***** Button and end form *****/ switch (TypeOfView) { case Rec_FORM_MY_COMMON_RECORD: @@ -2240,9 +2240,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, static void Rec_ShowInstitutionInHead (struct Institution *Ins,bool PutFormLinks) { /***** Institution logo *****/ - fprintf (Gbl.F.Out,"", - Rec_C1_TOP,Rec_C1_TOP); + fprintf (Gbl.F.Out,""); if (Ins->InsCod > 0) { /* Form to go to the institution */ @@ -2263,9 +2261,7 @@ static void Rec_ShowInstitutionInHead (struct Institution *Ins,bool PutFormLinks fprintf (Gbl.F.Out,""); /***** Institution name *****/ - fprintf (Gbl.F.Out,"", - Rec_C2_TOP,Rec_C1_TOP); + fprintf (Gbl.F.Out,""); if (Ins->InsCod > 0) { /* Form to go to the institution */ @@ -2295,9 +2291,7 @@ static void Rec_ShowPhoto (struct UsrData *UsrDat) bool ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); /***** User's photo *****/ - fprintf (Gbl.F.Out,"", - Rec_C3_TOP); + fprintf (Gbl.F.Out,""); Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO186x248",Pho_NO_ZOOM,false); @@ -2330,9 +2324,7 @@ static void Rec_ShowCommands (struct UsrData *UsrDat, bool HeBelongsToCurrentCrs = (UsrDat->RoleInCurrentCrsDB == Rol_STUDENT || UsrDat->RoleInCurrentCrsDB == Rol_TEACHER); - fprintf (Gbl.F.Out,"", - Rec_C1_TOP); + fprintf (Gbl.F.Out,""); if (PutFormLinks && Gbl.Usrs.Me.Logged) { @@ -2549,9 +2541,7 @@ static void Rec_ShowFullName (struct UsrData *UsrDat) { char Name[Usr_MAX_BYTES_NAME+1]; // To shorten length of FirstName, Surname1, Surname2 - fprintf (Gbl.F.Out,"", - Rec_C2_TOP); + fprintf (Gbl.F.Out,""); /***** First name *****/ strncpy (Name,UsrDat->FirstName,Usr_MAX_BYTES_NAME); @@ -2583,10 +2573,8 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks) extern const char *Txt_View_public_profile; fprintf (Gbl.F.Out,"" - "" - "
", - Rec_C2_TOP); + "" + "
"); if (UsrDat->Nickname[0]) { if (PutFormLinks) @@ -2617,9 +2605,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks) static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData) { - fprintf (Gbl.F.Out,"", - Rec_C2_TOP); + fprintf (Gbl.F.Out,""); if (ShowData && UsrDat->CtyCod > 0) /* Link to see country information */ Cty_WriteCountryName (UsrDat->CtyCod,"REC_DAT_BOLD"); @@ -2633,8 +2619,7 @@ static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData) static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat, Rec_RecordViewType_t TypeOfView) { - fprintf (Gbl.F.Out,"", - Rec_C3_TOP); + fprintf (Gbl.F.Out,""); if (TypeOfView != Rec_RECORD_PRINT) Net_ShowWebsAndSocialNets (UsrDat); fprintf (Gbl.F.Out,""); @@ -2649,14 +2634,11 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm) extern const char *Txt_Email; fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", - ClassForm,Rec_C1_BOTTOM,Txt_Email, - Rec_C2_BOTTOM); + "", + ClassForm,Txt_Email); if (UsrDat->Email[0]) { if (Mai_ICanSeeEmail (UsrDat)) @@ -2683,14 +2665,11 @@ static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm) extern const char *Txt_ID; fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", - ClassForm,Rec_C1_BOTTOM,Txt_ID, - Rec_C2_BOTTOM); + "", + ClassForm,Txt_ID); ID_WriteUsrIDs (UsrDat); fprintf (Gbl.F.Out,"" ""); @@ -2720,14 +2699,10 @@ static void Rec_ShowRole (struct UsrData *UsrDat, if (RoleForm) { fprintf (Gbl.F.Out,"" - "" + "" "%s:" - "", - ClassForm,Rec_C1_BOTTOM, - Txt_Role, - Rec_C2_BOTTOM); + "", + ClassForm,Txt_Role); switch (TypeOfView) { case Rec_FORM_SIGN_UP: // I want to apply for enrollment @@ -2858,14 +2833,10 @@ static void Rec_ShowRole (struct UsrData *UsrDat, else if (SexForm) { fprintf (Gbl.F.Out,"" - "" + "" "%s*:" - "", - ClassForm,Rec_C1_BOTTOM, - Txt_Sex, - Rec_C2_BOTTOM); + "", + ClassForm,Txt_Sex); for (Sex = Usr_SEX_FEMALE; Sex <= Usr_SEX_MALE; Sex++) @@ -2888,19 +2859,16 @@ static void Rec_ShowRole (struct UsrData *UsrDat, } else // RoleForm == false, SexForm == false fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "" + "" "%s" "" "", - ClassForm,Rec_C1_BOTTOM, + ClassForm, TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_Sex : Txt_Role, - Rec_C2_BOTTOM, TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_SEX_SINGULAR_Abc[UsrDat->Sex] : Txt_ROLES_SINGUL_Abc[UsrDat->RoleInCurrentCrsDB][UsrDat->Sex]); } @@ -2917,23 +2885,19 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat, extern const char *Txt_Surname_1; fprintf (Gbl.F.Out,"" - "" + "" "%s", - ClassForm,Rec_C1_BOTTOM,Txt_Surname_1); + ClassForm,Txt_Surname_1); if (TypeOfView == Rec_FORM_MY_COMMON_RECORD) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":" - "", - Rec_C2_BOTTOM); + ""); if (DataForm) fprintf (Gbl.F.Out,"", + " class=\"REC_C2_BOT_INPUT\" />", Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, - UsrDat->Surname1, - Rec_C2_BOTTOM - 20); + UsrDat->Surname1); else if (UsrDat->Surname1[0]) fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); fprintf (Gbl.F.Out,"" @@ -2952,22 +2916,17 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat, extern const char *Txt_Surname_2; fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", - ClassForm,Rec_C1_BOTTOM, - Txt_Surname_2, - Rec_C2_BOTTOM); + "", + ClassForm,Txt_Surname_2); if (DataForm) fprintf (Gbl.F.Out,"", + " class=\"REC_C2_BOT_INPUT\" />", Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, - UsrDat->Surname2, - Rec_C2_BOTTOM - 20); + UsrDat->Surname2); else if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out,"%s",UsrDat->Surname2); fprintf (Gbl.F.Out,"" @@ -2986,23 +2945,20 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat, extern const char *Txt_First_name; fprintf (Gbl.F.Out,"" - "" + "" "%s", - ClassForm,Rec_C1_BOTTOM,Txt_First_name); + ClassForm,Txt_First_name); if (TypeOfView == Rec_FORM_MY_COMMON_RECORD) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":" - "", - Rec_C2_BOTTOM); + ""); if (DataForm) fprintf (Gbl.F.Out,"", + " class=\"REC_C2_BOT_INPUT\" />", Usr_MAX_LENGTH_USR_NAME_OR_SURNAME, - UsrDat->FirstName, - Rec_C2_BOTTOM - 20); + UsrDat->FirstName); else if (UsrDat->FirstName[0]) fprintf (Gbl.F.Out,"%s",UsrDat->FirstName); fprintf (Gbl.F.Out,"" @@ -3029,23 +2985,19 @@ static void Rec_ShowCountry (struct UsrData *UsrDat, } fprintf (Gbl.F.Out,"" - "" + "" "%s", - ClassForm,Rec_C1_BOTTOM,Txt_Country); + ClassForm,Txt_Country); if (TypeOfView == Rec_FORM_MY_COMMON_RECORD) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":" - "", - Rec_C2_BOTTOM); + ""); /***** Selector of country *****/ - fprintf (Gbl.F.Out,"" "" "