Commit 475da8cd authored by Raph El's avatar Raph El
Browse files

Modif

parent 2f7af1b7
......@@ -21,121 +21,135 @@
<div class="col-md-12 col-sm-12 col-xs-12 no-padding social-main-container">
<div class="" id="onepage">
<?php
if(in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION])){
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
"page" => "page",
"edit"=>$edit,
"openEdition" => $openEdition,
"linksBtn" => $linksBtn,
"isLinked" => $isLinked,
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
// <<<<<<< HEAD
// //Rest::json(array("view" => $view, "onepageKey" => $onepageKey)); exit ;
<?php
//var_dump($type); exit;
// 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]) ) {
// if( !empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]) ){
// var_dump(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]); exit;
// }else
// var_dump(Yii::app()->session['costum']['htmlConstruct']['element']['url']); exit;
// // echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type],$params);
// } else {
if(in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION])){
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
"page" => "page",
"edit"=>$edit,
"openEdition" => $openEdition,
"linksBtn" => $linksBtn,
"isLinked" => $isLinked,
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
// <<<<<<< HEAD
// //Rest::json(array("view" => $view, "onepageKey" => $onepageKey)); exit ;
// 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']) ) {
// echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'],$params);
// } else if(Yii::app()->params["CO2DomainName"] == "terla")
// $this->renderPartial('co2.views.element.terla.index', $params );
// else if(!empty($view) && !empty($onepageKey) && in_array($view, $onepageKey)) {
// =======
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']) ) {
echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'],$params);
} else if(isset($view) && !empty($view) && !empty($onepageKey) && in_array($view, $onepageKey))
$this->renderPartial("co2.views.element.onepage", $params);
else
$this->renderPartial('co2.views.element.profilSocial', $params );
}
if($type == News::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
$this->renderPartial('news.views.co.standalone', $params );
}
/*if($type == Product::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if(($element["creator"]==Yii::app()->session["userId"] || @Yii::app()->session["superAdmin"]) && $view != "show")
$this->renderPartial('co2.views.element.terla.dashboard', $params );
else
$this->renderPartial('co2.views.element.standalone', $params );
}
if($type == Service::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if($element["creator"]==Yii::app()->session["userId"] && $view != "show")
$this->renderPartial('co2.views.element.terla.dashboard', $params );
else
$this->renderPartial('co2.views.element.standalone', $params );
}*/
if($type == Survey::COLLECTION){
$params = array("survey"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
$this->renderPartial('co2.views.survey.entryStandalone', $params );
}
if($type == Classified::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
$this->renderPartial('eco.views.co.standalone', $params );
}
if($type == Poi::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
$this->renderPartial('co2.views.poi.standalone', $params );
// 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']) ) {
// echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'],$params);
// } else if(Yii::app()->params["CO2DomainName"] == "terla")
// $this->renderPartial('co2.views.element.terla.index', $params );
// else if(!empty($view) && !empty($onepageKey) && in_array($view, $onepageKey)) {
// =======
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']) ) {
echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'],$params);
} else if(isset($view) && !empty($view) && !empty($onepageKey) && in_array($view, $onepageKey))
// >>>>>>> master
$this->renderPartial("co2.views.element.onepage", $params);
else
$this->renderPartial('co2.views.element.profilSocial', $params );
}
if($type == News::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
$this->renderPartial('news.views.co.standalone', $params );
}
/*if($type == Product::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if(($element["creator"]==Yii::app()->session["userId"] || @Yii::app()->session["superAdmin"]) && $view != "show")
$this->renderPartial('co2.views.element.terla.dashboard', $params );
else
$this->renderPartial('co2.views.element.standalone', $params );
}
if($type == Service::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if($element["creator"]==Yii::app()->session["userId"] && $view != "show")
$this->renderPartial('co2.views.element.terla.dashboard', $params );
else
$this->renderPartial('co2.views.element.standalone', $params );
}*/
if($type == Survey::COLLECTION){
$params = array("survey"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
$this->renderPartial('co2.views.survey.entryStandalone', $params );
}
if($type == Classified::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
$this->renderPartial('eco.views.co.standalone', $params );
}
if($type == Poi::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
$this->renderPartial('co2.views.poi.standalone', $params );
}
}
// }
?>
</div>
</div>
......
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