Commit 754fe6f0 authored by Raph El's avatar Raph El

Merge branch 'master' into qa

parents 31246ca9 b886f377
......@@ -13,12 +13,12 @@ class Co2Module extends CWebModule {
private $_version = "v0.3.0";
private $_versionDate = "10/12/2018";
private $_keywords = "societal, reseau,opensource,CO,communecter";
private $_description = "réseau social libre et citoyen";
private $_pageTitle = "Communecter:libre et connecté";
private $_image = "/images/1+1=3.jpg";
private $_keywords = "societal, reseau, opensource, CO, communecter";
private $_description = "Retrouvez la richesse qui vous entoure. Créez votre réseau, communiquez et agissez sur votre société. Communecter, le numérique libre au service du réel !";
private $_pageTitle = "Communecter, le réseau social libre et connecté";
private $_image = "/themes/CO2/assets/img/1+1=3.jpg";
private $_relCanonical = "https://www.communecter.org";
private $_favicon = "/images/favicon";
private $_favicon = "/themes/CO2/assets/img/favicon.ico";
private $_author = "Pixel Humain";
private $_share = null;
......
......@@ -974,6 +974,7 @@ var urlCtrl = {
//"#default.view.page" : {title:'Découvrir', icon : 'file-o'},
//"#home" : {"alias":"#default.home"},
"#stat.chartglobal" : {title:'STATISTICS ', icon : 'bar-chart'},
"#settings.redirect" : {title:'Settings ', icon : 'cogs'},
"#stat.chartlogs" : {title:'STATISTICS ', icon : 'bar-chart'},
"#default.live" : {title:"FLUX'Direct" , icon : 'heartbeat', menuId:"menu-btn-live"},
"#default.login" : {title:'COMMUNECTED AGENDA ', icon : 'calendar'},
......@@ -1265,7 +1266,7 @@ var urlCtrl = {
if( urlCtrl.jsController(hash) ){
mylog.log("urlCtrl.loadByHash >>> hash found",hash);
}
else if( hash.indexOf("#settings") >= 0 ){
else if( hash.indexOf("#settings") >= 0 && hash.indexOf("redirect") < 0 ){
if(userId == "" )
$('#modalLogin').modal("show");
else{
......@@ -1940,8 +1941,8 @@ function setTitle(str, icon, topTitle,keywords,shortDesc) { mylog.log("setTitle"
if(notNull(shortDesc)){
$('meta[name="description"]').attr("content",shortDesc);
}
else if(typeof costum == "undefined" || !notNull(costum))
$('meta[name="description"]').attr("content","Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société.");
// else if(typeof costum == "undefined" || !notNull(costum))
// $('meta[name="description"]').attr("content","Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société.");
}
......
......@@ -185,11 +185,12 @@ function autoCompleteSearch(indexMin, indexMax, callBack, notUrl){
str = agenda.getDateHtml(startMoment);
}
if(typeof searchObject.ranges != "undefined")
results=searchAllEngine.prepareAllSearch(results);
if(typeof searchObject.ranges != "undefined" && (typeof searchObject.indexStep == "undefined" || searchObject.indexStep > 0))
results=searchAllEngine.prepareAllSearch(results);
//Add correct number to type filters
if(searchObject.count)
refreshCountBadge();
//parcours la liste des résultats de la recherche
str += directory.showResultsDirectoryHtml(results);
if( ( notNull(directory.appKeyParam) &&
......@@ -221,6 +222,7 @@ function autoCompleteSearch(indexMin, indexMax, callBack, notUrl){
}
//<<<<<<< HEAD
} else {
//CHARGEMENT DE TYPE SCROLL => ALL ELEMENTS OR MORE THAN ONE TYPE
//si on n'est pas sur une première recherche (chargement de la suite des résultat)
......@@ -275,6 +277,95 @@ function autoCompleteSearch(indexMin, indexMax, callBack, notUrl){
$(".btn-start-search").removeClass("bg-azure");
$("#btn-my-co").removeClass("hidden");
}
// =======
// // Algorithm when searching in multi collections (scroll algo by updated)
// if(typeof searchObject.ranges != "undefined" && (typeof searchObject.indexStep == "undefined" || searchObject.indexStep > 0))
// results=searchAllEngine.prepareAllSearch(results);
// //Add correct number to type filters
// if(searchObject.count)
// refreshCountBadge();
// //parcours la liste des résultats de la recherche
// str += directory.showResultsDirectoryHtml(results);
// if((notNull(directory.appKeyParam) && typeof themeParams.pages[directory.appKeyParam] != "undefined" && typeof themeParams.pages[directory.appKeyParam].showMap != "undefined") || location.hash.indexOf("onMap=true")>=1)
// showMap(true);
// //else
// //showMap(false);
// if(str == "") {
// $.unblockUI();
// $(".btn-start-search").html("<i class='fa fa-refresh'></i>");
// str=directory.endOfResult(true);
// if(indexMin == 0){
// $("#dropdown_search").html(str);
// }else{
// $(".search-loader").remove();
// $("#dropdown_search").append(str);
// }
// }
// else
// {
// //CHARGEMENT DE TYPE SCROLL => ALL ELEMENTS OR MORE THAN ONE TYPE
// //si on n'est pas sur une première recherche (chargement de la suite des résultat)
// if(indexMin > 0 && (typeof pageEvent == "undefined" || !pageEvent)){
// //on affiche le résultat à l'écran
// $("#dropdown_search").append(str);
// if($(".search-loader").length) $(".search-loader").remove();
// if($(".pageTable").html()=="" && (searchObject.initType!= "all" || searchObject.types.length==1)){
// typeElement=(searchObject.types=="persons") ? "citoyens" : searchObject.types;
// initPageTable(searchAllEngine.searchCount[typeElement]);
// }
// }else{
// //on affiche le résultat à l'écran
// $("#dropdown_search").html(str);
// if(searchObject.initType == "all" && Object.keys(results).length < 30){
// str=directory.endOfResult();
// $("#dropdown_search").append(str);
// }
// if(directory.appKeyParam == "#agenda"){
// if(searchObject.text != "")
// $("#content-social .calendar").hide(700);
// else if(!$("#content-social .calendar").is(":visible"))
// $("#content-social .calendar").show(700);
// }
// if(searchObject.initType!= "all" || searchObject.types.length==1){
// typeElement=(searchObject.types=="persons") ? "citoyens" : searchObject.types;
// initPageTable(searchAllEngine.searchCount[typeElement]);
// }
// pageEvent=false;
// }
// }
// //remet l'icon "loupe" du bouton search
// $(".btn-start-search").html("<i class='fa fa-refresh'></i>");
// //active les link lbh
// coInterface.bindLBHLinks();
// searchObject.count=false;
// $.unblockUI();
// $("#map-loading-data").html("");
// //initialise les boutons pour garder une entité dans Mon répertoire (boutons links)
// directory.bindBtnElement();
// coInterface.bindButtonOpenForm();
// //signal que le chargement est terminé
// loadingData = false;
// //quand la recherche est terminé, on remet la couleur normal du bouton search
// $(".btn-start-search").removeClass("bg-azure");
// $("#btn-my-co").removeClass("hidden");
// }
// //si le nombre de résultat obtenu est inférieur au indexStep => tous les éléments ont été chargé et affiché
// //mylog.log("SHOW MORE ?", countData, indexStep);
// /*if(countData < indexStep){
// $("#btnShowMoreResult").remove();
// scrollEnd = true;
// }else{
// scrollEnd = false;
// }*/
// >>>>>>> master
//si le nombre de résultat obtenu est inférieur au indexStep => tous les éléments ont été chargé et affiché
//mylog.log("SHOW MORE ?", countData, indexStep);
......
......@@ -92,11 +92,11 @@ var pageProfil = {
bindViewActionEvent:function(){
$(".ssmla").off().on("click", function(){
pageProfil.responsiveMenuLeft();
pageProfil.params.view = $(this).data("view");
pageProfil.params.dir = $(this).data("dir");
pageProfil.params.action = $(this).data("action");
$("#div-select-create").hide(200);
if(notEmpty(pageProfil.params.view)){
if(notEmpty($(this).data("view"))){
pageProfil.params.view = $(this).data("view");
pageProfil.params.dir = $(this).data("dir");
coInterface.showLoader("#central-container");
$("#central-container").attr("data-active-view", pageProfil.params.view);
$(".ssmla").removeClass("active");
......@@ -281,6 +281,20 @@ var pageProfil = {
}
,"html");
},
settings: function(){
getAjax('', baseUrl+'/'+moduleId+'/settings/index',
function(html){
$("#central-container").html(html);
}
,"html");//urlCtrl.loadByHash("#settings.page.myAccount");
},
settingsCommunity : function(){
getAjax('', baseUrl+'/'+moduleId+'/settings/confidentiality/type/'+contextData.type+'/id/'+contextData.id,
function(html){
$("#central-container").html("<div class='col-xs-12 bg-white'>"+html+"</div>");
}
,"html");
},
contacts: function(){
getAjax('', baseUrl+'/'+moduleId+'/element/getcontacts/type/'+contextData.type+
'/id/'+contextData.id,
......
......@@ -539,7 +539,7 @@ var searchInterface={
searchConstruct.initType=searchObject.initType;
if(typeof searchObject.count != "undefined" && searchObject.count)
searchConstruct.count=searchObject.count;
if(typeof searchObject.ranges != "undefined")
if(typeof searchObject.ranges != "undefined" && (typeof searchObject.indexStep == "undefined" || searchObject.indexStep > 0))
searchConstruct.ranges=searchObject.ranges;
if(typeof searchObject.countType != "undefined")
searchConstruct.countType=searchObject.countType;
......@@ -1039,7 +1039,8 @@ var searchAllEngine = {
news : 0,
places : 0,
ressources : 0,
bookmarks : 0
bookmarks : 0,
proposals : 0
//proposals : 0
};
},
......@@ -1059,8 +1060,8 @@ var searchAllEngine = {
places : { indexMin : 0, indexMax : 30, waiting : 30 },
ressources : { indexMin : 0, indexMax : 30, waiting : 30},
cities : { indexMin : 0, indexMax : 30, waiting : 30 },
bookmarks : {indexMin : 0, indexMax : 30, waiting: 30}
//proposals : { indexMin : 0, indexMax : 30, waiting : 30 }
bookmarks : {indexMin : 0, indexMax : 30, waiting: 30},
proposals : { indexMin : 0, indexMax : 30, waiting : 30 }
};
$.each(searchObject.types, function(e, v){
entry=e;
......
......@@ -202,10 +202,10 @@ var settings = {
'<span class="city-contact text-light pull-left" idcontact="'+id+'">' + city + '</span>'+
'</span>' +
'</div>';
if(typeSet=="notifications")
str+=settings.getToolbarSettingsNotifications(setNotif, setMails, type, id);
else if(typeSet=="confidentiality")
str+=settings.getToolbarSettingsConfidentiality(type,id);
//if(typeSet=="notifications")
str+=settings.getToolbarSettings(setNotif, setMails, type, id);
//else if(typeSet=="confidentiality")
// str+=settings.getToolbarSettingsConfidentiality(type,id);
str+='</div>';
}
});
......@@ -213,13 +213,24 @@ var settings = {
}
});
$("#community-settings-list").html(str);
$("#settingsScrollByType").html(scrollContent);
//$("#settingsScrollByType").html(scrollContent);
settings.settingsCommunityEvents();
}
},
getToolbarSettings: function(setNotif, setMails, type, id){
html='<div class="col-md-6 col-sm-4 col-xs-6">'+
'<div class="col-xs-12 no-padding margin-bottom-5">'+
'<a class="btn btn-default col-md-12 col-sm-12 col-xs-12 dropdown-settings" href="javascript:;" onclick="settings.showPanelConfidentiality(\''+type+'\',\''+id+'\',true)">'+
'<i class="fa fa-cogs"></i> '+tradSettings.settingsConfidentiality+
'</a>'+
'</div>'+
settings.getToolbarSettingsNotifications(setNotif, setMails, type, id)+
'</div>';
return html;
},
getToolbarSettingsNotifications: function(setNotif, setMails, type, id){
html='<div class="col-md-3 col-sm-4 col-xs-6">'+
'<div class="dropdown no-padding col-xs-12 margin-bottom-20">'+
str='<div class="col-xs-12 no-padding">'+
'<div class="dropdown no-padding col-xs-12 margin-bottom-5">'+
'<a data-toggle="dropdown" class="btn btn-default col-md-12 col-sm-12 col-xs-12 dropdown-settings" href="javascript:;">'+
'<i class="fa fa-bell"></i> <span class="hidden-xs">Notifs : </span><span class="changeValueDrop">'+setNotif+'</span> <i class="fa fa-caret-down" style="font-size:inherit;"></i>'+
'</a>'+
......@@ -247,8 +258,8 @@ var settings = {
'</ul>'+
'</div>'+
'</div>'+
'<div class="col-md-3 col-sm-4 col-xs-6">'+
'<div class="dropdown no-padding col-xs-12 margin-bottom-20">'+
'<div class="col-xs-12 no-padding">'+
'<div class="dropdown no-padding col-xs-12 margin-bottom-5">'+
'<a data-toggle="dropdown" class="btn btn-default col-md-12 col-sm-12 col-xs-12 dropdown-settings" href="javascript:;">'+
'<i class="fa fa-envelope"></i> <span class="hidden-xs">Emails : </span><span class="changeValueDrop">'+setMails+'</span> <i class="fa fa-caret-down" style="font-size:inherit;"></i>'+
'</a>'+
......@@ -276,18 +287,12 @@ var settings = {
'</ul>'+
'</div>'+
'</div>';
return html;
//'</div>';
return str;
},
getToolbarSettingsConfidentiality: function(type, id){
html='<div class="col-md-6 col-sm-6 col-xs-6">'+
'<a class="btn btn-default col-md-12 col-sm-12 col-xs-12 dropdown-settings" href="javascript:;" onclick="settings.showPanelConfidentiality(\''+type+'\',\''+id+'\',true)">'+
'<i class="fa fa-cogs"></i> '+tradSettings.settings+
'</a>'+
'</div>';
/*getToolbarSettingsConfidentiality: function(type, id){
return html;
},
},*/
showPanelConfidentiality: function(type, id, modal){
ajaxPost('#modalConfidentialityCommunity' ,baseUrl+'/'+moduleId+"/settings/confidentiality/type/"+type+"/id/"+id+"/modal/true",
null,function(){
......
......@@ -226,7 +226,7 @@ function appendScopeBreadcrum(){
if($.inArray(myScopes.type, ["multiscopes", "communexion"]) > -1)
$("#"+myScopes.type+"-btn").addClass("active");
}
function setOpenBreadCrum(params, customCity, callB){
function setOpenBreadCrum(params, customCity, callB, typeScope){
setOpenScope={};
if(typeof params.zones != "undefined"){
zones=params.zones.split(",");
......@@ -258,25 +258,30 @@ function setOpenBreadCrum(params, customCity, callB){
dataType: "json",
success: function(data){
mylog.log("data", data);
myScopes.type="open";
myScopes.open=data.scopes;
if(notNull(typeScope)){
myScopes.type=typeScope;
myScopes[typeScope]=data.scopes;
}else{
myScopes.type="open";
myScopes.open=data.scopes;
}
localStorage.setItem("myScopes",JSON.stringify(myScopes));
appendScopeBreadcrum();
if(customCity)
costum.scopes=myScopes.open;
if(typeof callB != "undefined" && notNull(callB))
callB();
else{
loadingData=false;
startSearch(searchObject.indexMin, null, searchCallback);
}
//else{
//loadingData=false;
//startSearch(searchObject.indexMin, null, searchCallback);
//}
},
error: function(error){
toastr.error("waswrong");
mylog.log();
}
});
myScopes.type="open";
myScopes.type=(notNull(typeScope)) ? typeScope : "open";
}
function getSearchLocalityObject(){
var res = {};
......
......@@ -407,6 +407,7 @@ class CommunecterController extends Controller
),
"settings" => array(
"index" => array("href" => "/ph/co2/settings/index", "public" => true),
"redirect" => array("href" => "/ph/co2/settings/redirect"),
"notificationsaccount" => array("href" => "/ph/co2/settings/notificationsaccount"),
"notificationscommunity" => array("href" => "/ph/co2/settings/notificationscommunity"),
"confidentiality" => array("href" => "/ph/co2/settings/confidentiality"),
......
{
"title" : "app",
"domaineName" : "communecter.org",
"metaImg" : "/assets/img/bg_pixeltree2.jpg",
"metaTitle" : "Réseau sociétal citoyen",
"metaDesc" : "Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société.",
"metaImg" : "themes/CO2/assets/img/bg_pixeltree2.jpg",
"metaTitle" : "Communecter, le réseau sociétal citoyen libre",
"metaDesc" : "Retrouvez la richesse qui vous entoure. Créez votre réseau, communiquez et agissez sur votre société. Communecter, le numérique libre au service du réel !",
"devises" : {
"all":"All",
"€" : "€",
......@@ -396,7 +396,7 @@
"label":"My parameters",
"icon" : "cogs",
"aClass":"lbh",
"href":"#settings.page.myAccount"
"href":"#{slug}.view.settings"
},
"logout" : {
"href":"/co2/person/logout",
......@@ -763,21 +763,14 @@
"icon":"cogs",
"typeAllow":["citoyens"],
"edit":true,
"action":"settingsAccount"
"view":"settings"
},
"confidentialityCommunity":{
"label":"Confidentiality params",
"settingsCommunity":{
"label":"Settings params",
"icon":"cogs",
"typeAllow":["projects", "organizations", "events"],
"edit":true,
"action":"confidentialityCommunity"
},
"notificationsCommunity":{
"label":"Notifications preferences",
"icon":"bell",
"typeAllow":["projects", "organizations", "events"],
"edit":true,
"action":"notificationsCommunity"
"view":"settingsCommunity"
},
"editSlug":{
"label":"Edit slug",
......
......@@ -18,6 +18,9 @@ class SettingsController extends CommunecterController {
//'preferences' => 'citizenToolKit.controllers.pod.preferencesAction',
);
}
public function actionRedirect(){
echo $this->renderPartial("redirect");
}
public function actionNotificationsAccount(){
$element=Element::getElementSimpleById(Yii::app()->session["userId"], Person::COLLECTION, null, array("preferences"));
echo $this->renderPartial("notificationsAccount", array("preferences"=>$element["preferences"]), true);
......
......@@ -76,8 +76,8 @@ jQuery(document).ready(function() {
$('#banner_change').off().on('change.bs.fileinput', function () {
setTimeout(function(){
var files = document.getElementById("banner_change").files;
if (files[0].size > 2097152)
toastr.warning("Please reduce your image before to 2Mo");
if (files[0].size > 5000000)
toastr.warning("<?php echo Yii::t('common','Size maximum 5Mo') ?>");
else {
for (var i = 0; i < files.length; i++) {
var file = files[i];
......
......@@ -3,7 +3,8 @@
array(
'/vendor/colorpicker/js/colorpicker.js',
'/vendor/colorpicker/css/colorpicker.css',
'/css/default/directory.css',
'/css/default/directory.css',
'/css/default/settings.css',
'/css/profilSocial.css',
'/css/calendar.css',
), Yii::app()->theme->baseUrl. '/assets'
......@@ -11,7 +12,8 @@
$cssAnsScriptFilesModule = array(
'/js/default/calendar.js',
'/js/default/profilSocial.js',
'/js/default/editInPlace.js'
'/js/default/editInPlace.js',
'/js/default/settings.js'
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl);
......
......@@ -143,11 +143,11 @@
//$(".fileupload-preview img").css("width", "auto");
}
var file = document.getElementById(contentId+'_avatar').files[0];
if(file && file.size < 2097152){
if(file && file.size < 5000000){
$("#"+contentId+"_photoAdd").submit();
}else{
if(file && file.size > 2097152){
toastr.error("<?php echo Yii::t('fileUpload','Size maximum 2Mo',null,Yii::app()->controller->module->id) ?>");
if(file && file.size > 5000000){
toastr.error("<?php echo Yii::t('common','Size maximum 5Mo') ?>");
}
updateBtnUpload(false);
$("#"+contentId+"_fileUpload").fileupload("clear");
......
<?php
$cs = Yii::app()->getClientScript();
/*$cs = Yii::app()->getClientScript();
$cssAnsScriptFilesTheme = array(
//SELECT2
'/plugins/bootstrap-toggle/css/bootstrap-toggle.min.css',
......@@ -7,26 +7,26 @@ $cssAnsScriptFilesTheme = array(
'/plugins/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css',
'/plugins/bootstrap-switch/dist/js/bootstrap-switch.min.js' ,
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); */
?>
<style>
.settingsHeader{
/*.settingsHeader{
position: fixed;
top: 60px;
z-index: 100;
right: 5px;
left: 25%;
}
}*/
.scroll-container{
background-color: white !important;
border:none !important;
margin-bottom: none !important;
}
#community-settings{
/*#community-settings{
margin-top: 133px !important;
}
}*/
.btn-scroll-type, #btnSettingsInfos{
font-size: 18px;
font-variant: small-caps;
......@@ -43,11 +43,11 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->requ
#modalExplainSettings{
top: 60px !important;
}
@media (max-width: 991px) {
/*@media (max-width: 991px) {
.settingsHeader{
left: 0px;
}
}
}*/
@media (min-width: 991px) {
#modalExplainSettings{
left: 25% !important;
......
......@@ -4,7 +4,7 @@
<div class="modal-dialog">
<div class="modal-content">
<?php } ?>
<div class="modal-header">
<div class="settings-header">
<?php if(@$modal && $modal!==false){ ?>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php } ?>
......@@ -13,7 +13,7 @@
else
$titleParams=Yii::t("common","Settings {what}", array("{what}"=>Yii::t("common","of the ".Element::getControlerByCollection($type))." ".$element["name"]));
?>
<h4 class="modal-title"><i class="fa fa-cog"></i> <?php echo $titleParams ?></h4>
<h3 class="title"><i class="fa fa-ban"></i> <?php echo $titleParams ?></h3>
</div>
<div class="modal-body">
<div class="row">
......@@ -128,7 +128,7 @@
</div>
</div>
<div class="col-sm-4 col-xs-4 text-right padding-10 margin-top-10">
<!--<div class="col-sm-4 col-xs-4 text-right padding-10 margin-top-10">
<i class="fa fa-message"></i> <strong><?php echo Yii::t("common","Badge") ;?> :</strong>
</div>
<div class="col-sm-8 col-xs-8 text-left padding-10">
......@@ -140,7 +140,7 @@
<i class="fa fa-user-secret"></i> <?php echo Yii::t("common","No"); ?>
</button>
</div>
</div>
</div>-->
<?php if($type != Person::COLLECTION){ ?>
<div class="col-sm-4 col-xs-4 text-right padding-10 margin-top-10">
......@@ -154,29 +154,38 @@
<i class="fa fa-user-secret"></i> <?php echo Yii::t("common","No"); ?></button>
</div>
</div>
<?php if($type != Organization::COLLECTION){ ?>
<div class="col-sm-4 col-xs-4 text-right padding-10 margin-top-10">
<i class="fa fa-message"></i> <strong><?php echo Yii::t("common","Private") ;?> :</strong>
<div class="col-sm-4 col-xs-4 text-right padding-10 margin-top-10">
<i class="fa fa-message"></i> <strong><?php echo Yii::t("common","Private") ;?> :</strong>
</div>
<div class="col-sm-8 col-xs-8 text-left padding-10">
<div class="btn-group btn-group-private inline-block">
<button class="btn btn-default confidentialitySettings" type="private" value="true">
<i class="fa fa-group"></i> <?php echo Yii::t("common","Yes"); ?></button>
<button class="btn btn-default confidentialitySettings" type="private" value="false">
<i class="fa fa-user-secret"></i> <?php echo Yii::t("common","No"); ?></button>
</div>
</div>
<?php if(!isset($modal) || empty($modal)){ ?>
<div class="col-xs-12 padding-10 margin-top-10 notificationsModalSettings settings-header">
<h3 class="title">
<i class="fa fa-bell"></i> <?php echo Yii::t("common","Notifications settings") ;?> <a href="javascript:;" id="btnSettingsInfos" class="margin-left-10" style="font-size: 14px;color: #e6344d;text-transform: capitalize;"><i class="fa fa-info-circle"></i> <?php echo Yii::t("common", "Infos"); ?></a>
</h3>
</div>
<div class="col-sm-8 col-xs-8 text-left padding-10">
<div class="btn-group btn-group-private inline-block">
<button class="btn btn-default confidentialitySettings" type="private" value="true">
<i class="fa fa-group"></i> <?php echo Yii::t("common","Yes"); ?></button>
<button class="btn btn-default confidentialitySettings" type="private" value="false">
<i class="fa fa-user-secret"></i> <?php echo Yii::t("common","No"); ?></button>
</div>
<div class="col-xs-10 col-xs-offset-1 text-left padding-10 elementSettingsNotifs notificationsModalSettings">
</div>
<?php } ?>
<?php } ?>
<?php $this->renderPartial('co2.views.settings.modalExplainCommunitySettings', array()); ?>
<?php }
} ?>
</div>
</div>
<?php if(@$modal && $modal!==false){ ?>
<div class="modal-footer">
<button type="button" class="lbh btn btn-success btn-confidentialitySettings" data-dismiss="modal" aria-label="Close" data-hash="#page.type.<?php echo $type ?>.id.<?php echo $element['_id'] ;?>">
<i class="fa fa-times"></i> <?php echo Yii::t("common","Close") ;?>
</button>
</div>
<?php if(@$modal && $modal!==false){ ?>
</div>
</div>
</div>
......@@ -193,5 +202,12 @@ console.log("preferences",preferences);
jQuery(document).ready(function() {
settings.bindButtonConfidentiality(preferences);
settings.bindEventsConfidentiality(contextId, contextType);
if(typeof myContacts != "undefined" && typeof myContacts[contextType] != "undefined" && typeof myContacts[contextType][contextId] != "undefined"){
var setNotif = (typeof myContacts[contextType][contextId].notifications != "undefined") ? tradSettings[myContacts[contextType][contextId].notifications] : tradSettings["bydefault"];
var setMails = (typeof myContacts[contextType][contextId].mails != "undefined") ? tradSettings[myContacts[contextType][contextId].mails] : tradSettings["bydefault"];
$(".elementSettingsNotifs").html(settings.getToolbarSettingsNotifications(setNotif, setMails, contextType, contextId));
settings.settingsCommunityEvents();
}else
$(".notificationsModalSettings").remove();
});
</script>
\ No newline at end of file
This diff is collapsed.
<div class="modal fade" role="dialog" id="modalExplainSettings" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header bg-green text-white">
<h4 class="modal-title"><i class="fa fa-info-circle"></i> <?php echo Yii::t("settings","All informations about your community's notifications") ?></h4>
</div>
<div class="modal-body center text-dark hidden" id="modalSendAgainSuccessContent"></div>
<div class="modal-body center text-dark">
<h5 class="no-margin uppercase"><i class="fa fa-cogs"></i> <?php echo Yii::t("settings","You will set parameters of notifications you received about <b>activity on elements that you are connected : organizations, projects and events</b>")?></h5><br/>
<span class="no-margin">
<b><?php echo Yii::t("common", "Notifications") ?>:</b> <small><?php echo Yii::t("settings", "Alerts you receive inside communecter") ?></small><br/>
<b><?php echo Yii::t("common", "Mails") ?>:</b> <small><?php echo Yii::t("settings", "Alerts you received on your email adress") ?></small><br/>
<hr/>
<i class="fa fa-check"></i> <?php echo Yii::t("settings","Be free to desactivate all your notifications or set it <b>by level</b>") ?>.<br/>
<i class="fa fa-check"></i> <?php echo Yii::t("settings","Find <b>all options</b> linked to </b>its level</b>.<br/> Of course, <b>higher</b> level <b>includes</b> options of <b>lower</b> level of notifications") ?><br/>
<i class="fa fa-check"></i> <?php echo Yii::t("settings","Some options are only done for administrator of the community and will be indicated in the following list by <b>a status 'only admin'</b>") ?><br/>
</span>
<hr>
<h5><i class="fa fa-angle-down"></i> <?php echo Yii::t("settings", "Low")?>:</h5><br/>
<small>
<i class="fa fa-gavel" style="width:20px;"></i> <b><?php echo Yii::t("settings","Demand to join the community of an element (only admin)")?></b><br>
<i class="fa fa-at" style="width:20px;"></i> <b><?php echo Yii::t("settings","Mention in a comment or a news")?></b><br>
<i class="fa fa-comment" style="width:20px;"></i> <b><?php echo Yii::t("settings","Message for classified or ressource") ?></b><br>
</small>
<hr>
<h5><i class="fa fa-angle-down"></i> <?php echo Yii::t("settings", "By default")?>:</h5><br/>
<small>
<i class="fa fa-rss" style="width:20px;"></i> <b><?php echo Yii::t("settings","New post on a wall of an element")?></b><br>
<i class="fa fa-thumbs-up" style="width:20px;"></i> <b><?php echo Yii::t("settings","Activity on a post and in the collaborative space (comment, like, unlike, vote)")?></b><br>
<i class="fa fa-plus" style="width:20px;"></i> <b><?php echo Yii::t("settings","Adding of an event, a project, a ressources, etc.") ?></b><br>
<i class="fa fa-link" style="width:20px;"></i> <b><?php echo Yii::t("settings","New followers on an element") ?></b><br>
<i class="fa fa-gavel" style="width:20px;"></i> <b><?php echo Yii::t("settings","Activity on collaborative space : proposals, new rooms, actions, ammend and resolutions") ?></b><br>
<i class="fa fa-camera" style="width:20px;"></i> <b><?php echo Yii::t("settings","Add in the library: photos, files, bookmarks, videos") ?></b><br>
</small>
<hr>
<h5><i class="fa fa-angle-down"></i> <?php echo Yii::t("settings", "High")?>:</h5><br/>
<small>
<i class="fa fa-check-circle" style="width:20px;"></i> <b><?php echo Yii::t("settings","Demand has been validated by another")?></b><br>
<i class="fa fa-envelope" style="width:20px;"></i> <b><?php echo Yii::t("settings","Invitation to join community has been sent")?></b><br>
<i class="fa fa-share-alt" style="width:20px;"></i> <b><?php echo Yii::t("settings","Answer to an invitation") ?></b><br>
<i class="fa fa-pencil" style="width:20px;"></i> <b><?php echo Yii::t("settings","Update of general informations") ?></b><br>
</small>
</div>
<div class="modal-footer">
<!--data-dismiss="modal"-->
<button type="button" class="btn btn-default"><i class="fa fa-times"></i> <?php echo Yii::t("common","Close") ?></button>
</div>
</div>
</div>
</div>
......@@ -22,9 +22,9 @@ $cssAnsScriptFilesModule = array(
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl);
?>
<div id="myAccount-settings" class="contain-section-params col-xs-12">
<div class="settings-header text-center">
<h3 class="title"><i class="fa fa-user-circle "></i> <?php echo Yii::t("settings", "My Account") ?></h3>
<div id="myAccount-settings" class="contain-section-params col-xs-12 bg-white shadow2 margin-bottom-20">
<div class="settings-header">
<h3 class="title"><i class="fa fa-cogs"></i> <?php echo Yii::t("settings", "Manage your account") ?></h3>
</div>
<div class="col-xs-12 no-padding">
<h4 style="text-transform: none;" ><i class="fa fa-unlock-alt "></i> <?php echo Yii::t("common","Change password"); ?> <a href="javascript:;" id="btn-update-password-setting" class="btn btn-success btn-sm"> <i class="fa fa-pencil "></i> </a> </h4>
......@@ -49,13 +49,29 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->
?>
<div class="block-account col-xs-12 no-padding">
<h4 style="text-transform: none;"><i class='fa fa-trash '></i> <?php echo "Supprimer mon compte"; ?> <a href="javascript:;" id="btn-delete-element-setting" class="btn btn-danger btn-sm"> <i class="fa fa-trash "></i> </a></h4>