Version 15.201.4

This commit is contained in:
Antonio Cañas Vargas 2016-04-22 19:50:59 +02:00
parent ffc9f5f8e7
commit 88aa61a15d
2 changed files with 41 additions and 28 deletions

View File

@ -137,13 +137,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.201.3 (2016-04-22)"
#define Log_PLATFORM_VERSION "SWAD 15.201.4 (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.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)
Version 15.201.1: Apr 22, 2016 Code refactoring in record card. (200778 lines)

View File

@ -90,6 +90,7 @@ static void Rec_ShowCommands (struct UsrData *UsrDat,
Rec_RecordViewType_t TypeOfView,
bool PutFormLinks);
static void Rec_ShowFullName (struct UsrData *UsrDat);
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks);
static void Rec_WriteLinkToDataProtectionClause (void);
@ -1954,7 +1955,6 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
extern const char *Usr_StringsSexDB[Usr_NUM_SEXS];
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_ID;
extern const char *Txt_View_public_profile;
extern const char *Txt_Email;
extern const char *Txt_Sex;
extern const char *Txt_Role;
@ -2091,32 +2091,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
fprintf (Gbl.F.Out,"</tr>");
/***** User's nickname *****/
fprintf (Gbl.F.Out,"<td class=\"REC_NAME LEFT_BOTTOM\""
" style=\"width:%upx;\">"
"<div class=\"REC_NICK\">",
Rec_C2_TOP);
if (UsrDat->Nickname[0])
{
if (PutFormLinks)
{
/* Put form to go to public profile */
Act_FormStart (ActSeePubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_public_profile,"REC_NICK");
}
fprintf (Gbl.F.Out,"@%s",UsrDat->Nickname);
if (PutFormLinks)
{
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
/* Link to QR code */
QR_PutLinkToPrintQRCode (UsrDat->Nickname,false);
}
}
fprintf (Gbl.F.Out,"</div>"
"</td>"
"</tr>");
Rec_ShowNickname (UsrDat,PutFormLinks);
/***** Country *****/
fprintf (Gbl.F.Out,"<tr>"
@ -3204,6 +3179,43 @@ static void Rec_ShowFullName (struct UsrData *UsrDat)
/*********************** Write a link to netiquette rules ********************/
/*****************************************************************************/
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
{
extern const char *Txt_View_public_profile;
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"REC_NAME LEFT_BOTTOM\""
" style=\"width:%upx;\">"
"<div class=\"REC_NICK\">",
Rec_C2_TOP);
if (UsrDat->Nickname[0])
{
if (PutFormLinks)
{
/* Put form to go to public profile */
Act_FormStart (ActSeePubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmit (Txt_View_public_profile,"REC_NICK");
}
fprintf (Gbl.F.Out,"@%s",UsrDat->Nickname);
if (PutFormLinks)
{
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
/* Link to QR code */
QR_PutLinkToPrintQRCode (UsrDat->Nickname,false);
}
}
fprintf (Gbl.F.Out,"</div>"
"</td>"
"</tr>");
}
/*****************************************************************************/
/*********************** Write a link to netiquette rules ********************/
/*****************************************************************************/
static void Rec_WriteLinkToDataProtectionClause (void)
{
extern const char *Txt_DATA_PROTECTION_CLAUSE;