Commit c8e2c722 authored by Raph El's avatar Raph El
Browse files

Modif page element costum

parent 89c4f9bc
......@@ -31,21 +31,25 @@
if( !empty(Yii::app()->session['costum']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'])&&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]) ) {
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
"page" => "page",
"canEdit"=>$canEdit,
"openEdition" => $openEdition,
"linksBtn" => $linksBtn,
"isLinked" => $isLinked,
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type],$params);
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['urlTpl'])&&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['urlTpl'][$type]) ) {
$tpl = Yii::app()->session['costum']['htmlConstruct']['element']['urlTpl'][$type] ;
$url = ( !empty($tpl[$element["type"]]) ? $tpl[$element["type"]] : $tpl["default"] ) ;
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
"page" => "page",
"canEdit"=>$canEdit,
"openEdition" => $openEdition,
"linksBtn" => $linksBtn,
"isLinked" => $isLinked,
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
echo $this->renderPartial($url,$params);
} else if( in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION]) ){
$params = array("element"=>$element ,
"id" => @$id,
......
......@@ -8,10 +8,10 @@
$elementParams=@Yii::app()->session['paramsConfig']["element"];
if(isset(Yii::app()->session["costum"])){
$cssJsCostum=array();
//if(isset($elementParams["js"]))
// array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/about.js');
//if(isset($elementParams["css"]))
// array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/about.css');
if(isset($elementParams["js"]) && $elementParams["js"] == "about.js")
array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/about.js');
if(isset($elementParams["css"]) && $elementParams["js"] == "about.css")
array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/about.css');
if(!empty($cssJsCostum))
HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl());
}
......
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