Version 15.97.3

This commit is contained in:
Antonio Cañas Vargas 2016-01-04 16:45:43 +01:00
parent 93cc7375cd
commit c55d1064fc
6 changed files with 33 additions and 19 deletions

View File

@ -116,13 +116,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.97.2 (2016-01-04)"
#define Log_PLATFORM_VERSION "SWAD 15.97.3 (2016-01-04)"
#define CSS_FILE "swad15.97.css"
#define JS_FILE "swad15.77.7.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.97.3: Jan 04, 2016 Link to user's privacy in my public profile. (190755 lines)
Version 15.97.2: Jan 04, 2016 New option in user's privacy. (190743 lines)
Version 15.97.1: Jan 04, 2016 User's timeline below user's profile visible only by logged users. (190719 lines)
Version 15.97: Jan 04, 2016 Show list of some users who has shared a social note. (190718 lines)

View File

@ -256,6 +256,19 @@ static void Net_ShowAWebOrSocialNet (const char *URL,
Title,Title);
}
/*****************************************************************************/
/*********** Put a link to the action to edit my social networks *************/
/*****************************************************************************/
void Net_PutLinkToChangeMySocialNetworks (void)
{
extern const char *Txt_Edit_my_webs_networks;
/***** Link to edit my social networks *****/
Lay_PutContextualLink (ActReqEdiMyNet,NULL,"earth64x64.gif",
Txt_Edit_my_webs_networks,Txt_Edit_my_webs_networks);
}
/*****************************************************************************/
/********************* Show form to edit my social networks ******************/
/*****************************************************************************/

View File

@ -40,6 +40,8 @@
/*****************************************************************************/
void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat);
void Net_PutLinkToChangeMySocialNetworks (void);
void Net_ShowFormMyWebsAndSocialNets (void);
void Net_UpdateMyWebsAndSocialNets (void);
void Net_ShowWebAndSocialNetworksStats (void);

View File

@ -31,6 +31,7 @@
#include "swad_database.h"
#include "swad_follow.h"
#include "swad_global.h"
#include "swad_network.h"
#include "swad_nickname.h"
#include "swad_parameter.h"
#include "swad_privacy.h"
@ -236,6 +237,17 @@ bool Prf_ShowUserProfile (void)
if (Pri_ShowIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility,
Gbl.Usrs.Other.UsrDat.UsrCod))
{
/***** Contextual links *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department...
Net_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks
Pho_PutLinkToChangeMyPhoto (); // Put link (form) to change my photo
Pri_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy
fprintf (Gbl.F.Out,"</div>");
}
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // Course selected
{
/* Get user's role in current course */

View File

@ -87,8 +87,6 @@ static void Rec_WriteLinkToDataProtectionClause (void);
static void Rec_GetUsrExtraDataFromRecordForm (struct UsrData *UsrDat);
static void Rec_GetUsrCommentsFromForm (struct UsrData *UsrDat);
static void Rec_PutLinkToChangeMyInsCtrDpt (void);
static void Rec_PutLinkToChangeMySocialNetworks (void);
/*****************************************************************************/
/*************** Create, edit and remove fields of records *******************/
@ -1881,10 +1879,10 @@ void Rec_ShowFormMyCommRecord (void)
!Gbl.Usrs.Me.UsrDat.Surname1[0])
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_record_card_including_your_name);
/***** Buttons for edition *****/
/***** Contextual links *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department...
Rec_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks
Net_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks
Pho_PutLinkToChangeMyPhoto (); // Put link (form) to change my photo
Pri_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy
fprintf (Gbl.F.Out,"</div>");
@ -3306,7 +3304,7 @@ static void Rec_GetUsrCommentsFromForm (struct UsrData *UsrDat)
/*** Put a link to the action to edit my institution, centre, department... **/
/*****************************************************************************/
static void Rec_PutLinkToChangeMyInsCtrDpt (void)
void Rec_PutLinkToChangeMyInsCtrDpt (void)
{
extern const char *Txt_Edit_my_institution;
@ -3315,19 +3313,6 @@ static void Rec_PutLinkToChangeMyInsCtrDpt (void)
Txt_Edit_my_institution,Txt_Edit_my_institution);
}
/*****************************************************************************/
/*********** Put a link to the action to edit my social networks *************/
/*****************************************************************************/
static void Rec_PutLinkToChangeMySocialNetworks (void)
{
extern const char *Txt_Edit_my_webs_networks;
/***** Link to edit my social networks *****/
Lay_PutContextualLink (ActReqEdiMyNet,NULL,"earth64x64.gif",
Txt_Edit_my_webs_networks,Txt_Edit_my_webs_networks);
}
/*****************************************************************************/
/********* Show form to edit my institution, centre and department ***********/
/*****************************************************************************/

View File

@ -152,6 +152,7 @@ void Rec_UpdateMyRecord (void);
Rol_Role_t Rec_GetRoleFromRecordForm (void);
void Rec_GetUsrNameFromRecordForm (struct UsrData *UsrDat);
void Rec_PutLinkToChangeMyInsCtrDpt (void);
void Rec_ShowFormMyInsCtrDpt (void);
void Rec_ChgCountryOfMyInstitution (void);
void Rec_UpdateMyInstitution (void);