Commit c703c8db authored by Sylvany Mirana's avatar Sylvany Mirana
Browse files

Merge remote-tracking branch 'origin/master'

parents 70b0a66f 9777b25f
......@@ -128,32 +128,6 @@
},
"app" : {},
"htmlConstruct" : {
"header" : {
"menuTop" : {
"left" : {
"buttonList" : {
"logo" : {
"height" : "50"
},
"xsMenu" : {
"buttonList" : {
"app" : {
"label" : true,
"buttonList" : {}
}
}
},
"app" : {
"label" : true,
"icon" : true,
"class" : "line-height-3 padding-left-10",
"labelClass" : "padding-left-5",
"buttonList" : {}
}
}
}
}
},
"element" : {
"tplCss" : [
"v1.0_pageProfil.css"
......@@ -166,9 +140,7 @@
"class" : "col-xs-12",
"left" : {
"class" : "col-lg-3 col-md-3 col-sm-4 hidden-xs no-padding",
"buttonList" : {
"imgUploader" : true
}
"buttonList" : {}
},
"right" : {
"class" : "col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center",
......
......@@ -11,7 +11,7 @@ class CostumGenerique{
);
$limit = @$post["limit"] ? $post["limit"] : null;
$allProjet = PHDB::findAndLimitAndIndex("projects",array("source.key" => $post["source"]), $limit);
$allProjet = PHDB::findAndLimitAndIndex("projects",array("source.keys" => $post["source"]), $limit);
if($allProjet){
$params = array(
......
......@@ -561,11 +561,15 @@ span{
$typeObj = array();
if(isset($this->costum["typeObj"])){
$typeObj = $this->costum["typeObj"];
$typeActeurs = $typeObj["organization"]["dynFormCostum"]["beforeBuild"]["properties"]["category"]["options"];
}else{
$typeObj = PHDB::findOne("organizations", array("slug"=>$this->costum["slug"]));
$typeActeurs = $typeObj["costum"]["typeObj"]["organization"]["dynFormCostum"]["beforeBuild"]["properties"]["category"]["options"];
}
$typeActeurs = $typeObj["costum"]["typeObj"]["organization"]["dynFormCostum"]["beforeBuild"]["properties"]["category"]["options"];
?>
<script>
......
This diff is collapsed.
......@@ -45,6 +45,7 @@ jQuery(document).ready(function() {
$("#detailDoc").click(function(e) {
//$('#container-docs').removeClass('col-xs-12').addClass('col-xs-9')
$('.section-desc').addClass('ml-310');
$('.blockcms-section').addClass('ml-310');
$('#container-docs').removeClass('col-xs-12').addClass('ml-310');
$('#header-doc').addClass('pl-310');
......
......@@ -46,6 +46,18 @@ $params = [
margin-top: -10px;
position: absolute;
}
.logoLoginRegister{
background-color: #44546b !important;
color: #ffffff;
border-radius: 10px;
padding: 20px;
}
@media (max-width: 767px){
.name img {
max-height: 70px;
}
}
</style>
<?php if($canEdit && Authorisation::isInterfaceAdmin() ){ ?>
<div class="text-center content-btn-action btn-edit-delete">
......
......@@ -46,6 +46,7 @@
}
</script>
<style>
a:hover, a:focus{
text-decoration: none;
outline: none;
......@@ -309,12 +310,24 @@
margin: 0px;
}
.contactSide{
background: #44546b;
padding: 20px;
}
.logoLoginRegister{
background-color: #44546b !important;
color: #ffffff;
border-radius: 10px;
padding: 20px;
}
@media (max-width: 767px){
.name img {
max-height: 70px;
}
}
</style>
......@@ -947,6 +960,7 @@
clearInterval(lilaEmailTimeOut);
$("#respondentMail").html(`<p><b>Email: </b>` +$('.ans_val_by_i').html()+`</p>`);
<?=$keyuni?>respondentEmail = $('.ans_val_by_i').html();
$(".questionList").removeClass("questionList");
}
}, 30);
......
......@@ -118,8 +118,13 @@ if($activegraph == null){
<div class="MultiCarousel-inner owl-carousel">
<?php
$ters = "";
for($i = 0; $i < count($territoire[0]); $i++)
{
$ters = $ters."".$territoire[0][$i].", ";
?>
<div class="item" id ="terrid<?php echo $territoire[8][$i];?>">
......@@ -1469,8 +1474,8 @@ jQuery(document).ready(function() {
$(a.target).prev('.panel-heading').removeClass('active');
});
setTitle("<?php echo strip_tags($title) ?>");
setTitle("<?php echo strip_tags($title).' '.$ters ?>");
mylog.log("render graph","/modules/costum/views/custom/ctenat/dashboard.php");
<?php foreach ($blocks as $id => $d) {
......
......@@ -53,7 +53,9 @@
$typeObj = PHDB::findOne("organizations", array("slug"=>$this->costum["slug"]));
$this->costum["typeObj"] = $typeObj["costum"]["typeObj"];
if(isset($typeObj["costum"]["typeObj"])){
$this->costum["typeObj"] = $typeObj["costum"]["typeObj"];
}
if(isset($typeObj["costum"]["typeObj"]["organization"]["dynFormCostum"]["beforeBuild"]["properties"]["category"]["options"])){
$typeActeurs = $typeObj["costum"]["typeObj"]["organization"]["dynFormCostum"]["beforeBuild"]["properties"]["category"]["options"];
......
<?php
$keyTpl ="actualiteTimeLine";
$paramsData = [
"underline"=>true,
"title" =>"Actualité",
"titleIcon" => "fa-newspaper-o",
"underline" => true
];
if (isset($blockCms)) {
......@@ -20,14 +22,21 @@
}
?>
<style type="text/css">
.actu-<?= $kunik?>{
text-align: center;
}
</style>
<!-- Actualité -->
<div class="actu-<?= $kunik?> row content-<?= $kunik?>">
<div class="col-xs-12 col-sm-12">
<div class="actu-titre col-xs-6 col-sm-6">
<h1 class="title actu-<?= $kunik?>">
<i class="fa fa-newspaper-o"></i>
Actualités
<i class="fa <?php echo $paramsData["titleIcon"]; ?>"></i>
<?php echo $paramsData["title"]; ?>
</h1>
</div>
<br>
......
......@@ -102,6 +102,20 @@ if (isset($blockCms)) {
left: 50%;
transform: translate(-50%,0%);
}
.logoLoginRegister{
background-color: #44546b !important;
color: #ffffff;
border-radius: 10px;
padding: 20px;
}
@media (max-width: 767px){
.name img {
max-height: 70px;
}
}
</style>
<div class="row container<?php echo $kunik ?> " style='background-color: <?= $paramsData['bg_color'] ?>'>
......
......@@ -225,7 +225,7 @@ if (isset($blockCms)) {
{
name: defaultName,
tags: defaultTags,
locality: defaultLocation
formLocality: dyFInputs.formLocality(defaultLocation)
},
null,
{
......
......@@ -203,7 +203,7 @@
} ?>
<div class="album-audio-menu" data-id="<?= $ksw ?>">
<h6 class="title-6"><?= @$vsw["album"] ?></h6>
<img src="<?= !empty($albumImgSwitch) ? $albumImgSwitch : $assetsUrl."/images/blockCmsImg/defaultImg/Optimized-CD-117mm.png" ?>" alt="">
<img src="<?= !empty($albumImgSwitch) ? $albumImgSwitch : $assetsUrl."/images/blockCmsImg/defaultImg/Optimized-CD-117mm.png" ?>" loading="lazy" alt="">
<?php if(Authorisation::isInterfaceAdmin()){ ?>
<div class="btn-group hiddenPreview" style="width:100%">
<a href="javascript:;" class="btn btn-sm btn-primary edit-album-<?= $kunik ?>" data-content='<?= json_encode(@$vsw); ?>' data-id="<?= $ksw ?>" style="width:50%">
......@@ -228,7 +228,7 @@
<div class="ablum-audio-container ablum-container-<?= $kunik ?> audio-<?= $kpl ?>" style="<?= ($pi != 0) ? "display:none" : ""; ?>">
<div class="img-container-<?= $kunik ?> bg-grey text-center" style="flex:50%">
<!-- <img src="<?= $assetsUrl ?>/images/blockCmsImg/defaultImg/Optimized-CD-117mm.png" alt=""> -->
<img src="<?= !empty($albumImgJacket) ? $albumImgJacket : $assetsUrl."/images/blockCmsImg/defaultImg/Optimized-CD-117mm.png" ?>" alt="">
<img src="<?= !empty($albumImgJacket) ? $albumImgJacket : $assetsUrl."/images/blockCmsImg/defaultImg/Optimized-CD-117mm.png" ?>" loading="lazy" alt="">
</div>
<div class="table-container-<?= $kunik ?>" style="flex:50%">
<?php foreach ($vpl["urls"] as $kurl => $vurl) { ?>
......
......@@ -5,12 +5,14 @@
$keyTpl = "blockcarousel";
$paramsData = [
"title" => "Block projects carousel",
"title" => "Block caroussel d'éléments",
"description" => "",
"elementType" => "projects",
"background" => "#FFFFFF",
"icon" => " ",
"color" => "",
"limit" => 3,
"textCardColor" => ""
"iconActionColor" => "#ABB76B"
];
if (isset($blockCms)) {
......@@ -27,18 +29,35 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
?>
<style type="text/css">
.active{
width: 100%;
margin: auto !important;
}
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
li.indicator_<?=$kunik?>{
background-color: #dddddd !important;
width: 15px !important;
height: 15px !important;
margin-right: .3em !important;
margin-left: .3em !important;
}
li.active{
background-color: #555555 !important;
}
.projet_<?= $kunik ?> .color-h2{
margin-top: 5%;
}
.projet_<?= $kunik ?> .a-caroussel{
color: #abb76b;
color: <?= $paramsData["iconActionColor"] ?>;;
text-decoration : none;
}
.projet_<?= $kunik ?> .modal-footer{
......@@ -51,12 +70,7 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
.projet_<?= $kunik ?> .carousel-indicators li{
border: 1px solid #8fcd52;
}
.projet_<?= $kunik ?> .carousel-indicators .active{
background-color: #8fcd52;
}
.projet_<?= $kunik ?> h1{
color:<?= $paramsData["color"] ?>;
}
.projet_<?= $kunik ?> .arrow{
margin-top: 2%;
font-size: 3rem;
......@@ -76,14 +90,12 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
transform: translate(-50%,-50%);
}
@media (max-width:768px){
.projet_<?= $kunik ?> .card-info{
min-height: 350px;
}
.projet_<?= $kunik ?> .color-h2{
margin-top: 5%;
}
.projet_<?= $kunik ?> .a-caroussel{
color: #abb76b;
color:<?= $paramsData["iconActionColor"] ?>;;
text-decoration : none;
}
.projet_<?= $kunik ?> .modal-footer{
......@@ -99,48 +111,43 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
.projet_<?= $kunik ?> .carousel-indicators .active{
background-color: #8fcd52;
}
.projet_<?= $kunik ?> .card-info{
background: white;
overflow-y: auto;
width: 100%;
margin-left: 0%;
}
}
</style>
<div class="projet_<?= $kunik ?>">
<h1 class="title-asso text-center title" style="padding: 20px;">
<section class="projet_<?= $kunik ?> text-center">
<h1 class="text-center title">
<i class="fa <?= $paramsData["icon"] ?>"></i>
<?= $paramsData["title"]; ?>
<span><?= $paramsData["title"]; ?></span>
</h1>
<div class="text-center btn-edit-delete ">
<?php
if(Authorisation::isInterfaceAdmin()){ ?>
<button class="btn btn-primary btn-xs" onclick="dyFObj.openForm('project')">
Ajouter un projet
</button>
<?php if(Authorisation::isInterfaceAdmin()){ ?>
<button class="btn btn-primary btn-xs" onclick="dyFObj.openForm('project')">
Ajouter un projet
</button>
<?php } ?>
</div>
<div id="projectsCarousel" class="carousel slide text-center" data-ride="carousel">
<br>
<div class="text-center arrow hidden" style="">
<a class="left a-caroussel" href="#projectsCarousel" data-slide="prev">
<p class="markdown description">
<?= "\n".$paramsData["description"]; ?>
</p>
<div id="elementsCarousel<?= $kunik ?>" class="carousel slide text-center" data-ride="carousel" data-type="multi">
<div id="slider<?= $kunik ?>" class="text-center arrow hidden" style="">
<a class="left a-caroussel" href="#elementsCarousel<?= $kunik ?>" data-slide="prev">
<i class="fa fa-arrow-left" aria-hidden="true"></i>
</a>
<a class="right a-caroussel" href="#projectsCarousel" data-slide="next">
<a class="right a-caroussel" href="#elementsCarousel<?= $kunik ?>" data-slide="next">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
</div>
<br>
<div id="content-results-project" class="carousel-inner"></div>
<div id="content-results-project<?= $kunik ?>" class="carousel-inner"></div>
<div class="col-md-12" style="margin-top: 1%;">
<ol class="carousel-indicators" id="indactors-projectsCarousel"></ol>
<ol class="carousel-indicators" id="indactors-elementsCarousel<?= $kunik ?>"></ol>
</div>
</div>
</div>
</section>
<script type="text/javascript">
contextData = {
......@@ -151,7 +158,8 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
profilThumbImageUrl : "<?php echo $el['profilThumbImageUrl'] ?>"
};
let nbItem = <?= $paramsData["limit"] ?>;
let nbItem<?= $kunik ?> = <?= $paramsData["limit"] ?>;
let elementType<?= $kunik ?> = "<?= $paramsData["elementType"] ?>";
tplCtx = {};
......@@ -166,10 +174,25 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
"description" : "Personnaliser votre section sur des projets sous forme carousel",
"icon" : "fa-cog",
"properties" : {
elementType : {
label : "Element",
inputType : "select",
options : {
"projects":"Liste projets de la communauté",
"citoyens":"Les personnes de la communauté"
},
values : sectionDyf.<?php echo $kunik ?>ParamsData.elementType
},
title : {
label : "Titre",
values : sectionDyf.<?php echo $kunik ?>ParamsData.title
},
description : {
inputType: "textarea",
label : "Sous titre ou Description",
markdown: true,
values : sectionDyf.<?php echo $kunik ?>ParamsData.description
},
icon : {
label : "Icone",
inputType : "select",
......@@ -180,6 +203,11 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
label : "Nombre de project afficher",
values : sectionDyf.<?php echo $kunik ?>ParamsData.limit
},
iconActionColor : {
label : "Couleur des icones sur le caroussel",
inputType : "colorpicker",
values : sectionDyf.<?php echo $kunik ?>ParamsData.iconActionColor
},
parent : {
inputType : "finder",
label : tradDynForm.whoiscarrytheproject,
......@@ -224,14 +252,21 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
dyFObj.openForm( sectionDyf.<?php echo $kunik ?>Params,null, sectionDyf.<?php echo $kunik ?>ParamsData);
});
// Affichage
var params = {
source : costum.contextSlug
var params<?= $kunik ?> = {
source : costum.contextSlug,
type : contextData.type,
id : contextData.id
};
// getcommunity, getprojects
let request<?= $kunik ?> = "getprojects";
if(elementType<?= $kunik ?>=="citoyens"){
request<?= $kunik ?> = "getcommunity";
}
ajaxPost(
null,
baseUrl+"/costum/costumgenerique/getprojects",
params,
baseUrl+"/costum/costumgenerique/"+request<?= $kunik ?>,
params<?= $kunik ?>,
function(data){
mylog.log("success", data);
var html = "";
......@@ -243,38 +278,81 @@ if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
i = 0;
url = "<?= Yii::app()->getModule('costum')->assetsUrl; ?>/images/templateCostum/no-banner.jpg";
html += "<div class='item active'>";
li += "<li data-target='#projectsCarousel' data-slide-to='"+y+"' class='active'></li>";
li += "<li data-target='#elementsCarousel<?= $kunik ?>' data-slide-to='"+y+"' class='active indicator_<?=$kunik?>'></li>";
$(data.elt).each(function(k,v){
img = (typeof v.profilMediumImageUrl != "undefined" || v.profilMediumImageUrl != "null") ? v.profilMediumImageUrl : "";
let imgThumb = url;
if(typeof v.profilMediumImageUrl != "undefined" && v.profilMediumImageUrl != null && v.profilMediumImageUrl != "none"){
imgThumb = v.profilMediumImageUrl;
}
let descript = "";
if(data.elt.length <= nbItem<?= $kunik ?>){
$("#slider<?= $kunik ?>").remove();
}
if(i >= nbItem<?= $kunik ?>){
html += "</div>";
html += "<div class='item'>";
y++;
li += "<li data-target='#elementsCarousel<?= $kunik ?>' data-slide-to='"+y+"' class='indicator_<?=$kunik?>'></li>";
i = 0;
$(".arrow").removeClass("hidden");
}
if(i >= nbItem){
html += "</div>";
html += "<div class='item'>";
y++;
li += "<li data-target='#projectsCarousel' data-slide-to='"+y+"'></li>";
i = 0;
$(".arrow").removeClass("hidden");
}
i++;
i++;
html += "<div class='card-info col-md-"+(12/nbItem)+"'>";
html += "<div class='card-info col-sm-12 col-md-"+(12/nbItem<?= $kunik ?>)+"'>";
html += "<center><img src='"+img+"' class='img-responsive' style='border-radius : 50%; width: 150px; height: 150px;'>";
html += "<h2 class='color-h2 title-2 text-center truncate'>"+v.name+"</h2></center>";
html += "<p class='description'>"+v.shortDescription+"</p>";
html += "<p><a href='#@"+v.slug+"' class='lbh-preview-element a-caroussel' style='font-size: 5rem;' data-hash='#page.type.projects.id."+v.id+"'> <i class='fa fa-eye' aria-hidden='true'></i></a></p>";
html += "</div>";
});
}
else
{
html += "Pas de projet en cours";
li += "";
}
$("#content-results-project").html(html);
$("#indactors-projectsCarousel").html(li);
html += "<center><img src='"+imgThumb+"' class='img-responsive' style='border-radius : 50%; width: 150px; height: 150px; object-fit: cover;'>";
if(v.name){
name = v.name;
}else if(v[Object.keys(v)[0]]){
v = v[Object.keys(v)[0]];
v["id"] = v._id;
}
html += "<h2 class='color-h2 title-2 text-center truncate'>"+v.name+"</h2></center>";
if(v.shortDescription){
descript = v.shortDescription;
}else if(v.email){
descript = v.email
}
html += "<p class='description'>"+descript.substring(0, 90)+" ...</p>";
html += "<p><a href='#@"+v.slug+"' class='lbh-preview-element a-caroussel' style='font-size: 5rem;' data-hash='#page.type."+elementType<?= $kunik ?>+".id."+v.id+"'> <i class='fa fa-eye' aria-hidden='true'></i></a></p>";
html += "</div>";
}
);
}else{
html += "Pas de projet en cours";
li += "";
}
$("#content-results-project<?= $kunik ?>").html(html);
$("#indactors-elementsCarousel<?= $kunik ?>").html(li);
}
);
$('.carousel[data-type="multi"] .item').each(function() {
var next = $(this).next();
if (!next.length) {
next = $(this).siblings(':first');