Commit d53881f6 authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

docs for costum

parent 6708683f
dynForm = {
jsonSchema : {
title : "Add a Costum",
icon : " photo",
type : "object",
onLoads : {
onload : function(){
dyFInputs.setSub("bg-dark");
}
},
beforeBuild : function(){
//alert("before Build orga");
dyFObj.setMongoId('costum', function(){
uploadObj.gotoUrl = '/costum';
});
dyFObj.deepPropertyBuild(dyFObj.elementData.map);
},
afterSave : function(data,callB){
if( $(uploadObj.domTarget).fineUploader('getUploads').length > 0 ){
$(uploadObj.domTarget).fineUploader('uploadStoredFiles');
}
window.location.reload();
},
properties : {
slug : dyFInputs.inputText("Slug", "Must correspond to an existing element ", { required : true }),
}
}
};
\ No newline at end of file
......@@ -36,7 +36,9 @@ class DocsController extends CommunecterController {
//if(@$_GET["network"] ){
//$this->redirect(Yii::app()->createUrl("/network/default/index?src=".$_GET["network"]));
//}
$url=(!empty($dir)) ? $dir."/".$page : $page;
$url= $page;
if(!empty($dir))
$url = $dir."/".$page;
echo $this->renderPartial($url, null,true);
}
}
......
......@@ -9,6 +9,7 @@
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
http://127.0.0.1/ph/co2/default/sitemap/host/coco.fr/sourceKey/ctenat
----------------------------------------------------
* rajouter les update elemnt sur les slugs (SEO)
http://127.0.0.1/ph/co2/test/updateslugs
......
......@@ -329,8 +329,14 @@ function buildDirectoryLine( e, collection, type, icon/* tags, scopes*/ ){
if(isSuperAdmin)
actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 deleteThisBtn"><i class="fa fa-trash text-red"></i>Delete!</a> </li>';
var criteria = null;
if(isSuperAdmin && type == "<?php echo Project::COLLECTION ?>" ){
var privateLabel = ( typeof e.preferences != "undefined" && (e.preferences.private == "false" || typeof e.preferences.private == "undefined" ) ) ? '<i class="fa fa-thumbs-up text-green"> Make Public' : '<i class="fa fa-thumbs-down text-red"></i></i> Make Private';
var criteria = "<span id='private"+id+"' class='label label-danger'> privé </span>";
var privateLabel = '<i class="fa fa-thumbs-up text-green"></i> Make Public';
if( typeof e.preferences != "undefined" && (e.preferences.private == "false" || e.preferences.private == false || typeof e.preferences.private == "undefined" ) ) {
privateLabel = '<i class="fa fa-thumbs-down text-red"></i> Make Private';
criteria = "<span id='private"+id+"' class='label label-success'> public </span>";
}
actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" data-private="'+e.preferences.private+'" data-path="preferences.private" class="margin-right-5 privatePublicThisBtn"> '+privateLabel+' </a> </li>';
......@@ -420,6 +426,10 @@ function buildDirectoryLine( e, collection, type, icon/* tags, scopes*/ ){
}
strHTML += '</td>';
strHTML += '<td class="center status">';
if(criteria){
strHTML += criteria;
}
else{
console.log(status);
if(notEmpty(status)){
$.each(status,function(e,v){
......@@ -428,6 +438,7 @@ function buildDirectoryLine( e, collection, type, icon/* tags, scopes*/ ){
}else{
strHTML += "No status";
}
}
strHTML += '</td>';
/* **************************************
* ACTIONS
......@@ -750,10 +761,12 @@ function bindAdminBtnEvents(){
});
var clickedBtn = null;
var globalCtx = null;
$(".privatePublicThisBtn").off().on("click",function () {
clickedBtn = $(this);
mylog.log("privatePublicThisBtn click");
var value = ($(this).data("private")) ? "false" : "true";
mylog.log("privatePublicThisBtn click",$(this).data("private"));
//if private doesn't exist then == not private == fasle > switch to true
var value = ($(this).data("private") && $(this).data("private") != "undefined") ? null : true;
var params = {
collection : dyFInputs.get( $(this).data("type") ).col,
id : $(this).data("id"),
......@@ -761,8 +774,18 @@ function bindAdminBtnEvents(){
path : $(this).data("path"),
value : value
};
dataHelper.path2Value( params, function() { clickedBtn.parent().html("Changed to "+value); } );
globalCtx = params;
dataHelper.path2Value( params, function(params) {
clickedBtn.parent().html("Changed to "+value);
str = "public";
$("#private"+globalCtx.id).removeClass("label-success").removeClass("label-danger").addClass("label-success");
if(globalCtx.value) {
str = "privé";
$("#private"+globalCtx.id).addClass("label-danger");
}
$("#private"+globalCtx.id).html(str);;
} );
});
<?php } ?>
......
......@@ -48,13 +48,13 @@
}
#menu-left > ul > li > a.active, #menu-left > ul > li > a:hover{
text-decoration: none;
background-color:#E5344D;
background-color:#65BA91;
color: white;
font-size: 22px;
}
ul.subMenu > li > a.active, ul.subMenu > li > a:hover{
border-left: 4px solid #E5344D;
color: #E5344D;
border-left: 4px solid #65BA91;
color: #65BA91;
font-size:18px;
text-decoration: none;
}
......@@ -150,11 +150,18 @@
</style>
<div id="header-doc" class="shadow2">
<a href='javascript:;' id="show-menu-xs" class="visible-xs visible-sm pull-left" data-placement="bottom" data-title="Menu"><i class="fa fa-bars"></i></a>
<h2 class="elipsis no-margin"><i class="fa fa-book hidden-xs"></i> <?php echo Yii::t("docs", "All <span class='hidden-xs'>you need to know</span> about") ?></h2>
<img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/LOGOS/CO2/logo-head-search.png"
class="logo-menutop main pull-left" height=30>
<h2 class="elipsis no-margin"><i class="fa fa-book hidden-xs"></i> <?php echo Yii::t("docs", "All <span class='hidden-xs'>you need to know</span> about") ?> LE <span style="color:#65BA91">CONTRAT DE TRANSITION ÉCOLOGIQUE</span></h2>
<a href='javascript:;' class="lbh pull-right" id="close-docs"><span><i class="fa fa-sign-out"></i> <?php echo Yii::t("common","Back") ?></span></a>
</div>
<?php
if(@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["docTpl"]){
$this->renderPartial(Yii::app()->session["costum"]["docTpl"]);
} else { ?>
<div id="menu-left" class="col-md-3 col-sm-2 col-xs-12 shadow2">
<ul class="col-md-12 col-sm-12 col-xs-12 no-padding">
<li class="col-xs-12 no-padding">
......@@ -309,6 +316,8 @@
</li>
</ul>
</div>
<?php } ?>
<div id="container-docs" class="col-md-offset-3 col-md-9 col-sm-12 col-xs-12 no-padding text-center">
</div>
<script type="text/javascript">
......@@ -343,6 +352,9 @@ jQuery(document).ready(function() {
if(notNull($(this).data("dir")) && $(this).data("dir") != "")
hashDocs+= ".dir."+$(this).data("dir");
location.hash=hashDocs;
if(moduleId == activeModuleId)
moduleInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
else
navInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
});
$("#show-menu-xs").click(function(){
......
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