From 82110dc74bb1b05869535552e326801c69af92d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 23 Apr 2016 14:36:02 +0200 Subject: [PATCH] Version 15.202.11 --- swad_changelog.h | 3 ++- swad_record.c | 64 ++++++++++++++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index a01db6650..5c0e062e6 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.202.10 (2016-04-23)" +#define Log_PLATFORM_VERSION "SWAD 15.202.11 (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.11:Apr 23, 2016 Code refactoring in record card. (201014 lines) Version 15.202.10:Apr 23, 2016 Code refactoring in record card. (201000 lines) Version 15.202.9: Apr 23, 2016 Code refactoring in record card. (200987 lines) Version 15.202.8: Apr 23, 2016 Code refactoring in record card. (200979 lines) diff --git a/swad_record.c b/swad_record.c index ea0aaf8e1..4ffbdbc51 100644 --- a/swad_record.c +++ b/swad_record.c @@ -128,6 +128,9 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat, static void Rec_ShowFamilyAddress (struct UsrData *UsrDat, bool ShowData,bool DataForm, const char *ClassForm); +static void Rec_ShowFamilyPhone (struct UsrData *UsrDat, + bool ShowData,bool DataForm, + const char *ClassForm); static void Rec_WriteLinkToDataProtectionClause (void); @@ -2154,30 +2157,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, /***** Family address *****/ Rec_ShowFamilyAddress (UsrDat,ShowData,DataForm,ClassForm); - /* Family phone */ - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - ClassForm,Rec_C1_BOTTOM,Txt_Phone, - Rec_C2_BOTTOM); - if (ShowData) - { - if (DataForm) - fprintf (Gbl.F.Out,"", - Usr_MAX_LENGTH_PHONE, - UsrDat->FamilyPhone, - Rec_C2_BOTTOM - 20); - else if (UsrDat->FamilyPhone[0]) - fprintf (Gbl.F.Out,"%s",UsrDat->FamilyPhone); - } - fprintf (Gbl.F.Out,"" - ""); + /***** Family phone *****/ + Rec_ShowFamilyPhone (UsrDat,ShowData,DataForm,ClassForm); /* Common comments for all the courses */ fprintf (Gbl.F.Out,"" @@ -3377,6 +3358,41 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat, ""); } +/*****************************************************************************/ +/************************ Show user's family phone ***************************/ +/*****************************************************************************/ + +static void Rec_ShowFamilyPhone (struct UsrData *UsrDat, + bool ShowData,bool DataForm, + const char *ClassForm) + { + extern const char *Txt_Phone; + + fprintf (Gbl.F.Out,"" + "" + "%s:" + "" + "", + ClassForm,Rec_C1_BOTTOM,Txt_Phone, + Rec_C2_BOTTOM); + if (ShowData) + { + if (DataForm) + fprintf (Gbl.F.Out,"", + Usr_MAX_LENGTH_PHONE, + UsrDat->FamilyPhone, + Rec_C2_BOTTOM - 20); + else if (UsrDat->FamilyPhone[0]) + fprintf (Gbl.F.Out,"%s",UsrDat->FamilyPhone); + } + fprintf (Gbl.F.Out,"" + ""); + } + /*****************************************************************************/ /*********************** Write a link to netiquette rules ********************/ /*****************************************************************************/