Commit e678b83b authored by thomas craipeau's avatar thomas craipeau

update view

parent 0fb0c25a
......@@ -4,17 +4,17 @@
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl);
$adminConstruct=Yii::app()->session["paramsConfig"]["adminPanel"];
if(isset(Yii::app()->session["costum"])){
$adminConstruct=$this->appConfig["adminPanel"];
if(isset($this->costum)){
$cssJsCostum=array();
if(isset($adminConstruct["js"]))
array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/admin.js');
array_push($cssJsCostum, '/js/'.$this->costum["slug"].'/admin.js');
if(isset($adminConstruct["css"]))
array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/admin.css');
array_push($cssJsCostum, '/css/'.$this->costum["slug"].'/admin.css');
if(!empty($cssJsCostum))
HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl());
}
$logo = (@Yii::app()->session['costum']["logo"]) ? Yii::app()->session['costum']["logo"] : Yii::app()->theme->baseUrl."/assets/img/LOGOS/CO2/logo-min.png";
$logo = (@$this->costum["logo"]) ? $this->costum["logo"] : Yii::app()->theme->baseUrl."/assets/img/LOGOS/CO2/logo-min.png";
?>
<!-- start: PAGE CONTENT -->
......
......@@ -58,7 +58,7 @@
</a>
<br><hr>
<?php if(@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["slug"]){
<?php if(@$this->costum && @$this->costum["slug"]){
$all=co2Stat::getStatsCustomAll();
$tot=0;
foreach($all as $e=>$v){
......
......@@ -16,8 +16,8 @@ HtmlHelper::registerCssAndScriptsFiles($cssJS, Yii::app()->getModule( Yii::app()
<?php
if(@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["docTpl"]){
$this->renderPartial( Yii::app()->session["costum"]["docTpl"] ,true);
if(@$this->costum && @$this->costum["docTpl"]){
$this->renderPartial( $this->costum["docTpl"] ,true);
} else { ?>
<style type="text/css">
......
......@@ -5,13 +5,13 @@
'/js/default/editInPlace.js',
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->getParentAssetsUrl());
$elementParams=@Yii::app()->session['paramsConfig']["element"];
if(isset(Yii::app()->session["costum"])){
$elementParams=@$this->appConfig["element"];
if(isset($this->costum)){
$cssJsCostum=array();
if(isset($elementParams["js"]) && $elementParams["js"] == "about.js")
array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/about.js');
array_push($cssJsCostum, '/js/'.$this->costum["slug"].'/about.js');
if(isset($elementParams["css"]) && $elementParams["js"] == "about.css")
array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/about.css');
array_push($cssJsCostum, '/css/'.$this->costum["slug"].'/about.css');
if(!empty($cssJsCostum))
HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl());
}
......
<section class="col-md-12 col-sm-12 col-xs-12" id="social-header"
<?php if (!@$element["profilBannereUrl"] || (@$element["profilBannereUrl"] && empty($element["profilBannereUrl"]))){
if(!empty(Yii::app()->session["costum"]) && isset(Yii::app()->session["costum"]["htmlConstruct"])
&& isset(Yii::app()->session["costum"]["htmlConstruct"]["element"])
&& isset(Yii::app()->session["costum"]["htmlConstruct"]["element"]["banner"]["img"]))
$url=Yii::app()->getModule( "costum" )->assetsUrl.Yii::app()->session["costum"]["htmlConstruct"]["element"]["banner"]["img"];
if(!empty($this->costum) && isset($this->costum["htmlConstruct"])
&& isset($this->costum["htmlConstruct"]["element"])
&& isset($this->costum["htmlConstruct"]["element"]["banner"]["img"]))
$url=Yii::app()->getModule( "costum" )->assetsUrl.$this->costum["htmlConstruct"]["element"]["banner"]["img"];
else
$url=Yii::app()->theme->baseUrl.'/assets/img/background-onepage/connexion-lines.jpg';
?>
......
......@@ -141,12 +141,12 @@
id="open-co-space" style="border-right:0px!important;">
<?php
$name = Yii::t("cooperation", "CO-space");
if(@Yii::app()->session['costum']["modules"]["dda"]["name"])
$name = Yii::app()->session['costum']["modules"]["dda"]["name"];
if(@$this->costum["modules"]["dda"]["name"])
$name = $this->costum["modules"]["dda"]["name"];
$icon = "fa-connectdevelop";
if(@Yii::app()->session['costum']["modules"]["dda"]["icon"])
$icon = Yii::app()->session['costum']["modules"]["dda"]["icon"];
if(@$this->costum["modules"]["dda"]["icon"])
$icon = $this->costum["modules"]["dda"]["icon"];
?>
<i class="fa <?php echo $icon; ?>"></i> <?php echo $name; ?>
</button>
......
......@@ -29,7 +29,7 @@
<div class="close-modal" data-dismiss="modal"><div class="lr"><div class="rl"></div></div></div>
</div>
<div id="uploadScropResizeAndSaveImage" style="padding:0px 60px;">
<?php $imgLogo=(@Yii::app()->session['costum']["logo"]) ? Yii::app()->session['costum']["logo"] : Yii::app()->theme->baseUrl."/assets/img/LOGOS/CO2/logo-head-search.png"; ?>
<?php $imgLogo=(@$this->costum["logo"]) ? $this->costum["logo"] : Yii::app()->theme->baseUrl."/assets/img/LOGOS/CO2/logo-head-search.png"; ?>
<!--<div class="col-lg-12">
<img src="<?php echo $imgLogo ?>"
class="inline margin-top-25 margin-bottom-5" height="50">
......
......@@ -5,13 +5,13 @@
'/js/default/editInPlace.js',
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->getParentAssetsUrl());
$elementParams=@Yii::app()->session['paramsConfig']["element"];
if(isset(Yii::app()->session["costum"])){
$elementParams=@$this->appConfig["element"];
if(isset($this->costum)){
$cssJsCostum=array();
//if(isset($elementParams["js"]))
// array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/about.js');
// array_push($cssJsCostum, '/js/'.$this->costum["slug"].'/about.js');
//if(isset($elementParams["css"]))
// array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/about.css');
// array_push($cssJsCostum, '/css/'.$this->costum["slug"].'/about.css');
if(!empty($cssJsCostum))
HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl());
}
......
......@@ -13,7 +13,7 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->
// if($type == Organization::COLLECTION && @$element["type"]) $typeItemHead = $element["type"];
// $icon = Element::getFaIcon($typeItemHead) ? Element::getFaIcon($typeItemHead) : "";
// $iconColor = Element::getColorIcon($typeItemHead) ? Element::getColorIcon($typeItemHead) : "";
$previewConfig=@Yii::app()->session['paramsConfig']["preview"];
$previewConfig=@$this->appConfig["preview"];
$auth=(Authorisation::canEditItem( @Yii::app()->session["userId"], $type, $element["_id"])) ? true : false;
?>
<div id="preview-elt-<?php echo $type ?>-<?php echo (string)$element["_id"] ?>">
......@@ -39,10 +39,10 @@ $auth=(Authorisation::canEditItem( @Yii::app()->session["userId"], $type, $eleme
if (isset($element["profilBannerUrl"]) && !empty($element["profilBannerUrl"])){
$url=Yii::app()->createUrl('/'.$element["profilBannerUrl"]);
}else{
if(!empty(Yii::app()->session["costum"]) && isset(Yii::app()->session["costum"]["htmlConstruct"])
&& isset(Yii::app()->session["costum"]["htmlConstruct"]["element"])
&& isset(Yii::app()->session["costum"]["htmlConstruct"]["element"]["banner"]["img"]))
$url=Yii::app()->getModule( "costum" )->assetsUrl.Yii::app()->session["costum"]["htmlConstruct"]["element"]["banner"]["img"];
if(!empty($this->costum) && isset($this->costum["htmlConstruct"])
&& isset($this->costum["htmlConstruct"]["element"])
&& isset($this->costum["htmlConstruct"]["element"]["banner"]["img"]))
$url=Yii::app()->getModule( "costum" )->assetsUrl.$this->costum["htmlConstruct"]["element"]["banner"]["img"];
else
$url=Yii::app()->theme->baseUrl.'/assets/img/background-onepage/connexion-lines.jpg';
}
......
......@@ -37,13 +37,13 @@
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl);
$elementParams=@Yii::app()->session['paramsConfig']["element"];
if(isset(Yii::app()->session["costum"])){
$elementParams=@$this->appConfig["element"];
if(isset($this->costum)){
$cssJsCostum=array();
if(isset($elementParams["js"]))
array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/pageProfil.js');
array_push($cssJsCostum, '/js/'.$this->costum["slug"].'/pageProfil.js');
if(isset($elementParams["css"]))
array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/pageProfil.css');
array_push($cssJsCostum, '/css/'.$this->costum["slug"].'/pageProfil.css');
if(!empty($cssJsCostum))
HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl());
}
......@@ -66,8 +66,8 @@
// $icon = Element::getFaIcon($typeItemHead) ? Element::getFaIcon($typeItemHead) : "";
// $iconColor = Element::getColorIcon($typeItemHead) ? Element::getColorIcon($typeItemHead) : "";
// $useBorderElement = false;
// $pageConfig=(@Yii::app()->session['paramsConfig']["element"]) ? Yii::app()->session['paramsConfig']["element"] : null;
// $addConfig=(@Yii::app()->session['paramsConfig']["add"]) ? Yii::app()->session['paramsConfig']["add"] : null;
// $pageConfig=(@$this->appConfig["element"]) ? $this->appConfig["element"] : null;
// $addConfig=(@$this->appConfig["add"]) ? $this->appConfig["add"] : null;
///-------------- END ------------////
if(empty($element["_id"])){
$what=(@$element["type"]) ? "the ".Element::getControlerByCollection($element["type"]) : "the element";
......
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