diff --git a/swad_changelog.h b/swad_changelog.h index 0674f0b80..2f492c76f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202.6 (2016-04-23)" +#define Log_PLATFORM_VERSION "SWAD 15.202.7 (2016-04-23)" #define CSS_FILE "swad15.202.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.202.7: Apr 23, 2016 Code refactoring in record card. (200964 lines) Version 15.202.6: Apr 23, 2016 Code refactoring in record card. (200949 lines) Version 15.202.5: Apr 23, 2016 Code refactoring in record card. (200934 lines) Version 15.202.4: Apr 23, 2016 Code refactoring in record card. (200926 lines) diff --git a/swad_record.c b/swad_record.c index f2674a84d..b3ff0fada 100644 --- a/swad_record.c +++ b/swad_record.c @@ -117,6 +117,10 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat, bool ShowData, bool DataForm, const char *ClassForm); +static void Rec_ShowDateOfBirth (struct UsrData *UsrDat, + bool ShowData, + bool DataForm, + const char *ClassForm); static void Rec_WriteLinkToDataProtectionClause (void); @@ -1979,7 +1983,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, struct UsrData *UsrDat) { extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Date_of_birth; extern const char *Txt_Institution; extern const char *Txt_Centre; extern const char *Txt_Department; @@ -2134,29 +2137,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, /***** Origin place *****/ Rec_ShowOriginPlace (UsrDat,ShowData,DataForm,ClassForm); - /* Date of birth */ - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - ClassForm,Rec_C1_BOTTOM,Txt_Date_of_birth, - Rec_C2_BOTTOM); - if (ShowData) - { - if (DataForm) - Dat_WriteFormDate (Gbl.Now.Date.Year - Rec_USR_MAX_AGE, - Gbl.Now.Date.Year - Rec_USR_MIN_AGE, - "Birth", - &(UsrDat->Birthday), - false,false); - else if (UsrDat->StrBirthday[0]) - fprintf (Gbl.F.Out,"%s",UsrDat->StrBirthday); - } - fprintf (Gbl.F.Out,"" - ""); + /***** Date of birth *****/ + Rec_ShowDateOfBirth (UsrDat,ShowData,DataForm,ClassForm); /* Local address */ fprintf (Gbl.F.Out,"" @@ -3318,6 +3300,41 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat, ""); } +/*****************************************************************************/ +/**************************** Show user's country ****************************/ +/*****************************************************************************/ + +static void Rec_ShowDateOfBirth (struct UsrData *UsrDat, + bool ShowData, + bool DataForm, + const char *ClassForm) + { + extern const char *Txt_Date_of_birth; + + fprintf (Gbl.F.Out,"" + "" + "%s:" + "" + "", + ClassForm,Rec_C1_BOTTOM,Txt_Date_of_birth, + Rec_C2_BOTTOM); + if (ShowData) + { + if (DataForm) + Dat_WriteFormDate (Gbl.Now.Date.Year - Rec_USR_MAX_AGE, + Gbl.Now.Date.Year - Rec_USR_MIN_AGE, + "Birth", + &(UsrDat->Birthday), + false,false); + else if (UsrDat->StrBirthday[0]) + fprintf (Gbl.F.Out,"%s",UsrDat->StrBirthday); + } + fprintf (Gbl.F.Out,"" + ""); + } + /*****************************************************************************/ /*********************** Write a link to netiquette rules ********************/ /*****************************************************************************/