diff --git a/icon/padlock16x16.gif b/icon/padlock16x16.gif new file mode 100644 index 000000000..11350a0d7 Binary files /dev/null and b/icon/padlock16x16.gif differ diff --git a/swad_action.c b/swad_action.c index 44145b886..6f8dd4cd0 100644 --- a/swad_action.c +++ b/swad_action.c @@ -1180,7 +1180,7 @@ Profile: 951. ActDetMyPho Receive my photo and detect faces on it 952. ActUpdMyPho Update my photo 953. ActRemMyPho Remove my photo - 954. ActChgPubPho Change photo privacity + 954. ActChgPubPho Change photo privacy 955. ActReqEdiMyIns Request the edition of my institution, centre and department 956. ActChgCtyMyIns Change the country of my institution diff --git a/swad_changelog.h b/swad_changelog.h index 3efbcd834..b0da72fc8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,12 +103,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.78 (2015/03/06)" +#define Log_PLATFORM_VERSION "SWAD 14.78.1 (2015/03/06)" // 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 | tail -1 /* - Version 14.78: Mar 06, 2015 Field PublicPhoto is replaced by field PhotoVisibility. (178577 lines) + Version 14.78.1: Mar 06, 2015 New link to privacy options (unfinished). (178595 lines) + Version 14.78: Mar 06, 2015 Four degrees of visibility in photos. + Field PublicPhoto is replaced by field PhotoVisibility in usr_data table. (178577 lines) 4 changes necessary in database: ALTER TABLE usr_data ADD COLUMN PhotoVisibility ENUM('user','course','system','world') NOT NULL DEFAULT 'user' AFTER PublicPhoto; UPDATE usr_data SET PhotoVisibility='user' WHERE PublicPhoto='N'; @@ -2465,7 +2467,7 @@ INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1051','es','N','Camb Version 11.55.4: Apr 15, 2012 Minor changes in web service. (132575 lines) Version 11.55.3: Apr 15, 2012 New function getGroups in the web service. (132571 lines) Version 11.55.2: Apr 14, 2012 New function getDirectoryTree in the web service. (132478 lines) - Version 11.55.1: Apr 13, 2012 Now the privacity of a file changes when receiving the form. (132443 lines) + Version 11.55.1: Apr 13, 2012 Now the privacy of a file changes when receiving the form. (132443 lines) Version 11.55: Apr 12, 2012 New options to edit metadata of a file. (132421 lines) Version 11.54: Apr 12, 2012 Documents are open to public not logged. (132323 lines) Version 11.53.4: Apr 11, 2012 Changes in search of courses. (132258 lines) diff --git a/swad_file_browser.c b/swad_file_browser.c index ebb39dc6c..1cc269148 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -9512,7 +9512,7 @@ void Brw_ChgFileMetadata (void) /***** Check if I can change file metadata *****/ if (Brw_CheckIfICanEditFileMetadata (FileMetadata.PublisherUsrCod)) { - /***** Get the new file privacity and license from form *****/ + /***** Get the new file privacy and license from form *****/ switch (Gbl.FileBrowser.Type) { case Brw_ADMI_DOCUM_INS: diff --git a/swad_photo.c b/swad_photo.c index 06237e0fa..f6df4aca4 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -252,6 +252,7 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho Pho_PutLinkToRemoveUsrPhoto (UsrDat); fprintf (Gbl.F.Out," "); Pho_PutFormPhotoVisibility (); + Rec_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy fprintf (Gbl.F.Out,""); /* Show photo */ diff --git a/swad_record.c b/swad_record.c index fb3ac719e..f11ad8bf3 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1901,6 +1901,7 @@ void Rec_ShowFormMyCommRecord (void) Pho_PutLinkToChangeUsrPhoto (&Gbl.Usrs.Me.UsrDat); // Put link (form) to change my photo Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department... Rec_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks + Rec_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy /***** My record *****/ Act_FormStart (ActChgMyData); @@ -3144,6 +3145,22 @@ static void Rec_PutLinkToChangeMySocialNetworks (void) fprintf (Gbl.F.Out,""); } +/*****************************************************************************/ +/*************** Put a link to the action to edit my privacy *****************/ +/*****************************************************************************/ + +void Rec_PutLinkToChangeMyPrivacy (void) + { + extern const char *The_ClassFormul[The_NUM_THEMES]; + extern const char *Txt_Privacy; + + /***** Link to edit my social networks *****/ + Act_FormStart (ActReqEdiMyNet); + Act_LinkFormSubmit (Txt_Privacy,The_ClassFormul[Gbl.Prefs.Theme]); + Lay_PutSendIcon ("padlock",Txt_Privacy,Txt_Privacy); + fprintf (Gbl.F.Out,""); + } + /*****************************************************************************/ /********* Show form to edit my institution, centre and department ***********/ /*****************************************************************************/ diff --git a/swad_record.h b/swad_record.h index 3f541bbe5..127ea8600 100644 --- a/swad_record.h +++ b/swad_record.h @@ -157,6 +157,8 @@ Rol_Role_t Rec_GetRoleFromRecordForm (void); void Rec_GetUsrNameFromRecordForm (struct UsrData *UsrDat); void Rec_GetUsrExtraDataFromRecordForm (struct UsrData *UsrDat); +void Rec_PutLinkToChangeMyPrivacy (void); + void Rec_ShowFormMyInsCtrDpt (void); void Rec_ChgCountryOfMyInstitution (void); void Rec_UpdateMyInstitution (void); diff --git a/swad_text.c b/swad_text.c index 13b5977e5..97b743522 100644 --- a/swad_text.c +++ b/swad_text.c @@ -26901,6 +26901,27 @@ const char *Txt_Print = "Imprimir"; #endif +const char *Txt_Privacy = +#if L==0 + "Privacitat"; +#elif L==1 + "Geheimhaltung"; +#elif L==2 + "Privacy"; +#elif L==3 + "Privacidad"; +#elif L==4 + "Privacité"; +#elif L==5 + "Privacidad"; // Okoteve traducción +#elif L==6 + "Privatezza"; +#elif L==7 + "Prywatność"; +#elif L==8 + "Privacidade"; +#endif + const char *Txt_Private_available_to_certain_users_identified = #if L==0 "Privat, disponible per a certs usuaris identificats"; @@ -26922,27 +26943,6 @@ const char *Txt_Private_available_to_certain_users_identified = "Privado, disponível para alguns usuários identificados"; #endif -const char *Txt_Private_Photo = -#if L==0 - "Foto privada"; -#elif L==1 - "Private Foto"; -#elif L==2 - "Private photo"; -#elif L==3 - "Foto privada"; -#elif L==4 - "Photo privée"; -#elif L==5 - "Foto privada"; // Okoteve traducción -#elif L==6 - "Foto privata"; -#elif L==7 - "Prywatne zdjecia"; -#elif L==8 - "Foto privada"; -#endif - const char *Txt_Private_storage_area = #if L==0 "Zona d'emmagatzematge privada";