From a44b4479165b5b39bf8e75a83ddcf18d1e5c0ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 23 Apr 2016 15:15:06 +0200 Subject: [PATCH] Version 15.202.16 --- swad_changelog.h | 3 ++- swad_record.c | 43 ++++++++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 247f971ff..01a66c0d2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202.15 (2016-04-23)" +#define Log_PLATFORM_VERSION "SWAD 15.202.16 (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.16:Apr 23, 2016 Code refactoring in record card. (201070 lines) Version 15.202.15:Apr 23, 2016 Code refactoring in record card. (201059 lines) Version 15.202.14:Apr 23, 2016 Code refactoring in record card. (201048 lines) Version 15.202.13:Apr 23, 2016 Code refactoring in record card. (201037 lines) diff --git a/swad_record.c b/swad_record.c index a344bf7cd..24d323096 100644 --- a/swad_record.c +++ b/swad_record.c @@ -140,6 +140,8 @@ static void Rec_ShowCentre (struct UsrData *UsrDat, bool ShowData,const char *ClassForm); static void Rec_ShowDepartment (struct UsrData *UsrDat, bool ShowData,const char *ClassForm); +static void Rec_ShowOffice (struct UsrData *UsrDat, + bool ShowData,const char *ClassForm); static void Rec_WriteLinkToDataProtectionClause (void); @@ -2002,7 +2004,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, struct UsrData *UsrDat) { extern const char *The_ClassForm[The_NUM_THEMES]; - extern const char *Txt_Office; extern const char *Txt_Phone; extern const char *Txt_Save_changes; extern const char *Txt_Register; @@ -2178,20 +2179,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, /***** Department *****/ Rec_ShowDepartment (UsrDat,ShowData,ClassForm); - /* Office */ - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - ClassForm,Rec_C1_BOTTOM,Txt_Office, - Rec_C2_BOTTOM); - if (ShowData) - fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office); - fprintf (Gbl.F.Out,"" - ""); + /***** Office *****/ + Rec_ShowOffice (UsrDat,ShowData,ClassForm); /* Phone */ fprintf (Gbl.F.Out,"" @@ -3446,6 +3435,30 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat, ""); } +/*****************************************************************************/ +/*************************** Show user's office ******************************/ +/*****************************************************************************/ + +static void Rec_ShowOffice (struct UsrData *UsrDat, + bool ShowData,const char *ClassForm) + { + extern const char *Txt_Office; + + fprintf (Gbl.F.Out,"" + "" + "%s:" + "" + "", + ClassForm,Rec_C1_BOTTOM,Txt_Office, + Rec_C2_BOTTOM); + if (ShowData) + fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office); + fprintf (Gbl.F.Out,"" + ""); + } + /*****************************************************************************/ /*********************** Write a link to netiquette rules ********************/ /*****************************************************************************/