Commit 9cb0dce0 authored by Clément Damiens's avatar Clément Damiens
Browse files

Merge remote-tracking branch 'origin/master'

parents 8cfdcf9d 4254f573
......@@ -125,16 +125,16 @@
.handleDrag{
display: none;
position: absolute;
top: 36px;
right: 36px;
top: 20px;
right: 20px;
cursor: move;
padding: 5px;
background: rgb(44 152 222);
color: white;
border-radius: 50%;
z-index: 99999;
width: 50px;
height: 50px;
width: 45px;
height: 45px;
}
.handleDrag .fa-arrows{
position: absolute;
......@@ -186,8 +186,8 @@
display: none;
z-index: 10;
position: absolute;
top: 80px;
right: 0px;
top: 75px;
right: 20px;
}
.block-parent:hover .content-btn-action, .block-parent:focus .content-btn-action {
display: block;
......@@ -197,8 +197,8 @@
position: relative;
top: 0;
z-index: 1;
width: 40px;
height: 40px;
width: 45px;
height: 45px;
font-size: 22px;
color: #fff;
background: #2C98DE;
......@@ -206,6 +206,7 @@
border-radius: 50%;
box-shadow: 0 3px 6px rgba(0,0,0,.275);
outline: none;
display: block;
}
.material-button-toggle {
z-index: 3;
......
......@@ -188,13 +188,4 @@
}
#menu-top-btn-group .element-xs-menu {
z-index: 100;
}
#descriptionAbout .container {
display: none !important;
}
#descriptionAbout .morecontent {
display: block !important;
}
.contentInformation .morelink{
display: none !important;
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ class ExportAction extends CAction
//http://communecter56-dev/costum/co/export/slug/ctenat/install/answers.json
//http://communecter56-dev/costum/co/export/slug/ctenat/install/costum.json
//http://communecter56-dev/costum/co/export/slug/ctenat/mode/insert/insert/costum.json
public function run($slug=null,$mode=null,$save=null,$install=null,$insert=null) {
public function run($slug=null,$mode=null,$save=null,$install=null,$insert=null,$id=null,$type=null ) {
$ctrl=$this->getController();
// if ( ! Person::logguedAndValid() )
......@@ -237,16 +237,20 @@ else
} else {
$res["cms"] = $cms;
if(!$mode){
$str .= "<h3>//Consommation Cms</h3>";
if( !empty($docs) )
$res[Document::COLLECTION] = (!empty($res[Document::COLLECTION])) ? array_merge($res[Document::COLLECTION],$docs) : $docs;
}
if( !empty($docs) )
$res[Document::COLLECTION] = (!empty($res[Document::COLLECTION])) ? array_merge($res[Document::COLLECTION],$docs) : $docs;
}
}
if( !$mode && !$insert && isset($el["type"]) && isset($el['id']) && !file_exists( "../../pixelhumain/ph/upload/communecter/".$el["type"]."/".$el['id'] )){
$fi = new FilesystemIterator("../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'], FilesystemIterator::SKIP_DOTS);
$str .= "<h3>//Existing upload folder </h3>";
$str .= "contains files : ".iterator_count($fi);
}
if(!$mode && isset($res[Document::COLLECTION])){
$str .= "<h3>//collection ".Document::COLLECTION." </h3>";
......@@ -309,14 +313,26 @@ else
{
file_put_contents("../../modules/costum/data/export_".$slug."/".$col.".json", json_encode( $res[$col] ) );
$ressaved[] = "../../modules/costum/data/export_".$slug."/".$col.".json";
//$res["dox"] = $res[Document::COLLECTION];
if($col == "documents" ){
foreach ( $res[Document::COLLECTION] as $id => $d ) {
//unset($cms[$key]['_id']);
if( isset($d["type"]) && isset($d['id']) && !file_exists( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] )){
//$res[$id] = $d;
if( isset($d["type"]) && isset($d['id']) && file_exists( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] )){
//$res[$d['id']] = $d['type'];
if(!file_exists("../../modules/costum/data/export_".$slug."/upload"))
mkdir("../../modules/costum/data/export_".$slug."/upload");
copy ( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] , "../../modules/costum/data/export_".$slug."/upload" );
mkdir("../../modules/costum/data/export_".$slug."/upload" );
if(!file_exists("../../modules/costum/data/export_".$slug."/upload/".$d["type"]))
mkdir("../../modules/costum/data/export_".$slug."/upload/".$d["type"] );
if(!file_exists("../../modules/costum/data/export_".$slug."/upload/".$d["type"]."/".$d['id']))
mkdir("../../modules/costum/data/export_".$slug."/upload/".$d["type"]."/".$d['id'] );
$fi = new FilesystemIterator("../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'], FilesystemIterator::SKIP_DOTS);
$res["upload"] = "copied upload files : ".iterator_count($fi);
FileHelper::copy_folder( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] , "../../modules/costum/data/export_".$slug."/upload/".$d["type"]."/".$d['id'] );
}
}
......@@ -325,6 +341,7 @@ else
$res["saved"] = $ressaved;
$res["status"] = date("Y/m/d h:m")." saved to ../../modules/costum/data/export_".$slug."/*.json";
$str .= Rest::json($res);
......@@ -374,10 +391,15 @@ else
$fjson['_id'] = new MongoId($id);
if( PHDB::count($col,["_id" => new MongoId($id)]) )
{
$d = PHDB::findOne($col,["_id" => new MongoId($id)]);
if($backup){
$d = PHDB::findOne($col,["_id" => new MongoId($id)]);
file_put_contents("../../modules/costum/data/export_".$slug."/backup/".$col."_".$id.".json", json_encode( $d ) );
}
//echo " check folder ../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id']." <br/>";
if( file_exists( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] ) ) {
FileHelper::rrmdir( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] );
echo "<b>deleted folder ../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id']." <br/>";
}
echo "<h1 style='color:red'>".$col." exists removed</h1><br>";
PHDB::remove($col,["_id" => new MongoId($id)] );
//temporary save copy before remove
......@@ -393,10 +415,15 @@ else
{
if( PHDB::count($col,["_id" => new MongoId($id)]) )
{
$dexist = PHDB::find($col,["_id" => new MongoId($id)]);
if($backup){
$dexist = PHDB::find($col,["_id" => new MongoId($id)]);
file_put_contents("../../modules/costum/data/export_".$slug."/backup/".$col."_".$id.".json", json_encode( $dexist ) );
}
//echo " check folder ../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id']." <br/>";
if( file_exists("../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] ) ){
FileHelper::rrmdir( "../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id'] );
echo " deleted folder ../../pixelhumain/ph/upload/communecter/".$d["type"]."/".$d['id']." <br/>";
}
echo "<b>".$col." exists removed</b><br>";
PHDB::remove($col,["_id" => new MongoId($id)] );
}
......@@ -414,6 +441,12 @@ else
}
}
if($col == "documents" && file_exists("../../modules/costum/data/export_".$slug."/upload")){
echo " copied upload folder <br/>";
FileHelper::copy_folder("../../modules/costum/data/export_".$slug."/upload", "../../pixelhumain/ph/upload/communecter/" );
}
echo "<h1 style='color:red'>ELEMENT <b style='color:purple; font-size:40px;'>".$insert."</b><br/><a href='/costum/co/export/slug/".$slug."/install/1' class='btn btn-primary'>Back to INSTALL Check</a>";
} else
echo "<h1 style='color:red'>JSON FILE doesn't exist!!</h1><br>";
......@@ -478,7 +511,7 @@ else
$p = PHDB::findOne($col,["_id"=>$ids[0]],["parent"]);
if(isset($fjson[$firstId]["parent"])){
echo "parent id : ".array_keys($fjson[$firstId]["parent"])[0]."<br>";
echo "<span style='color:red'>must be the same as slug element or make a manuel replace if export files </span><br>";
echo "<span style='color:red'>must be the same as slug element or make a manuel replace in export files </span><br>";
}
}
} else {
......
......@@ -16,7 +16,6 @@
.title2{font-size : 24px; font-weight : bold;}
.equalHeight{display : flex; flex-wrap : wrap;}
<?php }?>
</style>
<style>
......@@ -264,16 +263,10 @@ if($activegraph == null){
<?php } ?>
</a>
</span>
<span style=" word-wrap: break-word; ">
<h5 style="margin-bottom: 1px;">
<a class="lbh" href="#graph.ter.<?php echo $i ?>" style="color: #4e958b; font-family: 'Grotesque Black', sans-serif;"> <i> Observatoire du territoire </i> </a>
</h5>
<a class="lbh" href="#!graph.ter.<?php echo $i ?>" style="color: #4e958b; font-family: 'Grotesque Black', sans-serif;"> <i> Observatoire du territoire </i> </a>
</h5>
</span>
<?php
......@@ -1967,7 +1960,8 @@ $("a[data-target='#modalRegister']").on("click",function(e) {
$("#newsstream").empty();
// News
urlNews = "/co2/app/live";
let urlNews = "co2/app/live";
urlNews = "/news/co/index/type/"+costum.contextType+"/id/"+costum.contextId+"/isLive/false/formCreate/false/nbCol/2";
// Get News
ajaxPost("#newsstream",baseUrl+"/"+urlNews,{indexMin:2, indexMax:6}, function(news){}, "html");
ajaxPost("#newsstream",baseUrl+"/"+urlNews,{}, function(news){}, function(error){}, "html");
</script>
\ No newline at end of file
......@@ -206,12 +206,9 @@ foreach ($blocks as $key => $value) {
<?php
for($i = 0; $i < count($gr[15]); $i++){
if(isset($gr[15][$i])){
if($gr[15][$i]!=""){
$ters.=$gr[15][$i].", ";
}
if($gr[15][$i]!=""){
$ters = $ters."".$gr[15][$i].", ";
}
?>
<option value="<?php echo $i ?>"><?php if(isset($gr[15][$i])){
if($gr[15][$i] == ""){ echo "non défini"; }else{ echo $gr[15][$i] ; }
......@@ -713,6 +710,7 @@ jQuery(document).ready(function() {
<script type="text/javascript">
setTitle("SOMMOM : Territoires "+"<?php echo $ters; ?>");
$('#selectall').click(function() {
$("#allterri > option").prop("selected","selected");
$("#allterri").trigger("change");
......
<?php
$keyTpl ="eventEnPod";
$kunik = $keyTpl.(string)$blockCms["_id"];
$blockKey = $blockCms["_id"];
$paramsData = [
];
......
......@@ -200,12 +200,12 @@
"icon" : "fa-cog",
"properties" : {
"titre" : {
"label" : "titre du 1ère slide",
"label" : "titre ",
values : sectionDyf.<?php echo $kunik ?>ParamsData.titre
},
"description" : {
"inputType" : "textarea",
"label" : "Contenu du 1ère slide",
"label" : "description",
"markdown" : true,
values : sectionDyf.<?php echo $kunik ?>ParamsData.description
},
......
......@@ -36,6 +36,17 @@ $initImage2 = Document::getListDocumentsWhere(
"subKey"=>'logo2',
), "image"
);
$image1= [];
foreach ($initImage1 as $k => $v) {
$image1[] =$v['imageThumbPath'];
}
$image2= [];
foreach ($initImage2 as $k => $v) {
$image2[] =$v['imageThumbPath'];
}
?>
<style type="text/css">
......@@ -173,11 +184,7 @@ $initImage2 = Document::getListDocumentsWhere(
<div class="row">
<div class="col-md-6 col-sm-6 fh5co-service fadeInUp animated">
<i class="col-md-3 icon fadeInUp animated-2 icon-anchor">
<?php if (!empty(Document::getLastImageByKey($blockKey, "cms", "profil","logo1"))){ ?>
<img src="<?php echo Document::getLastImageByKey($blockKey, "cms", "profil","logo1"); ?>">
<?php }else { ?>
<img src="<?php echo Yii::app()->getModule('costum')->assetsUrl ?>/images/blockCmsImg/VIDEO-02.svg">
<?php } ?>
<img src="<?= isset($image1[0]) ? $image1[0] : Yii::app()->getModule('costum')->assetsUrl.'/images/blockCmsImg/VIDEO-02.svg'?>">
</i>
<div class="col-md-9">
<h3><?= $paramsData["sousTitle1"]?></h3>
......@@ -187,11 +194,7 @@ $initImage2 = Document::getListDocumentsWhere(
</div>
<div class="col-md-6 col-sm-6 fh5co-service fadeInUp animated">
<i class="col-md-3 icon fadeInUp animated-2 icon-layers2">
<?php if (!empty(Document::getLastImageByKey($blockKey, "cms", "profil","logo2"))){ ?>
<img src="<?php echo Document::getLastImageByKey($blockKey, "cms", "profil","logo2"); ?>">
<?php }else { ?>
<img src="<?php echo Yii::app()->getModule('costum')->assetsUrl ?>/images/blockCmsImg/AUTRE-02.svg">
<?php } ?>
<img src="<?= isset($image2[0]) ? $image2[0] : Yii::app()->getModule('costum')->assetsUrl.'/images/blockCmsImg/AUTRE-02.svg'?>">
</i>
<div class="col-md-9">
......
......@@ -7,12 +7,9 @@ $paramsData = [
"sizeContent" => "20",
"lienButton" => "",
"labelButton" => "Boutton",
"colorTitle" => "#000",
"colorContent" => "#000",
"colorlabelButton" => "",
"colorbutton" => "",
"colorBorderButton" => "",
"colorButton" => "",
"colorlabelButton" => "#000000",
"colorBorderButton" => "#000000",
"colorButton" => "#ffffff",
"class" => "lbh",
"link" => ""
];
......@@ -26,17 +23,11 @@ if (isset($blockCms)) {
?>
<style type="text/css">
.textBack_<?=$kunik?> h2{
font-size: <?=$paramsData["sizeTitle"]?>px;
color: <?=$paramsData["colorTitle"]?>;
margin-bottom: 10px;
margin-top: 10px;
}
.textBack_<?=$kunik?> p{
font-size: <?=$paramsData["sizeContent"]?>px;
color: <?=$paramsData["colorContent"]?>;
}
.button_<?=$kunik?> {
background-color: <?=$paramsData["colorbutton"]?>;
background-color: <?=$paramsData["colorButton"]?>;
border:1px solid <?=$paramsData["colorBorderButton"]?>;
color: <?=$paramsData["colorlabelButton"]?>;
margin-bottom: 4%;
......@@ -147,10 +138,10 @@ if (isset($blockCms)) {
inputType : "colorpicker",
values : sectionDyf.<?php echo $kunik ?>ParamsData.colorlabelButton
},
"colorbutton":{
"colorButton":{
label : "Couleur du boutton",
inputType : "colorpicker",
values : sectionDyf.<?php echo $kunik ?>ParamsData.colorContent
values : sectionDyf.<?php echo $kunik ?>ParamsData.colorButton
},
"colorBorderButton":{
label : "Couleur du bordure de boutton",
......
......@@ -3,36 +3,40 @@
<?php if($canEdit && Authorisation::isInterfaceAdmin() ){ ?>
<div class="text-center content-btn-action btn-edit-delete-<?= @$kunik?>">
<ul class="list-inline" id="options">
<li class="option option-<?= @$kunik?>">
<button class="material-button option1 bg-red deleteLine tooltips" data-path="<?= @$path ?>" data-id="<?= @$id; ?>" data-collection="cms" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Supprimer block">
<i class="fa fa-trash" aria-hidden="true"></i>
<!-- <ul class="list-inline" id="options">
<li class="option option-<?= @$kunik?>"> -->
<button class="material-button option3 editSectionBtns tooltips edit<?php echo @$kunik?>Params" data-path="<?= @$path ?>" data-id="<?= @$id; ?>" data-collection="cms" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Modifier block">
<i class="fa fa-edit" aria-hidden="true"></i>
</button>
</li>
<!-- </li>
<li class="option">
<button class="material-button option2 hide" type="button">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</button>
</li>
<li class="option option-<?= @$kunik?>">
<button class="material-button option3 editSectionBtns tooltips edit<?php echo @$kunik?>Params" data-path="<?= @$path ?>" data-id="<?= @$id; ?>" data-collection="cms" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Modifier block">
<i class="fa fa-edit" aria-hidden="true"></i>
<li class="option option-<?= @$kunik?>"> -->
<button class="material-button option1 bg-red deleteLine tooltips margin-top-10" data-path="<?= @$path ?>" data-id="<?= @$id; ?>" data-collection="cms" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Supprimer block">
<i class="fa fa-trash" aria-hidden="true"></i>
</button>
</li>
<!-- </li>
</ul>
<button class="material-button material-button-toggle material-button-toggle-<?= @$kunik?>" type="button">
<i class="fa fa-pencil" aria-hidden="true"></i>
</button>
</button> -->
</div>
<script type="text/javascript">
$(document).ready(function () {
$('.material-button-toggle-<?= @$kunik?>').on("click", function () {
$(this).toggleClass('open');
$('.option-<?= @$kunik?>').toggleClass('scale-on');
});
});
// $(document).ready(function () {
// $('.material-button-toggle-<?= @$kunik?>').on("click", function () {
// $(this).toggleClass('open');
// $('.option-<?= @$kunik?>').toggleClass('scale-on');
// });
// });
</script>
<?php }?>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment