From c3473d12150ece98dbcf93ae5028cd8b2e684a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 22 Apr 2016 19:55:41 +0200 Subject: [PATCH] Version 15.201.5 --- swad_changelog.h | 3 ++- swad_record.c | 27 +++++++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 3f44472b1..b7ae3c95e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -137,13 +137,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.201.4 (2016-04-22)" +#define Log_PLATFORM_VERSION "SWAD 15.201.5 (2016-04-22)" #define CSS_FILE "swad15.198.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.201.5: Apr 22, 2016 Code refactoring in record card. (200832 lines) Version 15.201.4: Apr 22, 2016 Code refactoring in record card. (200822 lines) Version 15.201.3: Apr 22, 2016 Code refactoring in record card. (200812 lines) Version 15.201.2: Apr 22, 2016 Code refactoring in record card. (200806 lines) diff --git a/swad_record.c b/swad_record.c index 93ab11210..df74a1f74 100644 --- a/swad_record.c +++ b/swad_record.c @@ -91,6 +91,7 @@ static void Rec_ShowCommands (struct UsrData *UsrDat, bool PutFormLinks); static void Rec_ShowFullName (struct UsrData *UsrDat); static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks); +static void Rec_ShowCountry (struct UsrData *UsrDat,bool ShowData); static void Rec_WriteLinkToDataProtectionClause (void); @@ -2094,13 +2095,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, Rec_ShowNickname (UsrDat,PutFormLinks); /***** Country *****/ - fprintf (Gbl.F.Out,"" - "", - Rec_C2_TOP); - if (ShowData && UsrDat->CtyCod > 0) - /* Link to see country information */ - Cty_WriteCountryName (UsrDat->CtyCod,"REC_DAT_BOLD"); - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Rec_ShowCountry (UsrDat,ShowData); /***** User's web and social networks *****/ fprintf (Gbl.F.Out,"", @@ -3176,7 +3172,7 @@ static void Rec_ShowFullName (struct UsrData *UsrDat) } /*****************************************************************************/ -/*********************** Write a link to netiquette rules ********************/ +/*************************** Show user's nickname ****************************/ /*****************************************************************************/ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks) @@ -3212,6 +3208,21 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks) ""); } +/*****************************************************************************/ +/**************************** Show user's country ****************************/ +/*****************************************************************************/ + +static void Rec_ShowCountry (struct UsrData *UsrDat,bool ShowData) + { + fprintf (Gbl.F.Out,"", + Rec_C2_TOP); + if (ShowData && UsrDat->CtyCod > 0) + /* Link to see country information */ + Cty_WriteCountryName (UsrDat->CtyCod,"REC_DAT_BOLD"); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /*********************** Write a link to netiquette rules ********************/ /*****************************************************************************/