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

Modif previews

parent 6b52b25a
......@@ -1000,7 +1000,13 @@ var directory = {
}
var linkAction = ( $.inArray(params.type, ["poi","classifieds"])>=0 ) ? " lbh-preview-element" : " lbh";
var linkAction = " lbh-preview-element";
if( typeof directory.costum != "undefined" &&
directory.costum != null &&
typeof directory.costum.preview != "undefined" &&
directory.costum.preview === true){
linkAction = " lbh-preview-element";
}
if(typeof params.imgType !="undefined" && params.imgType=="banner"){
str += "<a href='"+params.hash+"' class='container-img-banner add2fav "+linkAction+">" + params.imgBanner + "</a>";
str += "<div class='padding-10 informations tooltips' data-toggle='tooltip' data-placement='top' data-original-title='"+tipIsInviting+"'>";
......
......@@ -41,7 +41,7 @@
"countInvitations" => $countInvitations,
"countries" => $countries );
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])){
} else if( in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION]) ){
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
......@@ -53,7 +53,15 @@
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
"countries" => $countries,
"typeItem" => $typeItem,
"typeItemHead" => $typeItemHead,
"categoryItem" => $categoryItem,
"icon" => $icon,
"iconColor" => $iconColor,
"useBorderElement" => $useBorderElement,
"pageConfig" => $pageConfig,
"addConfig" => $addConfig );
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
......
......@@ -5,10 +5,10 @@
}
</style>
<?php
$typeItemHead = $type;
if($type == Organization::COLLECTION && @$element["type"]) $typeItemHead = $element["type"];
$icon = Element::getFaIcon($typeItemHead) ? Element::getFaIcon($typeItemHead) : "";
$iconColor = Element::getColorIcon($typeItemHead) ? Element::getColorIcon($typeItemHead) : "";
// $typeItemHead = $type;
// if($type == Organization::COLLECTION && @$element["type"]) $typeItemHead = $element["type"];
// $icon = Element::getFaIcon($typeItemHead) ? Element::getFaIcon($typeItemHead) : "";
// $iconColor = Element::getColorIcon($typeItemHead) ? Element::getColorIcon($typeItemHead) : "";
?>
<div id="preview-elt-<?php echo $type ?>-<?php echo (string)$element["_id"] ?>">
<?php if( isset(Yii::app()->session['costum']["htmlConstruct"])
......@@ -25,7 +25,15 @@
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
"countries" => $countries,
"typeItem" => $typeItem,
"typeItemHead" => $typeItemHead,
"categoryItem" => $categoryItem,
"icon" => $icon,
"iconColor" => $iconColor,
"useBorderElement" => $useBorderElement,
"pageConfig" => $pageConfig,
"addConfig" => $addConfig );
$this->renderPartial( Yii::app()->session["costum"]["htmlConstruct"]["preview"]["element"], $params );
}else{ ?>
<div class="col-xs-12 padding-10">
......
......@@ -54,20 +54,23 @@
$imgDefault = $this->module->assetsUrl.'/images/thumbnail-default.jpg';
///-------------- Ce code a été déplacer dans PageAction ------------////
//récupération du type de l'element
$typeItem = (@$element["typeSig"] && $element["typeSig"] != "") ? $element["typeSig"] : "";
if($typeItem == "") $typeItem = @$element["type"] ? $element["type"] : "item";
if($typeItem == "people") $typeItem = Person::COLLECTION;
//$typeItem = (@$element["typeSig"] && $element["typeSig"] != "") ? $element["typeSig"] : "";
// if($typeItem == "") $typeItem = @$element["type"] ? $element["type"] : "item";
// if($typeItem == "people") $typeItem = Person::COLLECTION;
$typeItemHead = $typeItem;
if($typeItem == Organization::COLLECTION && @$element["type"]) $typeItemHead = $element["type"];
$categoryItem=(isset($element["category"]) && is_string($element["category"])) ? $element["category"] : "";
//icon et couleur de l'element
$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;
// $typeItemHead = $typeItem;
// if($typeItem == Organization::COLLECTION && @$element["type"]) $typeItemHead = $element["type"];
// $categoryItem=(isset($element["category"]) && is_string($element["category"])) ? $element["category"] : "";
// //icon et couleur de l'element
// $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;
///-------------- END ------------////
if(@Yii::app()->params["front"]) $front = Yii::app()->params["front"];
$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.';
......@@ -87,7 +90,7 @@
"element"=>$element,
"pageConfig"=>$pageConfig,
"linksBtn"=>$linksBtn,
"invitedMe"=>@$invitedMe,
"invitedMe"=>@$invitedMe,
"elementId"=>(string)$element["_id"],
"elementType"=>$type,
"elementName"=> $element["name"],
......
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