diff --git a/assets/images/odd/0060a1.png b/assets/images/odd/0060a1.png new file mode 100755 index 0000000000000000000000000000000000000000..4035bbc6600a19e7937a8fe79c95beb6ab2c8b94 Binary files /dev/null and b/assets/images/odd/0060a1.png differ diff --git a/assets/images/odd/008cd5.png b/assets/images/odd/008cd5.png new file mode 100755 index 0000000000000000000000000000000000000000..781088f04ab0af8b307c2e381c0f20681683fd95 Binary files /dev/null and b/assets/images/odd/008cd5.png differ diff --git a/assets/images/odd/00bae3.png b/assets/images/odd/00bae3.png new file mode 100755 index 0000000000000000000000000000000000000000..a3676c6aa93559e8fac330d93ac9fbdf450a35f7 Binary files /dev/null and b/assets/images/odd/00bae3.png differ diff --git a/assets/images/odd/16ad38.png b/assets/images/odd/16ad38.png new file mode 100755 index 0000000000000000000000000000000000000000..c0ba3c13d08c70aa4ecf38eaa37f9fa0f1259332 Binary files /dev/null and b/assets/images/odd/16ad38.png differ diff --git a/assets/images/odd/1e446b.png b/assets/images/odd/1e446b.png new file mode 100755 index 0000000000000000000000000000000000000000..bdbc89343db2d7f9a4f2acd73f226ed31fe0752a Binary files /dev/null and b/assets/images/odd/1e446b.png differ diff --git a/assets/images/odd/238846.png b/assets/images/odd/238846.png new file mode 100755 index 0000000000000000000000000000000000000000..74c124c7dea8c17a014a4551eb60004b34fd3543 Binary files /dev/null and b/assets/images/odd/238846.png differ diff --git a/assets/images/odd/39c134.png b/assets/images/odd/39c134.png new file mode 100755 index 0000000000000000000000000000000000000000..8e12284198bb1701e3c1df8ed442f86a6d81febf Binary files /dev/null and b/assets/images/odd/39c134.png differ diff --git a/assets/images/odd/ad0040.png b/assets/images/odd/ad0040.png new file mode 100755 index 0000000000000000000000000000000000000000..14a6a7b5a451e081797edc986715cce73c817e95 Binary files /dev/null and b/assets/images/odd/ad0040.png differ diff --git a/assets/images/odd/c08e23.png b/assets/images/odd/c08e23.png new file mode 100755 index 0000000000000000000000000000000000000000..6b27083c9af99cf3e60e72bfdbbb14f539b5162f Binary files /dev/null and b/assets/images/odd/c08e23.png differ diff --git a/assets/images/odd/d00022.png b/assets/images/odd/d00022.png new file mode 100755 index 0000000000000000000000000000000000000000..24ec670868cf0dab1a8d9d9c86fa63eb72262aba Binary files /dev/null and b/assets/images/odd/d00022.png differ diff --git a/assets/images/odd/dfac2b.png b/assets/images/odd/dfac2b.png new file mode 100755 index 0000000000000000000000000000000000000000..a3954fb8952a08de13f09ad5569285bd7e91e9d9 Binary files /dev/null and b/assets/images/odd/dfac2b.png differ diff --git a/assets/images/odd/eb0060.png b/assets/images/odd/eb0060.png new file mode 100755 index 0000000000000000000000000000000000000000..e9b04d66abaf562517257d731cfdb80c2c69dbad Binary files /dev/null and b/assets/images/odd/eb0060.png differ diff --git a/assets/images/odd/f4002f.png b/assets/images/odd/f4002f.png new file mode 100755 index 0000000000000000000000000000000000000000..690226d0b695718c965a7e39897cc46732cc0885 Binary files /dev/null and b/assets/images/odd/f4002f.png differ diff --git a/assets/images/odd/f60015.png b/assets/images/odd/f60015.png new file mode 100755 index 0000000000000000000000000000000000000000..b5f00ad30fc15c5a9cca5d199ee61cdc92e02bfd Binary files /dev/null and b/assets/images/odd/f60015.png differ diff --git a/assets/images/odd/fa5a0b.png b/assets/images/odd/fa5a0b.png new file mode 100755 index 0000000000000000000000000000000000000000..866bdf5d4b1e434f9e8b9ea1c861adf819fb3648 Binary files /dev/null and b/assets/images/odd/fa5a0b.png differ diff --git a/assets/images/odd/fc9b00.png b/assets/images/odd/fc9b00.png new file mode 100755 index 0000000000000000000000000000000000000000..3722f254cc5be7553b0cd9c11c1563a7a3142fba Binary files /dev/null and b/assets/images/odd/fc9b00.png differ diff --git a/assets/images/odd/ffcb00.png b/assets/images/odd/ffcb00.png new file mode 100755 index 0000000000000000000000000000000000000000..1b729d60ebdf3fdf636437284e29d00842031d48 Binary files /dev/null and b/assets/images/odd/ffcb00.png differ diff --git a/assets/images/odd/ffffff.png b/assets/images/odd/ffffff.png new file mode 100755 index 0000000000000000000000000000000000000000..a1dd6f9608023850d609891b4ce750c7d5422130 Binary files /dev/null and b/assets/images/odd/ffffff.png differ diff --git a/assets/js/aap/aap.js b/assets/js/aap/aap.js index 7882c068e34abf98acdc5199c00be9f911d6b6ba..466c6fe97ea8df0272eaec225d656545d17ac790 100755 --- a/assets/js/aap/aap.js +++ b/assets/js/aap/aap.js @@ -5855,7 +5855,7 @@ var aapObj = { ' </div>' + ' <div class="form-group">' + ' <select class="form-control input-sm" id="kanb-filter-milestone">' + - ' <option value="" selected>(Aucun jalon)</option>' + + ' <option value="" selected>{{jalon_label}}</option>' + ' {{jalons}}' + ' </select>' + ' </div>' + @@ -5869,7 +5869,8 @@ var aapObj = { }).join(""), tags: existing_tags.map(function (tag) { return ('<label class="kanb-filter-tags label label-default" type="button" data-target="' + tag + '">#' + tag + '</label>') - }).join("") + }).join(""), + jalon_label: milestones.length === 0 ? "(Aucun jalon)" : "(Aucun jalon sélectionné)", })); contributorFilter = topContributorFilter('#contributor-filter-container'); contributorFilter.build(Object.keys(actionContributors).map(function (contributorKey) { diff --git a/assets/js/admin/panel.js b/assets/js/admin/panel.js index 5fa3e85ba8c2aba8ed2d177fa3916b0b512df825..be027e8232cba789eb14fd2b93e08c0c7db98b07 100755 --- a/assets/js/admin/panel.js +++ b/assets/js/admin/panel.js @@ -83,8 +83,17 @@ var adminPanel = { }, bindViewActionEvent:function(){ $(".btnNavAdmin").off().on("click", function(){ + $(".admin-menu-item").removeClass("active"); + $(this).parents(".admin-menu-item").addClass("active"); + adminPanel.params.view = $(this).data("view"); - adminPanel.params.dir = $(this).data("dir"); + adminPanel.params.dir = $(this).data("dir"); + if($(".menu-xs").is(":visible")){ + $(".admin-menu").removeClass("active"); + } + if($(this).data('page')){ + adminPanel.params.page = $(this).data('page'); + } if(!notNull($(this).data("action"))){ onchangeClick=false; adminPanel.initNav(); diff --git a/assets/js/default/directory.js b/assets/js/default/directory.js index e0fefeb938c8734e72176b92bbf3ffe582dbfe72..4ec223e03bf47ec2a05f12b887a9186cb982770d 100755 --- a/assets/js/default/directory.js +++ b/assets/js/default/directory.js @@ -5097,7 +5097,7 @@ var directory = { var aObj = this; var str = ""; if(typeof userConnected != "undefined" && userConnected != null && typeof userConnected.roles != "undefined" && typeof userConnected.roles.superAdmin != "undefined" && userConnected.roles.superAdmin){ - str += '<div class="btn-table col-xs-3 padding-10"><button class="spam-element multiple-spam-element btn disabled" data-id="spam_all"><i class="fa fa-exclamation-circle"></i> Spam</button></div>' + str += '<div class="btn-table col-xs-2 col-md-1 col-lg-1 padding-10"><button class="spam-element multiple-spam-element btn disabled" data-id="spam_all"><i class="fa fa-exclamation-circle"></i> Spam</button></div>' } if(typeof aObj.paramsSearch.doublon == 'undefined' || (typeof aObj.paramsSearch.doublon != 'undefined' && !aObj.paramsSearch.doublon)){ str += '<div class="pageTable col-xs-12 padding-10"></div>'; @@ -5195,7 +5195,9 @@ var directory = { tot += '<td style="border-left:none !important;border-right:none !important;">'+totalColumn+'</td>'; $(".bodySearchContainer #table .directoryLines").append(tot); } - } + }else{ + $(".bodySearchContainer #table .directoryLines").html('<tr><td class="text-center" colspan="7">'+trad['noresult']+'</td></tr>'); + } }, buildDirectoryLine : function( e, collection, icon ){ diff --git a/assets/js/default/filters.js b/assets/js/default/filters.js index f190d65571332d4ae0860ad3194d4c029144bf7b..90413e7cb6eb24fdadc7868075d9e51305d1c8be 100644 --- a/assets/js/default/filters.js +++ b/assets/js/default/filters.js @@ -1118,7 +1118,7 @@ var searchObj = { data-keyodd="`+odd.name+`"> <h5 style="display:flex; color:white; font-size:11px;"><b class="margin-right-5 number-odd" style="font-size:10pt; font-weight:bolder">`+ key + ` </b> <span class="title-odd"> `+ nameTheme + `</span></h5> <div class="text-center"> - <img style="width:100%;height:auto;" src="`+ odd.image + `"> + <img style="width:100%;height:auto;" src="`+co2AssetPath+odd.image + `"> </div> </a> <div> @@ -1337,6 +1337,18 @@ var searchObj = { var dataType= "data-type='"+((exists(v.type)) ? v.type : k)+"'"; var dataMultiple=(typeof v.multiple != "undefined") ? "data-multiple='"+v.multiple+"'" :""; // ["btn1","btn2",] + + if(exists(v.countFieldPath)){ + if(!exists(fObj.filters.views.countFieldPath)) + fObj.filters.views.countFieldPath = []; + fObj.filters.views.countFieldPath.push(v.countFieldPath); + } + + if(exists(v.countOnlyPath)){ + if(!exists(fObj.filters.views.countOnlyPath)) + fObj.filters.views.countOnlyPath = []; + fObj.filters.views.countOnlyPath.push(v.countOnlyPath); + } if(typeof v.list != "undefined" && v.list != null){ //includeSubList=(typeof v.list=="object" && !Array.isArray(v.list)) ? true : false; $.each( v.list ,function(kL,vL){ @@ -1852,11 +1864,19 @@ var searchObj = { if(typeof v.lists != "undefined" && notNull(v.lists)){ fObj.filters.lists.odd = v.lists; $.each(v.lists, function(key, odd){ + if(typeof odd == "string"){ + odd = { + name: odd, + color : "white", + image:"" + } + } + if(typeof odd.name != "undefined" && odd.name != null){ var nameTheme = typeof tradTags[odd.name.toLowerCase()] != "undefined" ? tradTags[odd.name.toLowerCase()].charAt(0).toUpperCase()+tradTags[odd.name.toLowerCase()].slice(1) : (odd.name).charAt(0).toUpperCase() + (odd.name).slice(1); - str += `<div style="height:120px!important;" class="`+widthClass+`"> + str += `<div style="${(odd.image!="")?'height:120px!important;':''}" class="`+widthClass+`"> <button style="background-color:`+ odd.color + `;" data-type="${v.type}" data-label="${odd.name}" @@ -1867,9 +1887,9 @@ var searchObj = { class="btn-filters-select ${k} filter-item-with-image" > <div class="padding-5" > - <h5 style="display:flex; color:white; font-size:12px;"><b class="margin-right-5 number-odd" style="font-size:18pt; font-weight:bolder">`+ key + ` </b> <span class="title-odd"> `+ nameTheme + `</span></h5> + <h5 style="display:flex; color:${(odd.color=="white"?"black":"white")}; font-size:12px;">${(odd.image!="")?'<b class="margin-right-5 number-odd" style="font-size:18pt; font-weight:bolder">'+ key + ' </b>':''} <span class="title-odd"> `+ nameTheme + `</span></h5> <div class="text-center"> - <img style="height:60px;" src="`+ (assetPath+odd.image) + `"> + ${(typeof odd.image!="undefined" && odd.image!="")?`<img style="height:60px;" src="`+ (co2AssetPath+odd.image) + `">`:""} </div> </div> <button> @@ -3593,7 +3613,8 @@ var searchObj = { ajaxPost( null, - baseUrl+"/"+moduleId+"/search/globalautocomplete", + // baseUrl+"/"+moduleId+"/search/globalautocomplete", + fObj.urlData, { "filters":fObj.search.obj.filters, "searchType" : fObj.search.obj.types, "notSourceKey" : fObj.search.obj.notSourceKey, @@ -3652,7 +3673,7 @@ var searchObj = { }) } - if(exists(value.tags)){ + if(!exists(fObj.filters.views.countOnlyPath) && exists(value.tags)){ let countField = value.tags; createCounter(countField); } diff --git a/assets/js/default/loginRegister.js b/assets/js/default/loginRegister.js index 63335031b576c5b3b9d7c71a22c4ff651b8e472e..f1575371bb20fb8eeaf368b823d495ddf476cfd5 100755 --- a/assets/js/default/loginRegister.js +++ b/assets/js/default/loginRegister.js @@ -164,6 +164,7 @@ var Login = { window.location.href = baseUrl+"/"+moduleId+data.goto; } else if( typeof dyFObj.openFormAfterLogin != "undefined"){ userId = data.id; + userConnected = data.account; $('#modalLogin').modal("hide"); dyFObj.openForm( dyFObj.openFormAfterLogin.type, @@ -503,12 +504,15 @@ var Login = { //window.location.href = baseUrl+'#page.type.citoyens.id.'+data.id; window.location.reload(); } - } else{ $('.modal').modal('hide'); $("#modalRegisterSuccessContent").html("<h3><i class='fa fa-smile-o fa-4x text-green'></i><br><br> "+data.msg+"</h3>"); - $("#modalRegisterSuccess").modal({ show: 'true' }); + if(Login.registerOptions.mode == "single_step_register"){ + location.reload(); + }else{ + $("#modalRegisterSuccess").modal({ show: 'true' }); + } // Hide modal if "Okay" is pressed $('#modalRegisterSuccess .btn-default').click(function() { //mylog.log("hide modale and reload"); diff --git a/config/odd.json b/config/odd.json index c1f6b633e5709a9c8c19158576cef0aae870ef66..0fde626f693119878e4eb0bebd41a553d1b4876c 100644 --- a/config/odd.json +++ b/config/odd.json @@ -1,103 +1,103 @@ { "1" : { "color" : "#f4002f", - "image" : "/images/meir/odd/f4002f.png", + "image" : "/images/odd/f4002f.png", "name" : "Pas de pauvreté", "tags" : ["Pas de pauvreté"] }, "2" : { "color" : "#dfac2b", - "image" : "/images/meir/odd/dfac2b.png", + "image" : "/images/odd/dfac2b.png", "name" : "Faim zéro", "tags" : ["Faim zéro"] }, "3" : { "color" : "#16ad38", - "image" : "/images/meir/odd/16ad38.png", + "image" : "/images/odd/16ad38.png", "name" : "Bonne santé et bien-être", "tags" : ["Bonne santé et bien-être"] }, "4" : { "color" : "#d00022", - "image" : "/images/meir/odd/d00022.png", + "image" : "/images/odd/d00022.png", "name" : "Education de qualité", "tags" : ["Education de qualité"] }, "5" : { "color" : "#f60015", - "image" : "/images/meir/odd/f60015.png", + "image" : "/images/odd/f60015.png", "name" : "Egalité entre les sexes", "tags" : ["Egalité entre les sexes"] }, "6" : { "color" : "#00bae3", - "image" : "/images/meir/odd/00bae3.png", + "image" : "/images/odd/00bae3.png", "name" : "Eau propre et assainissement", "tags" : ["Eau propre et assainissement"] }, "7" : { "color" : "#ffcb00", - "image" : "/images/meir/odd/ffcb00.png", + "image" : "/images/odd/ffcb00.png", "name" : "Energie propre et d'un coût abordable", "tags" : ["Energie propre et d'un coût abordable"] }, "8" : { "color" : "#ad0040", - "image" : "/images/meir/odd/ad0040.png", + "image" : "/images/odd/ad0040.png", "name" : "Travail décent et croissance économique", "tags" : ["Travail décent et croissance économique"] }, "9" : { "color" : "#fa5a0b", - "image" : "/images/meir/odd/fa5a0b.png", + "image" : "/images/odd/fa5a0b.png", "name" : "Industrie, innovation et infrastructure", "tags" : ["Industrie, innovation et infrastructure"] }, "10" : { "color" : "#eb0060", - "image" : "/images/meir/odd/eb0060.png", + "image" : "/images/odd/eb0060.png", "name" : "Inégalités réduites", "tags" : ["Inégalités réduites"] }, "11" : { "color" : "#fc9b00", - "image" : "/images/meir/odd/fc9b00.png", + "image" : "/images/odd/fc9b00.png", "name" : "Villes et communautés durables", "tags" : ["Villes et communautés durables"] }, "12" : { "color" : "#c08e23", - "image" : "/images/meir/odd/c08e23.png", + "image" : "/images/odd/c08e23.png", "name" : "Consommation et production responsables", "tags" : ["Consommation et production responsables"] }, "13" : { "color" : "#238846", - "image" : "/images/meir/odd/238846.png", + "image" : "/images/odd/238846.png", "name" : "Mesures relatives à la lutte contre les changements climatiques", "tags" : ["Mesures relatives à la lutte contre les changements climatiques"] }, "14" : { "color" : "#008cd5", - "image" : "/images/meir/odd/008cd5.png", + "image" : "/images/odd/008cd5.png", "name" : "Vie aquatique", "tags" : ["Vie aquatique"] }, "15" : { "color" : "#39c134", - "image" : "/images/meir/odd/39c134.png", + "image" : "/images/odd/39c134.png", "name" : "Vie terrestre", "tags" : ["Vie terrestre"] }, "16" : { "color" : "#0060a1", - "image" : "/images/meir/odd/0060a1.png", + "image" : "/images/odd/0060a1.png", "name" : "Paix, justice et institutions efficaces", "tags" : ["Paix, justice et institutions efficaces"] }, "17" : { "color" : "#1e446b", - "image" : "/images/meir/odd/1e446b.png", + "image" : "/images/odd/1e446b.png", "name" : "Partenariats pour la réalisation des objectifs", "tags" : ["Partenariats pour la réalisation des objectifs"] } diff --git a/views/aap/financementlogs.php b/views/aap/financementlogs.php index 4df7fc2a454d253d000171f00cc234935ee0a861..9d4b7cc35eb2ce9908b07d439dbb48af189267f5 100644 --- a/views/aap/financementlogs.php +++ b/views/aap/financementlogs.php @@ -30,6 +30,9 @@ HtmlHelper::registerCssAndScriptsFiles(array( </div> <div style="display: none" id="financementTable" class="financertable col-md-12 col-sm-12 col-xs-12 tgledv contentInformationCoremu no-padding"> +</div> +<div style="display: none" id="financementStat" class="financertable col-md-12 col-sm-12 col-xs-12 tgledv contentInformationCoremu no-padding"> + </div> <script type="text/javascript"> jQuery(document).ready(function() { diff --git a/views/admin/communityMailing.php b/views/admin/communityMailing.php index 70f17415c6f2790be895bd4d8630d016af259f9a..b3e2dbcf9c9dee98937d191d6e2a2948b7a00341 100755 --- a/views/admin/communityMailing.php +++ b/views/admin/communityMailing.php @@ -352,6 +352,8 @@ jQuery(document).ready(function() { id:costum.contextId, name: costum.title } + paramsmail.invitorId = userId; + paramsmail.invitorName = userConnected.name; paramsmail.urlRedirect = baseUrl+"/costum/co/index/slug/"+costum.contextSlug; paramsmail.urlValidation = baseUrl+"/costum/co/index/slug/"+costum.contextSlug; } @@ -372,7 +374,8 @@ jQuery(document).ready(function() { id:costum.contextId, collection:costum.contextType, path:"listInvitation", - value:listInvitation + value:listInvitation, + updateCache : true }, function(){}); }, function(data){ diff --git a/views/admin/index.php b/views/admin/index.php index 37f70e31529f660d992bdae47f835eab2bd48a9e..88fc372b67b0fa0c274d5b4d1fe9bf023f9b2f28 100755 --- a/views/admin/index.php +++ b/views/admin/index.php @@ -20,7 +20,8 @@ HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl()); } $logo = (@$this->costum["logo"]) ? $this->costum["logo"] : Yii::app()->theme->baseUrl."/assets/img/LOGOS/CO2/logo-min.png"; - + + ?> <!-- start: PAGE CONTENT --> <style type="text/css"> @@ -29,7 +30,6 @@ } #content-admin-panel{ min-height:700px; - background-color: white; } .menuAdmin{ display: flex; @@ -39,11 +39,11 @@ justify-content: center; align-items: center; } - .menu-admin-item{ + /*.menu-admin-item{ width: calc(95% / 3); border: 1px solid; text-align: center; - } + }*/ .menu-admin-item{ cursor: pointer; @@ -71,90 +71,370 @@ font-size: inherit; } } + + /*menu*/ + .admin-menu-item { + text-align: left; + padding: 10px 20px 10px 30px; + border-bottom: 1px solid; + } + .admin-menu-item.active, .admin-menu-item:hover { + background-color: #d4e1ea; + } + .admin-menu-item.active a, .admin-menu-item:hover a{ + color: #495392; + text-decoration: none; + } + .admin-menu-item a { + font-size: 20px; + display: block; + width: 100%; + } + .admin-menu-item a i { + font-size: 24px; + margin-right: 10px; + } + .admin-menu-lists { + list-style: none; + padding: 0; + } + + /* modal*/ + #modal-view-stat { + top: 50px; + background-color: rgb(0 0 0 / 70%); + } + + /* contain-admin-add */ + .contain-admin-add .btn-link h6 i { + font-size: 35px; + width: 70px; + height: 70px; + padding: 15px; + border-radius: 50%; + border: 2px solid; + margin-bottom: 15px; + } + .contain-admin-add .btn-link h6 { + font-size: 16px + } + + .contain-admin-add .btn-link:hover { + border: 1px solid; + border-radius: 15px; + border-left: 4px solid; + } + #view-content-admin .admin-menuLeft { + /*box-shadow: 2px 0 20px #0a0a0a4f;*/ + position: fixed; + height: 100vh; + padding-right: 0; + transition: all .5s ease-in-out; + overflow-y: auto; + padding-bottom: 150px; + box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .6); + } + .admin-menu-xs { + display: none; + cursor: pointer; + } + + .card-counter{ + box-shadow: 2px 2px 10px #5a7490; + margin: 5px; + padding: 20px 20px; + background-color: #fff; + height: 100px; + border-radius: 10px; + transition: .3s linear all; + } + + .card-counter:hover{ + box-shadow: 4px 4px 20px #DADADA; + transition: .3s linear all; + } + + .card-counter.primary{ + border: 1px solid #007bff; + border-left: 5px solid #007bff; + } + + .card-counter.danger{ + background-color: #ef5350; + color: #FFF; + } + + .card-counter.success{ + background-color: #66bb6a; + color: #FFF; + } + + .card-counter.info{ + background-color: #26c6da; + color: #FFF; + } + + .card-counter i{ + font-size: 5em; + opacity: 0.2; + } + + .card-counter .count-numbers{ + position: absolute; + right: 35px; + top: 20px; + font-size: 36px; + display: block; + } + + .card-counter .count-name{ + position: absolute; + right: 35px; + top: 65px; + font-style: italic; + text-transform: capitalize; + opacity: 0.5; + display: block; + font-size: 18px; + color: #007bff; + font-weight: bold; + } + + @media screen and (max-width: 767px) { + .admin-menuLeft { + position: absolute; + left: -767px; + width: 100%; + z-index: 99999; + background: white !important; + width: 90%; + box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .6); + } + + .admin-menuLeft.active { + left: 0px; + } + + .admin-menu-xs/*.menu-left*/ { + display: block; + position: fixed; + z-index: 100000000; + background: #d4e1ea; + color: #495392; + border-radius: 0px 10px 10px 0px; + transform: translate(50%, 100%); + padding: 15px 5px 15px 5px; + writing-mode: vertical-lr; + margin-left: -15px; + } + .admin-menu-item a i { + font-size: 20px; + } + .admin-menu-item a { + font-size: 16px; + } + + } + + /*Table*/ + #panelAdmin th, #panelAdmin td { + border: none; + vertical-align: middle !important; + /*min-width: 10vw;*/ + padding: 0.5em; + font-size: 14px; + } + #panelAdmin { + border: none; + } + .panel-body div table.table-striped { + table-layout: auto !important; + word-wrap: normal !important; + } + #panelAdmin thead tr { + border-radius: 8px 8px 0px 0px; + box-shadow: 0px 0px 0px 5px #2b3b51; + /*background: #2b3b51;*/ + } + #panelAdmin tbody tr { + /*border-radius: 8px; + box-shadow: 0px 0px 0px 5px white;*/ + background: white; + color: #2b3b51; + border-bottom: #eee solid; + } + #panelAdmin thead { + /*color: white;*/ + font-size: 16px; + } + #panelAdmin thead::after, #panelAdmin tbody tr::after { + height: 1em; + display: table-row; + content: ''; + /* background-color: #f0f1f7; */ + } + #content-admin-panel #btn-backToHome { + display: block!important; + } </style> +<div class="col-xs-12" id="view-content-admin"> + <div class="row"> + <div class="admin-menu-xs "> + <i class="fa fa-list-alt"></i> Menu d'administration + </div> + <div class="col-xs-12 col-sm-3 bg-white admin-menuLeft co-scroll"> + <?php if($authorizedAdmin || Role::isSourceAdmin(Role::getRolesUserId(Yii::app()->session["userId"]))){?> + <ul class="admin-menu-lists"> + <?php + if(!empty($menu)){ + foreach($adminConstruct["menu"] as $key => $v) { + $show=(isset($v["show"])) ? $v["show"] : true; + $show= (isset($v["costumAdmin"]) && !Authorisation::isInterfaceAdmin()) ? false : $show; + $show=(isset($v["super"]) && !Authorisation::isInterfaceAdmin()) ? false : $show; + if($show){ + $dataAttr=""; + $dataAttr=(isset($v["dataHref"])) ? "data-href='".$v["dataHref"]."' " : ""; + $dataAttr.=(isset($v["view"]) && !empty($v["view"])) ? "data-view='".$v["view"]."' " : ""; + $dataAttr.=(isset($v["action"]) && !empty($v["action"])) ? "data-action='".$v["action"]."' " : ""; + ?> + <li class="admin-menu-item <?= @$v["view"] == $view ? "active" : "" ?>"> + <a href="javascript:;" class="menu-admin-item btnNavAdmin <?php /*echo @$v["class"]*/ ?>" id="<?php echo @$v["id"] ?>" <?php echo $dataAttr; ?> style="cursor:pointer;"> + <i class="fa fa-<?php echo @$v["icon"] ?> fa-2x"></i> + <span><?php echo Yii::t("admin", @$v["label"]); ?></span> + </a> + </li> + <?php + } + } ?> + + <?php if(Authorisation::isInterfaceAdmin() && Authorisation::isUserSuperAdmin(Yii::app()->session["userId"]) && !isset($this->costum)){ ?> + <li class="admin-menu-item <?= $view == "spamobservatoire" ? "active" : "" ?>"> + <a href="javascript:;" class="menu-admin-item btnNavAdmin" data-view="spamobservatoire" style="cursor:pointer;"> + <i class="fa fa-exclamation-circle fa-2x"></i> + <span>Spam Observatoire</span> + </a> + </li> + <li class="admin-menu-item <?= $view == "zoneadmin" ? "active" : "" ?>"> + <a href="javascript:;" class="menu-admin-item btnNavAdmin " data-view="zoneadmin" style="cursor:pointer;"> + <i class="fa fa-globe fa-2x"></i> + <span>Administration des zones</span> + </a> + </li> + <?php } + } + ?> + </ul> + <?php } ?> + </div> + + <div class="col-sm-9 col-sm-offset-3 col-xs-12 " id="content-admin-panel"> + + <?php if($authorizedAdmin || Role::isSourceAdmin(Role::getRolesUserId(Yii::app()->session["userId"]))){ + $title=(@Yii::app()->session["userIsAdmin"]) ? Yii::t("common","Administration portal") : Yii::t("common","Public administration portal"); + ?> + <div class="col-md-12 col-sm-12 col-xs-12" id="navigationAdmin"> + <div class="col-sm-12 col-xs-12 text-center" style="background: #d4e1ea;color: #495392;"> + <!-- <img src="<?php echo $logo ?>" height="100"><br/> --> + <h3><?php echo $title ?></h3> + </div> + + + <div class="col-xs-12 col-sm-offset-1 col-sm-10 padding-50 links-main-menu" + id="div-admin-select-create"> + <?php + //Filtering button add element if costum + if(isset($adminConstruct["add"]) && $adminConstruct["add"]){ ?> + <br> + <div class="col-xs-12 col-sm-12 shadow2 bg-white "> + + <h5 class="text-center margin-top-15 infoPanelAddContent"> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("form","Add items") ?> + <br> + <small><?php echo Yii::t("form","What kind of content will you create ?") ?></small> + </h5> + + <div class="col-md-12 col-sm-12 col-xs-12 contain-admin-add"><hr></div> + </div> + <?php } else { ?> + <br> + <br> + <div class="col-xs-12 col-sm-12 no-padding text-center "> + <img src="<?php echo Yii::app()->theme->baseUrl.'/assets/img/admin.gif'; ?>" class="" style="width: 70%"> + </div> + <?php } ?> + <!--<div class="col-xs-12 col-sm-offset-1 col-sm-10 shadow2 bg-white margin-top-35"> + <div class="menuAdmin padding-top-10 padding-bottom-10"> + <?php /* + if(!empty($menu)){ + foreach($adminConstruct["menu"] as $key => $v) { + $show=(isset($v["show"])) ? $v["show"] : true; + $show= (isset($v["costumAdmin"]) && !Authorisation::isInterfaceAdmin()) ? false : $show; + $show=(isset($v["super"]) && !Authorisation::isInterfaceAdmin()) ? false : $show; + if($show){ + $dataAttr=""; + $dataAttr=(isset($v["dataHref"])) ? "data-href='".$v["dataHref"]."' " : ""; + $dataAttr.=(isset($v["view"]) && !empty($v["view"])) ? "data-view='".$v["view"]."' " : ""; + $dataAttr.=(isset($v["action"]) && !empty($v["action"])) ? "data-action='".$v["action"]."' " : ""; + */?> + <a href="javascript:;" class="menu-admin-item btnNavAdmin <?php /*echo @$v["class"] */?>" id="<?php /*echo @$v["id"] */?>" <?php /*echo $dataAttr; */?> style="cursor:pointer;"> + <i class="fa fa-<?php /*echo @$v["icon"] */?> fa-2x"></i> + <span><?php /*echo Yii::t("admin", @$v["label"]); */?></span> + </a> + <?php /* + } + } */?> + + <?php /*if(Authorisation::isInterfaceAdmin() && Authorisation::isUserSuperAdmin(Yii::app()->session["userId"])){ */?> + <a href="javascript:;" class="menu-admin-item btnNavAdmin text-red" data-view="spamobservatoire" style="cursor:pointer;"> + <i class="fa fa-exclamation-circle fa-2x"></i> + <span>Spam Observatoire</span> + </a> + <?php /*} + if(Authorisation::isInterfaceAdmin() && Authorisation::isUserSuperAdmin(Yii::app()->session["userId"])){ */?> + <a href="javascript:;" class="menu-admin-item btnNavAdmin text-red" data-view="zoneadmin" style="cursor:pointer;"> + <i class="fa fa-globe fa-2x"></i> + <span>Administration des zones</span> + </a> + <a href="javascript:;" class="menu-admin-item btnNavAdmin text-primary" data-view="instanceadmin" style="cursor:pointer;"> + <i class="fa fa-clone fa-2x"></i> + <span>Administration des instances</span> + </a> + <?php /*} + } + */?> + </div> + </div>--> + </div> + </div> + <!--<div class="col-md-12 col-sm-12 col-xs-12 no-padding" id="goBackToHome"> + <a href="javascript:;" class="btnNavAdmin col-md-12 col-sm-12 col-xs-12 padding-20 text-center bg-orange" data-view="index" style="font-size:20px;"><i class="fa fa-home"></i> <?php /*echo Yii::t("common", "Back to admin home") */?></a> + </div>--> + <div id="content-view-admin" class="col-md-12 col-sm-12 col-xs-12 no-padding"></div> + <?php }else{ ?> + <div class="col-md-12 col-sm-12 col-xs-12 text-center margin-top-50"> + <img src="<?php echo $logo ?>" + class="" height="100"><br/> + <h3><?php echo Yii::t("common","Administration portal") ?></h3> + </div> + <div class="alert-danger text-center padding-30 padding-bottom-50"><strong><?php echo Yii::t("common","You are not authorized to acces adminastrator panel ! <br/>Connect you or contact us in order to become admin system") ?></strong></div> + <?php } ?> + </div> + </div> +</div> +<div class="modal fade" id="modal-view-stat" tabindex="-1" role="dialog" aria-labelledby="modalLabelLarge" aria-hidden="true"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <!--<h4 class="modal-title" id="modalLabelLarge">Modal Title</h4>--> + </div> -<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding" id="content-admin-panel"> - - <?php if($authorizedAdmin || Role::isSourceAdmin(Role::getRolesUserId(Yii::app()->session["userId"]))){ - $title=(@Yii::app()->session["userIsAdmin"]) ? Yii::t("common","Administration portal") : Yii::t("common","Public administration portal"); - ?> - <div class="col-md-12 col-sm-12 col-xs-12" id="navigationAdmin"> - <div class="col-sm-12 col-xs-12 text-center"> - <!-- <img src="<?php echo $logo ?>" height="100"><br/> --> - <h3><?php echo $title ?></h3> - </div> - - - <div class="col-xs-12 col-sm-offset-1 col-sm-10 padding-50 links-main-menu" - id="div-admin-select-create"> - <?php - //Filtering button add element if costum - if(isset($adminConstruct["add"]) && $adminConstruct["add"]){ ?> - - <div class="col-xs-12 col-sm-offset-1 col-sm-10 shadow2 bg-white "> - - <h5 class="text-center margin-top-15 infoPanelAddContent"> - <i class="fa fa-plus-circle"></i> <?php echo Yii::t("form","Add items") ?> - <br> - <small><?php echo Yii::t("form","What kind of content will you create ?") ?></small> - </h5> - - <div class="col-md-12 col-sm-12 col-xs-12 contain-admin-add"><hr></div> - </div> - <?php } ?> - - <div class="col-xs-12 col-sm-offset-1 col-sm-10 shadow2 bg-white margin-top-35"> - <div class="menuAdmin padding-top-10 padding-bottom-10"> - <?php - if(!empty($menu)){ - foreach($adminConstruct["menu"] as $key => $v) { - $show=(isset($v["show"])) ? $v["show"] : true; - $show= (isset($v["costumAdmin"]) && !Authorisation::isInterfaceAdmin()) ? false : $show; - $show=(isset($v["super"]) && !Authorisation::isInterfaceAdmin()) ? false : $show; - if($show){ - $dataAttr=""; - $dataAttr=(isset($v["dataHref"])) ? "data-href='".$v["dataHref"]."' " : ""; - $dataAttr.=(isset($v["view"]) && !empty($v["view"])) ? "data-view='".$v["view"]."' " : ""; - $dataAttr.=(isset($v["action"]) && !empty($v["action"])) ? "data-action='".$v["action"]."' " : ""; - ?> - <a href="javascript:;" class="menu-admin-item btnNavAdmin <?php echo @$v["class"] ?>" id="<?php echo @$v["id"] ?>" <?php echo $dataAttr; ?> style="cursor:pointer;"> - <i class="fa fa-<?php echo @$v["icon"] ?> fa-2x"></i> - <span><?php echo Yii::t("admin", @$v["label"]); ?></span> - </a> - <?php - } - } ?> - - <?php if(Authorisation::isInterfaceAdmin() && Authorisation::isUserSuperAdmin(Yii::app()->session["userId"])){ ?> - <a href="javascript:;" class="menu-admin-item btnNavAdmin text-red" data-view="spamobservatoire" style="cursor:pointer;"> - <i class="fa fa-exclamation-circle fa-2x"></i> - <span>Spam Observatoire</span> - </a> - <?php } - if(Authorisation::isInterfaceAdmin() && Authorisation::isUserSuperAdmin(Yii::app()->session["userId"])){ ?> - <a href="javascript:;" class="menu-admin-item btnNavAdmin text-red" data-view="zoneadmin" style="cursor:pointer;"> - <i class="fa fa-globe fa-2x"></i> - <span>Administration des zones</span> - </a> - <?php } - } - ?> - </div> - </div> - </div> - </div> - <div class="col-md-12 col-sm-12 col-xs-12 no-padding" id="goBackToHome"> - <a href="javascript:;" class="btnNavAdmin col-md-12 col-sm-12 col-xs-12 padding-20 text-center bg-orange" data-view="index" style="font-size:20px;"><i class="fa fa-home"></i> <?php echo Yii::t("common", "Back to admin home") ?></a> - </div> - <div id="content-view-admin" class="col-md-12 col-sm-12 col-xs-12"></div> - <?php }else{ ?> - <div class="col-md-12 col-sm-12 col-xs-12 text-center margin-top-50"> - <img src="<?php echo $logo ?>" - class="" height="100"><br/> - <h3><?php echo Yii::t("common","Administration portal") ?></h3> - </div> - <div class="alert-danger text-center padding-30 padding-bottom-50"><strong><?php echo Yii::t("common","You are not authorized to acces adminastrator panel ! <br/>Connect you or contact us in order to become admin system") ?></strong></div> - <?php } ?> + <div class="modal-body col-xs-12" id="content-view-stat" style="background-color: #ffffff"></div> + </div> + </div> </div> <!-- end: PAGE CONTENT--> <script type="text/javascript"> @@ -182,6 +462,9 @@ bootbox.dialog({message:'<div class="alert-danger text-center"><strong><?php echo Yii::t("common","You are not authorized to acces adminastrator panel ! <br/>Connect you or contact us in order to become admin system") ?></strong></div>'}); } adminPanel.init(); + $(".admin-menu-xs").off().on('click', function() { + $(".admin-menuLeft").toggleClass("active"); + }) }); </script> <!-- end: PAGE CONTENT--> diff --git a/views/app/info/CO2/stats.php b/views/app/info/CO2/stats.php index 513ba218e096a83ae982bacd40af850c3be03f26..d3356bf1901b206f60f2238881f06118c4b673d2 100755 --- a/views/app/info/CO2/stats.php +++ b/views/app/info/CO2/stats.php @@ -29,9 +29,6 @@ .title-super-admin{ display: none; } - header{ - display: none; - } @media screen and (max-width: 1024px) { .main-apropos{ diff --git a/views/element/about.php b/views/element/about.php index 44a32b27b596d8536854c89dbd0a8e749ea41f64..2abba67407d09de205e609788f4f188b4ac88305 100755 --- a/views/element/about.php +++ b/views/element/about.php @@ -911,7 +911,9 @@ function redirigerVersPage(url) { elt: { id: contextData.id, type: contextData.type, - geo: contextData.geo + geo: contextData.geo, + profilImageUrl: contextData.profilImageUrl, + profilMediumImageUrl: contextData.profilMediumImageUrl, }, center: true }; diff --git a/views/element/firstStepCostum.php b/views/element/firstStepCostum.php index 140fa03ebaaf1b9fafcc1764986fc3f07c0804b3..a338b0de583673a4343fcbc150be8bad1d1c2a03 100644 --- a/views/element/firstStepCostum.php +++ b/views/element/firstStepCostum.php @@ -395,26 +395,65 @@ HtmlHelper::registerCssAndScriptsFiles(["/css/blockcms/swiper/swiper-bundle.min. <script type="text/javascript"> if(!notNull(contextData)) contextData = <?= json_encode($element);?>; -firstStepCostum = { + +var firstStepCostum = { template: { - category :{ - costum : { - thirdPlace : tradCategory.thirdPlace, - commons : tradCategory.commons, - greenTransition : tradCategory.greenTransition, - aap : tradCategory.aap, - territorialConnectivity : tradCategory.territorialConnectivity, - Cocity : tradCategory.Cocity, - Community : trad.community, - citizenAgora : tradCategory.citizenAgora, - researchAndInnovation : tradCategory.researchAndInnovation, - socialMapping : tradCategory.socialMapping, - media : "Media", - ArtsAndMusic : tradCategory.ArtsAndMusic, - SportAndActivity : tradCategory.SportAndActivity, - coEvent : "CoEvent", - businessCorporation : tradCategory.businessCorporation - } + categoryused :{ + costum : {} + }, + getCategoryUsedByTemplate(callback) { + var dataCostum = { + contextId : contextId, + contextType : contextType + } + + ajaxPost( + null, + baseUrl+"/"+moduleId+"/cms/categoryusedbytplcms", + { + dataCostum + }, + function(data){ + // firstStepCostum.template.categoryused = {}; + $.each(data, function(type, tplByType) { + $.each(tplByType, function(keyC, tplByCategory) { + if (tplByCategory.type == "costum") { + console.log("tplByCategory",tplByCategory) + if (typeof tplByCategory.category == "string") { + var category = (typeof tradCms[tplByCategory.category] == "undefined" ? (typeof trad[tplByCategory.category] == "undefined" ? tplByCategory.category : trad[tplByCategory.category] ) : tradCms[tplByCategory.category] ) + + tplByCategory.category = tplByCategory.category.replace("&","&") + firstStepCostum.template.categoryused["costum"][tplByCategory.category] = category + if (typeof userConnected.roles.isSuperAdminCms == "undefined" && typeof tplByCategory.shared == "undefined") { + delete firstStepCostum.template.categoryused["costum"][tplByCategory.category] + } + + }else{ + $.each(tplByType, function(keyC, tplByCategory) { + if (!firstStepCostum.template.categoryused["costum"]) { + if (typeof tplByCategory.category == "string") { + var category = (typeof tradCms[tplByCategory.category] == "undefined" ? (typeof trad[tplByCategory.category] == "undefined" ? tplByCategory.category : trad[tplByCategory.category] ) : tradCms[tplByCategory.category] ) + + tplByCategory.category = tplByCategory.category.replace("&","&") + firstStepCostum.template.categoryused["costum"][tplByCategory.category] = category + if (typeof userConnected.roles.isSuperAdminCms == "undefined" && typeof tplByCategory.shared == "undefined") { + delete firstStepCostum.template.categoryused["costum"][tplByCategory.category] + } + + } + } + }); + } + } + }); + if (callback && typeof callback === 'function') { + callback(); + } + }); + }, + null + + ); }, dataTpl:{}, views : { @@ -425,7 +464,7 @@ firstStepCostum = { var paramsTemplateList = { urlData: baseUrl + "/co2/search/globalautocomplete", - container: ".modal-filter-template", + container: ".modal-blockcms-header .modal-filter-template", loadEvent : { default : "scroll" }, @@ -439,11 +478,10 @@ firstStepCostum = { notSourceKey: true, types: ["templates"], filters: { - type: ["costum"] - //shared: true + type: config.key, + shared: true }, fields : ["userCounter","shared","blocTplId","source.key"] - }, results: { dom: "#modal-template-results", @@ -473,10 +511,53 @@ firstStepCostum = { keyValue:false, multiple:true, active : true, - list: firstStepCostum.template.category[config.key] + list: firstStepCostum.template.categoryused["costum"] } } }; + if (typeof userConnected.roles.superAdmin != "undefined") { + delete paramsTemplateList.defaults.filters.shared; + paramsTemplateList.filters["shared"] = { + view: "dropdownList", + type: "filters", + action: "filters", + name: "Trier par restriction", + icon: "globe", + typeList : "object", + event : "exists", + keyValue: false, + list: { + restricted : { + label: "Unrestricted", + field : "shared", + value : true + }, + shared : { + label: "Restricted", + field : "shared", + value : false + } + } + } + } + if (typeof config.category != "undefined") { + paramsTemplateList.defaults.filters["category"] = config.category; + } + + + if ( config.key == "costum"){ + $(".tpl-info-container").css("background","linear-gradient(to right, #333333, #ffa500, #333333)"); + // var pageAndCostumCategory = costumizer.template.categoryused.costum + // for (const key in costumizer.template.categoryused.page) { + // if (costumizer.template.categoryused.page.hasOwnProperty(key) && !pageAndCostumCategory.hasOwnProperty(key)) { + // pageAndCostumCategory[key] = costumizer.template.categoryused.page[key]; + // } + // } + // costumizer.template.paramsTemplateList.filters.category.list = pageAndCostumCategory; + paramsTemplateList.filters.category.list = firstStepCostum.template.categoryused["costum"]; + // costumizer.template.paramsTemplateList.defaults.filters.type = [config.key,"page"] + paramsTemplateList.defaults.filters.type = [config.key] + } var filterGroupTemplate = searchObj.init(paramsTemplateList); filterGroupTemplate.search.init(filterGroupTemplate); @@ -719,7 +800,6 @@ firstStepCostum = { "newCostum" : true, "collection" : tplCollection, "parentId" : contextData.id, - "page" : "#", "parentSlug" : contextData.slug, "parentType" : contextData.collection }; @@ -740,4 +820,5 @@ firstStepCostum = { } } +firstStepCostum.template.getCategoryUsedByTemplate() </script> \ No newline at end of file