Commit 125b493c authored by thomas craipeau's avatar thomas craipeau
Browse files

fix merge conflit master > qa

parents 3ba18919 9cb0dce0
......@@ -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;
......
......@@ -119,13 +119,22 @@
.menu-xs-container a > i{
padding-right:10px;
}
.menu-xs-container a > img{
margin-left: -4px;
width: 25px;
height: 25px;
float: left;
margin-right: 7px;
}
.menu-xs-container a:hover{
border: 4px solid;
}
.menu-xs-container{
background: #22252a;
}
.iconCtenatImage{
padding: 10px;
}
#mainNav #menuTopRight .dropdown-menu-top div.dropdown-menu {
top: 50px;
}
......@@ -136,6 +145,9 @@
left: 0px !important;
margin-bottom: 10px;
}
.saveTemplate{
display: none;
}
@media (max-width: 767px){
#filters-nav {
left: 0px !important;
......
......@@ -126,4 +126,14 @@ width: min-content;
.form-control{
padding : 0px 12px !important;
}
\ No newline at end of file
}
#modalLogin, #modalRegister{
padding-left:unset !important;
}
#contentBanner img{
filter: blur(2px);
-webkit-filter: blur(2px);
}
\ No newline at end of file
......@@ -60,10 +60,70 @@ adminPanel.views.listforms = function(){
ajaxPost('#content-view-admin', baseUrl+'/'+moduleId+'/admin/directory', data, function(){},"html");
};
adminPanel.views.community = function(){
var data={
title : trad.community,
context : {
id : costum.contextId,
collection : costum.contextType
},
invite : {
contextId : costum.contextId,
contextType : costum.contextType,
},
table : {
name: {
name : "Membres"
},
tobeactivated : {
name : "Validation de compte",
class : "col-xs-2 text-center"
},
isInviting : {
name : "Validation pour être membres",
class : "col-xs-2 text-center"
},
roles : {
name : "Roles",
class : "col-xs-1 text-center"
},
admin : {
name : "Admin",
class : "col-xs-1 text-center"
}
},
paramsFilter : {
container : "#filterContainer",
defaults : {
types : [ "citoyens", "organizations"],
fields : [ "name", "email", "links", "collection" ],
notSourceKey : true
},
filters : {
text : true
}
},
actions : {
admin : true,
roles : true,
disconnect : true
}
};
data.paramsFilter.defaults.filters = {};
data.paramsFilter.defaults.filters["links.members."+costum.contextId] = {
'$exists' : 1
};
ajaxPost('#content-view-admin', baseUrl+'/'+moduleId+'/admin/community/id/'+costum.contextId+'/type/'+costum.contextType, data, function(){},"html");
};
adminPanel.views.candidatures = function(){
//alert("candidatures");
var data={
title : "Gestion des dossier",
title : "Gestion des dossiers",
// id : costum.contextId,
// collection : costum.contextType,
// slug : costum.contextSlug,
......
......@@ -9,12 +9,3 @@ costum.setTopPosition= function(left, height){
}
}
costum.deal={
init : function(){
// $(".logoLoginRegister").attr("src", assetPath+"/images/deal/logo_ameliore_out_kaze_bleu.png");
// $(".loadingPageImg").attr("src", assetPath+"/images/deal/logo_ameliore_out_kaze_bleu.png");
$("#menuLeft .menu-btn-top .image-menu").attr("src", assetPath+"/images/deal/logo_ameliore_out_kaze_blanc.png");
}
};
\ No newline at end of file
......@@ -107,7 +107,6 @@ costum.franceTierslieux={
$(".logoLoginRegister").attr("src", assetPath+"/images/franceTierslieux/logo-02.png");
$(".loadingPageImg").attr("src", assetPath+"/images/franceTierslieux/logo-02.png");
var html = '<div id="popup-Tlieux" class="modal fade in animated bounceInDown" role="dialog">'+
'<div class="modal-dialog">'+
'<div class="modal-content row">'+
......
......@@ -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( !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 {
......
......@@ -13,7 +13,7 @@ class DashboardAction extends CAction
//var_dump($answers);
$answers = PHDB::find( Answer::COLLECTION, [ "source.keys" => array('$in' => array($controller->costum["contextSlug"]) ) ] );
$blocks = [];
$title = "Observatoire <br/>de l'amélioration de l'habitat Réunion";
$title = "Observatoire <br/>de l'amélioration de l'habitat à la Réunion";
if(isset($answer)){
$answer = PHDB::findOne( Answer::COLLECTION,[ "_id" => new MongoId( $answer ) ] );
$title = (isset($answer["answers"]["opalProcess1"]["titre"])) ? "Observatoire<br/>".$answer["answers"]["opalProcess1"]["titre"] : "Observatoire <br/>de l'amélioration de l'habitat Réunionxx";
......
......@@ -62,7 +62,8 @@ class DashboardAction extends CAction
}
$blocks = [];
$title = "Observatoire <br/>des observatoires de cétacés";
$el = PHDB::findOne( Project::COLLECTION, [ "_id" => new MongoId($controller->costum["contextId"]) ], ["name"]);
$title = $el["name"] ;
$lists = [];
// *********** List ************
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -129,11 +129,12 @@
"color" : {
"purple" : "#22252A"
}
},
},
"htmlConstruct" : {
"appRendering" : "vertical",
"preview": {
"preview": {
"element" : "costum.views.custom.ctenat.element.preview"
},
"element" : {
"urlTpl" : {
......@@ -463,7 +464,8 @@
"#territoires":true,
"#projects":true,
"#agenda":true,
"#dashboard":true,
"#infos-events":true,
"#dashboard":true,
"#live":true,
"#forum":true,
"#press" : true,
......@@ -508,6 +510,7 @@
"#territoires":true,
"#projects":true,
"#agenda":true,
"#infos-events":true,
"#dashboard":true,
"#live":true,
"#forum":true,
......@@ -698,6 +701,16 @@
"filters" : {
"costumContext":true
}
},
"#infos-events" :{
"hash" : "#app.view",
"img" : "/images/ctenat/icon-menu-info-event.png",
"urlExtra" : "/page/infos-events/url/costum.views.tpls.staticPage",
"inMenu" : true,
"class":"iconCtenatImage",
"dropdownResult":true,
"subdomainName" : "Nos derniers évènementiels et documents",
"useMapBtn":false
},
"#dashboard" :{
"hash" : "#ctenat.dashboard",
......
......@@ -15,6 +15,9 @@
"deal_index.js"
]
},
"mailsConfig":{
"logo" : "/images/deal/logo_ameliore_out_kaze_bleu.png"
},
"dynForm" : {
"jsonSchema" : {
"title" : "Template config",
......@@ -38,7 +41,6 @@
},
"metaImg" : "this.profilBannerUrl",
"logo" : "/images/deal/logo_ameliore_out_kaze_blanc.png",
"logoLoad" : "/images/deal/logo_ameliore_out_kaze_bleu.png",
"logoMin" : "/images/deal/logo.png",
"colors" : {
"pink" : "#79B51C",
......@@ -159,6 +161,9 @@
}
},
"htmlConstruct" : {
"loadingModal" : {
"logo" : "/images/deal/logo_ameliore_out_kaze_bleu.png"
},
"appRendering" : "vertical",
"header" : {
"menuTop" : {
......@@ -229,6 +234,48 @@
"login" : true
}
},
"element" : {
"initView" : "detail",
"banner" : {
"headerInfos": "costum.views.custom.deal.headerInfos"
},
"menuLeft" : {
"buttonList":{
"answerInvitation":true,
"invite":true
}
},
"menuTop" : {
"class":"col-xs-12",
"left" : {
"class":"col-lg-3 col-md-3 col-sm-4 hidden-xs no-padding",
"buttonList" : {
"imgUploader":true,
"imgProfil":true
}
},
"right":{
"class":"col-lg-9 col-lg-offset-3 col-md-9 col-md-offset-3 col-sm-9 col-sm-offset-3 hidden-xs no-padding",
"buttonList" : {
"xsMenu" : {
"label":"Menu",
"buttonList" : {
"detail" : true,
"community" : true,
"gallery" : false,
"events" : false,
"classifieds" : false,
"newspaper" : false,
"chat":false,
"create":false
}
},
"detail" : true,
"community" : true
}
}
}
},
"adminPanel" : {
"js":true,
"add" : false,
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
<h3>2021/04/12 07:04 saved to ../../modules/costum/data/export_amelioreOutKaz/amelioreOutKaz.html</h3><br/>
\ No newline at end of file
This diff is collapsed.
null
\ No newline at end of file
{"6036447f690864f2748b45d5":{"_id":{"$id":"6036447f690864f2748b45d5"},"size":26544}}
\ No newline at end of file
This diff is collapsed.
{"_id":{"$id":"60364415690864ed6c8b45e4"},"name":"Am\u00e9liore Out Kaz","type":"GovernmentOrganization","role":"admin","url":"http:\/\/communecter.org\/costum\/co\/index\/slug\/amelioreOutKaz","preferences":{"isOpenData":"true","isOpenEdition":"true"},"collection":"organizations","address":{"@type":"PostalAddress","codeInsee":"undefined","streetAddress":"","postalCode":"97400","addressLocality":"SAINT-DENIS","level1":"58be4af494ef47df1d0ddbcc","level1Name":"La R\u00e9union","addressCountry":"RE","localityId":"54c0965cf6b95c141800a516","level3":"58be4af494ef47df1d0ddbcc","level3Name":"La R\u00e9union","level4":"58be4af494ef47df1d0ddbcc","level4Name":"La R\u00e9union"},"geo":{"@type":"GeoCoordinates","latitude":"-20.932970819248858","longitude":"55.44686716695345"},"geoPosition":{"type":"Point","coordinates":[55.446867166953,-20.932970819249]},"modified":{"sec":1618133360,"usec":0},"updated":1618133360,"creator":"55b6186ee41d75d46322d3b1","created":1614169215,"slug":"amelioreOutKaz","costum":{"slug":"deal","cms":{"textIntro":"La porte la mieux ferm\u00e9e est celle qu\u2019on peut laisser ouverte. ","sec1Title":"Am\u00e9lioration \u00e0 l'habitat","sec2Title":"Financeur \/ Op\u00e9rateurs","color1":"#99999D"}},"profilImageUrl":"\/upload\/communecter\/organizations\/60364415690864ed6c8b45e4\/logoamelioreoutkazebleu.png","profilMediumImageUrl":"\/upload\/communecter\/organizations\/60364415690864ed6c8b45e4\/medium\/logoamelioreoutkazebleu.png","profilThumbImageUrl":"\/upload\/communecter\/organizations\/60364415690864ed6c8b45e4\/thumb\/profil-resized.png?t=1614169216","profilMarkerImageUrl":"\/upload\/communecter\/organizations\/60364415690864ed6c8b45e4\/thumb\/profil-marker.png"}
\ No newline at end of file
{"_id":{"$id":"6036447f690864f2748b45d2"},"id":"60364415690864ed6c8b45e4","type":"organizations","name":"amelioreOutKaz","elemUpdated":1614169215}
\ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
{"60506b77c74d9d73978b4567":{"_id":{"$id":"60506b77c74d9d73978b4567"},"collection":"answers","user":"5534fd9da1aa14201b0041cb","context":{"577e472440bb4ed36d101310":{"type":"organizations","name":"Cord collab"}},"form":"601ad5477ee77a76c327dcbb","formId":"opalProcess1|opalProcess2|opalProcess3|opalProcess4"}}
\ No newline at end of file