Commit c0b789db authored by Tib's avatar Tib
Browse files

image filters and dash board filters cte

parent cc415e9d
......@@ -211,3 +211,6 @@
#filterContainer #input-sec-search .input-global-search {
border-radius: 0px 20px 20px 0px;
}
.btn-filters-select.active{
background-color: red
}
\ No newline at end of file
var filterObj = {
container : "#filterContainer" ,
urlData : baseUrl+"/" + moduleId + "/search/globalautocomplete",
init : function(pInit = null){
mylog.log("PixelHumain filterObj.init",pInit);
//Init variable
var copyFilters = jQuery.extend(true, {}, filterObj);
copyFilters.initVar(pInit);
return copyFilters;
},
initVar : function(pInit){
mylog.log("PixelHumain filterObj.initVar",pInit);
this.container = ( (pInit != null && typeof pInit.container != "undefined") ? pInit.container : "#filterContainer" );
this.urlData = ( (pInit != null && typeof pInit.urlData != "undefined") ? pInit.urlData : "#filterContainer" );
this.initDefaults(pInit);
this.initViews(pInit);
this.initActions(pInit);
},
initDefaults : function(pInit){
mylog.log("PixelHumain filterObj.initDefaults",pInit);
var str = "";
var fObj = this;
if(typeof pInit.defaults != "undefined"){
mylog.log("PixelHumain filterObj.initDefaults defaults");
if(typeof pInit.defaults.fields != "undefined"){
$.each(pInit.defaults.fields,function(k,v){
mylog.log("PixelHumain filterObj.initDefaults fields",k, v);
if(typeof searchObject.filters == "undefined" )
searchObject.filters = {};
if(typeof searchObject.filters[k] == "undefined" )
searchObject.filters[k] = [];
searchObject.filters[k].push(v);
});
}
}
},
initActions : function(pInit){
mylog.log("PixelHumain filterObj.initActions",pInit);
var str = "";
var fObj = this;
if(typeof pInit.filters != "undefined"){
$.each(pInit.filters,function(k,v){
mylog.log("PixelHumain filterObj.initActions each", k,v);
if(typeof v.action != "undefined" && typeof fObj.actions[v.action] != "undefined"){
fObj.actions[v.action](fObj);
}
});
}
},
initViews : function(pInit){
mylog.log("PixelHumain filterObj.initViews",pInit);
var str = '<div class="pull-left text-dark labelFilterTit"><i class="fa fa-filter"></i> <span class="hidden-sm">Filtres</span></div>';
var fObj = this;
if(typeof pInit.filters != "undefined"){
$.each(pInit.filters,function(k,v){
mylog.log("PixelHumain filterObj.initViews each", k,v);
if(typeof v.view != "undefined" && typeof fObj.views[v.view] != "undefined"){
str += fObj.views[v.view](k,v);
}
});
}
str+='<div id="activeFilters" class="col-xs-12 padding-5"></div>';
$(fObj.container).html(str);
fObj.initFilters();
},
initFilters : function(){
mylog.log("PixelHumain filterObj.initFilters");
fObj=this;
getParamsUrls=location.hash.split("?");
if(typeof getParamsUrls[1] != "undefined" ){
var parts = getParamsUrls[1].split("&");
var $_GET = {};
var initScopesResearch={"key":"open","ids":[]};
for (var i = 0; i < parts.length; i++) {
var temp = parts[i].split("=");
$_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
}
if(Object.keys($_GET).length > 0){
$.each($_GET, function(e,v){
v=decodeURI(v);
if(e=="tags"){
tags=v.split(",");
$.each(tags, function(i, tag){
fObj.manage.addActive(fObj,"tags",tag);
});
}
if(e=="cities" || e=="zones"){
if($.inArray(e,["cities","zones","cp"]) > -1) $.each(v.split(","), function(i, j){ initScopesResearch.ids.push(j) });
if(initScopesResearch.key!="" && initScopesResearch.ids.length > 0)
checkMyScopeObject(initScopesResearch, $_GET, function(){
if(typeof myScopes.open != "undefined" && Object.keys(myScopes.open).length > 0){
$.each(myScopes.open, function(i, scope){
if(typeof scope.active != "undefined" && scope.active)
fObj.manage.addActive(fObj, "scope",scope.name,i);
});
}
});
mylog.log(myScopes, "checkherescopes" );
if(typeof myScopes.open != "undefined" && Object.keys(myScopes.open).length > 0){
$.each(myScopes.open, function(i, scope){
if(typeof scope.active != "undefined" && scope.active)
fObj.manage.addActive(fObj, "scope",scope.name,i);
});
}
}
});
}
}
},
search : function(){
searchObject.nbPage=0;
searchObject.count=true;
mylog.log("PixelHumain filterObj.search", searchObject);
startSearch(0/*, null, function(){ if($(".searchEntityContainer").length == 0) $(".projectsProgress").show(); }*/);
},
views : {
tags : function(k,v){
mylog.log("PixelHumain filterObj.views.tags", k,v);
var str = "";
return str;
},
select : function(k,v){
mylog.log("PixelHumain filterObj.views.select", k,v);
var str = "<select>";
str += '<option value="-1" >ALL</option>';
if(typeof v.list != "undefined"){
$.each( v.list ,function(kL,vL){
str +='<option value="'+vL+'" >'+vL+'</option>';
});
}
str += "</select>";
return str;
},
selectList : function(k,v){
mylog.log("PixelHumain filterObj.views.selectList", k,v);
label=(typeof v.name != "undefined") ? v.name: "Ajouter un filtre";
str='<li class="dropdown">'+
'<a href="javascript:;" class="dropdown-toggle menu-button btn-menu" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-label-xs="types" data-toggle="tooltip" data-placement="bottom">'+
label+' <i class="fa fa-angle-down margin-left-5"></i>'+
'</a>'+
'<div class="dropdown-menu arrow_box" style="overflow-y: auto;" aria-labelledby="dropdownTypes">'+
'<div class="list-filters">';
if(typeof v.list != "undefined"){
includeSubList=(typeof v.list=="object" && !Array.isArray(v.list)) ? true : false;
$.each( v.list ,function(kL,vL){
if(includeSubList){
str +='<button class="mainTitle col-xs-12" data-field="'+v.field+'" data-type="'+v.type+'" data-value="'+kL+'" >'+kL+'</button>';
if(Object.keys(vL).length > 0){
$.each(vL, function(i, sub){
str +='<button class="col-xs-12" data-field="'+v.field+'" data-type="'+v.type+'" data-value="'+sub+'" >'+sub+'</button>';
});
}
}else{
str +='<button class="col-xs-12" data-field="'+v.field+'" data-type="'+v.type+'" data-value="'+vL+'" >'+vL+'</button>';
}
});
}
str+='</div></div>'+
'</li>';
return str;
},
scope : function(){
mylog.log("PixelHumain filterObj.views.scope");
return '<div id="costum-scope-search"><div id="input-sec-search">'+
'<div class="input-group shadow-input-header">'+
'<span class="input-group-addon scope-search-trigger">'+
'<i class="fa fa-map-marker fa-fw" aria-hidden="true"></i>'+
'</span>'+
'<input type="text" class="form-control input-global-search" autocomplete="off"'+
' id="searchOnCity" placeholder="Où ?">'+
'</div>'+
'<div class="dropdown-result-global-search col-xs-12 col-sm-5 col-md-5 col-lg-5 no-padding" '+
' style="display: none;">'+
'<div class="content-result">'+
'</div>'+
'</div>'+
'</div></div>';
}
},
actions : {
tags : function(fObj){
mylog.log("PixelHumain filterObj.actions.tags");
$("button[data-type='tags']").off().on("click",function(){
mylog.log("PixelHumain filterObj.actions.tags click");
searchObject.tags.push($(this).data("value"));
fObj.search();
fObj.manage.addActive(fObj,"tags",$(this).data("value"), $(this).data("key"), $(this).data("field"));
});
},
filters : function(fObj){
mylog.log("PixelHumain filterObj.actions.filters");
$("button[data-type='filters']").off().on("click",function(){
mylog.log("PixelHumain filterObj.actions.filters click");
if(typeof $(this).data("field") != "undefined"){
if(typeof searchObject.filters == "undefined" )
searchObject.filters = {};
if(typeof searchObject.filters[$(this).data("field")] == "undefined" )
searchObject.filters[$(this).data("field")] = [];
searchObject.filters[$(this).data("field")].push($(this).data("value"));
fObj.search();
fObj.manage.addActive(fObj, "filters",$(this).data("value"), $(this).data("key"), $(this).data("field"));
}
});
},
scope : function(fObj){
mylog.log("PixelHumain filterObj.actions.scope");
myScopes.open={};
bindSearchCity("#costum-scope-search", function(){
$(".item-globalscope-checker").off().on('click', function(){
mylog.log("PixelHumain filterObj.actions.scope click");
$("#costum-scope-search .input-global-search").val("");
$(".dropdown-result-global-search").hide(700).html("");
myScopes.type="open";
mylog.log("PixelHumain filterObj.actions.scope globalscope-checker", $(this).data("scope-name"), $(this).data("scope-type"));
newScope=scopeObject(myScopes.search[$(this).data("scope-value")]);
$.each(newScope, function(e, v){
if(typeof v.active == "undefined" || !v.active)
delete newScope[e];
else
newKeyScope=e;
});
myScopes.open[newKeyScope]=newScope[newKeyScope];
localStorage.setItem("myScopes",JSON.stringify(myScopes));
fObj.manage.addActive(fObj, "scope",$(this).data("scope-name"),newKeyScope);
fObj.search();
});
});
}
},
manage:{
addActive: function(fObj, type, value, key, field){
mylog.log("PixelHumain filterObj.manage.addActive", type, value, key);
var dataKey = (typeof key != "undefined") ? 'data-key="'+key+'" ' : "" ;
var dataField = (typeof field != "undefined") ? 'data-field="'+field+'" ' : "" ;
str='<div class="filters-activate tooltips" data-position="bottom" data-title="Effacer" '+
dataKey +
dataField +
'data-value="'+value+'" '+
'data-name="'+name+'" '+
'data-type="'+type+'">' +
"<i class='fa fa-times-circle'></i>"+
"<span "+
"class='activeFilters' "+
dataKey +
dataField +
'data-value="'+value+'" '+
'data-scope-name="'+name+'" '+
'data-type="'+type+'">' +
value +
"</span>"+
"</div>";
$(fObj.container+" #activeFilters").append(str);
coInterface.initHtmlPosition();
$(fObj.container+" .filters-activate").off().on("click",function(){
fObj.manage.removeActive(fObj, $(this).data("type"), $(this).data("value"), $(this).data("key"), $(this).data("field"));
$(this).fadeOut(200);
coInterface.initHtmlPosition();
});
},
removeActive : function(fObj, type, value, key, field){
mylog.log("PixelHumain filterObj.manage.removeActive", type, value, key, field);
if(type=="filters"){
mylog.log("PixelHumain filterObj.manage.removeActive filters", searchObject);
if( typeof searchObject.filters != "undefined" && typeof searchObject.filters[field] != "undefined")
searchObject.filters[field].splice(searchObject.filters[field].indexOf(value),1);
}
else if(type=="tags")
searchObject.tags.splice(searchObject.tags.indexOf(value),1);
else if(type=="scope"){
delete myScopes.open[key];
}
fObj.search();
}
}
};
\ No newline at end of file
......@@ -28,6 +28,7 @@ class CtenatController extends CommunecterController {
'previewdata' => 'costum.controllers.actions.ctenat.admin.PreviewDataAction',
'saveindicateur' => 'costum.controllers.actions.ctenat.admin.SaveIndicateurAction',
'dashboard' => 'costum.controllers.actions.ctenat.DashboardAction',
'dashgraph' => 'costum.controllers.actions.ctenat.DashgraphAction',
"dashboardaccount" => 'costum.controllers.actions.ctenat.element.DashboardAccountAction',
"validata" => 'costum.controllers.actions.ctenat.script.ValidataAction',
"cter" => 'costum.controllers.actions.ctenat.api.CterAction',
......
This diff is collapsed.
This diff is collapsed.
<?php if(@$element["category"] && $element["category"]=="ficheAction" && $type!=Organization::COLLECTION){
if(isset($element["links"]) && isset($element["links"]["projects"])) {
foreach($element["links"]["projects"] as $k => $v){
$ter=Element::getElementById( $k, Project::COLLECTION, null, array("name", "slug","profilThumbImageUrl", "profilMediumImageUrl"));
$ter["id"]=$k;
$cteRParent=array_merge($element["links"]["projects"][$k], $ter);
}
}
if(isset($cteRParent)){
$imgPath = (@$cteRParent["profilMediumImageUrl"] && !empty($cteRParent["profilMediumImageUrl"])) ? Yii::app()->createUrl('/'.$cteRParent["profilMediumImageUrl"]) : $this->module->getParentAssetsUrl().'/images/thumb/default_'.$v["type"].'.png'; ?>
<div class="section-date pull-right" style="padding: 0px;background: none;top: 10px;position: absolute;right: 10px;margin: 0px;">
<a href="#page.type.<?php echo Project::COLLECTION ?>.id.<?php echo $cteRParent["id"] ?>" class="lbh-preview-element text-white">
<img class="img-circle tooltips" height=70 width="70" src="<?php echo $imgPath ?>" data-toggle="tooltip" data-placement="left" title="Déposée sur <?php echo $cteRParent["name"] ?>">
</a>
</div>
<?php }
} ?>
<div class="col-xs-12 col-sm-12 col-md-12 contentHeaderInformation <?php if(@$element["profilBannerUrl"] && !empty($element["profilBannerUrl"])) echo "backgroundHeaderInformation" ?>">
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 text-white pull-right">
<?php if (@$element["status"] == "deletePending") { ?>
<h4 class="text-left padding-left-15 pull-left no-margin letter-red"><?php echo Yii::t("common","Being suppressed") ?></h4><br>
<?php } ?>
<h4 class="text-left padding-left-15 pull-left no-margin">
<span id="nameHeader">
<div class="pastille-type-element bg-<?php echo $iconColor; ?> pull-left">
</div>
<i class="fa fa-<?php echo $icon; ?> pull-left margin-top-5"></i>
<div class="name-header pull-left"><?php echo @$element["name"]; ?></div>
</span>
<?php if(($type==Organization::COLLECTION || $type==Event::COLLECTION) && @$element["typeEvent"]){
if($type==Organization::COLLECTION)
$typesList=Organization::$types;
else
$typesList=Event::$types;
?>
<span id="typeHeader" class="margin-left-10 pull-left">
<i class="fa fa-x fa-angle-right pull-left"></i>
<div class="type-header pull-left">
<?php echo Yii::t("category", $typesList[$element["typeEvent"]]) ?>
</div>
</span>
<?php } ?>
</h4>
</div>
<?php
$classAddress = ( (@$element["address"]["postalCode"] || @$element["address"]["addressLocality"] || @$element["tags"]) ? "" : "hidden" );
//if(@$element["address"]["postalCode"] || @$element["address"]["addressLocality"] || @$element["tags"]){ ?>
<div class="header-address-tags col-xs-12 col-sm-9 col-md-9 col-lg-10 pull-right margin-bottom-5 <?php echo $classAddress ; ?>">
<?php if(!empty($element["address"]["addressLocality"])){ ?>
<div class="header-address badge letter-white bg-red margin-left-5 pull-left">
<?php
echo !empty($element["address"]["streetAddress"]) ? "<i class='fa fa-map-marker'></i> ".$element["address"]["streetAddress"].", " : "";
echo !empty($element["address"]["postalCode"]) ?
$element["address"]["postalCode"].", " : "";
echo $element["address"]["addressLocality"];
?>
</div>
<?php $classCircleO = (!empty($element["tags"]) ? "" : "hidden" ); ?>
<span id="separateurTag" class="margin-right-10 margin-left-10 text-white pull-left <?php echo $classCircleO ; ?>" style="font-size: 10px;line-height: 20px;">
<i class="fa fa-circle-o"></i>
</span>
<?php } ?>
<div class="header-tags pull-left">
<?php if(@$cteRParent) echo '<a href="#page.type.'.Project::COLLECTION.'.id.'.$cteRParent["id"].'" style="color: white !important;font-size: 16px;font-weight: 800;" class="lbh text-white">'.$cteRParent["name"].'</a>';
if(@$element["tags"]){
foreach ($element["tags"] as $key => $tag) {
if(!in_array($tag,["cte", "candidat"]) && !empty($tag)){ ?>
<!--<a href="#search?text=#<?php echo $tag; ?>" class="badge letter-red bg-white lbh" style="vertical-align: top;">#<?php echo $tag; ?></a>-->
<?php }
}
} ?>
</div>
</div>
<!--<div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 pull-right">
<span class="pull-left text-white" id="shortDescriptionHeader"><?php echo ucfirst(substr(trim(@$element["shortDescription"]), 0, 180)); ?>
</span>
</div>-->
<?php if(@$element["source"] && @$element["source"]["status"]
&& @$element["source"]["status"][$this->costum["slug"]] &&
is_string($element["source"]["status"][$this->costum["slug"]]) && isset($element["category"]) && $element["category"]=="cteR"){ ?>
<div class="section-date pull-right" style="padding: 5px 10px;">
<span style="color: #5fad88;font-variant: small-caps;font-size: 18px;font-weight: 800 !important"><i class="fa fa-trophy"></i> <?php echo $element["source"]["status"][$this->costum["slug"]] ?></span>
</div>
<?php } ?>
<?php if( ( $edit || $openEdition ) && !empty(Yii::app()->session["userId"])){
$href=(isset($bannerConfig["editButton"])
&& isset($bannerConfig["editButton"]["dynform"])
&& $bannerConfig["editButton"]["dynform"]) ? "javascript:dyFObj.editElement('".Element::getControlerByCollection($type)."', '".$elementId."');" : "javascript:;";
?>
<!--<div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 pull-right">
<a href="<?php echo $href ?>" class="pull-left btn letter-blue bg-white" id="btnHeaderEditInfos">
<i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit informations") ?>
</a>
</div>-->
<?php }
if(in_array($type, [Event::COLLECTION])){
if(@$element['parent'] || @$element['organizer'] ){ ?>
<div class="section-date pull-right">
<?php if($type==Event::COLLECTION){ ?>
<div class="event-infos-header" style="font-size: 14px;font-weight: none;"></div>
<?php } ?>
<div style="font-size: 14px;font-weight: none;">
<div id="parentHeader" >
<?php if(@$element['parent']){
$count=count($element["parent"]);
$msg = ($type==Event::COLLECTION) ? Yii::t("common","Planned on") : Yii::t("common","Carried by") ;
echo $msg. " : ";
foreach($element['parent'] as $key =>$v){
$heightImg=($count>1) ? 35 : 25;
$imgPath = (@$v["profilThumbImageUrl"] && !empty($v["profilThumbImageUrl"])) ? Yii::app()->createUrl('/'.$v["profilThumbImageUrl"]) : $this->module->assetsUrl.'/images/thumb/default_'.$v["type"].'.png' ?>
<a href="#page.type.<?php echo $v['type']; ?>.id.<?php echo $key; ?>"
class="lbh tooltips"
<?php if($count>1) echo 'data-toggle="tooltip" data-placement="left" title="'.$v["name"].'"' ?>>
<img src="<?php echo $imgPath ?>" class="img-circle" width='<?php echo $heightImg ?>' height='<?php echo $heightImg ?>' />
<?php if ($count==1) echo $v['name']; ?>
</a>
<?php } ?> <br> <?php } ?>
</div>
<div id="organizerHeader" >
<?php if(@$element['organizer']){
$count=count($element["organizer"]);
echo Yii::t("common","Organized by"). " : ";
foreach($element['organizer'] as $key =>$v){
$heightImg=($count>1) ? 35 : 25;
$imgPath = (@$v["profilThumbImageUrl"] && !empty($v["profilThumbImageUrl"])) ? Yii::app()->createUrl('/'.$v["profilThumbImageUrl"]) : $this->module->assetsUrl.'/images/thumb/default_'.$v["type"].'.png' ?>
<a href="#page.type.<?php echo $v['type']; ?>.id.<?php echo $key; ?>"
class="lbh tooltips"
<?php if($count>1) echo 'data-toggle="tooltip" data-placement="left" title="'.$v["name"].'"' ?>>
<img src="<?php echo $imgPath ?>" class="img-circle" width='<?php echo $heightImg ?>' height='<?php echo $heightImg ?>' />
<?php if ($count==1) echo $v['name']; ?>
</a>
<?php } } ?>
</div>
</div>
</div>
<?php }
}
?>
</div>
\ No newline at end of file
<?php
$cssAnsScriptFilesModule = array(
'/js/default/preview.js'
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->getParentAssetsUrl());
$where=array("id"=>@$id, "type"=>$type, "doctype"=>"image", "contentKey"=> "slider");
$images = Document::getListDocumentsWhere($where, "image");
?>
<style type="text/css">
.social-share-button img{
margin-right: 10px;
}
</style>
<div class="col-xs-12 padding-10 toolsMenu">
<button class="btn btn-default pull-right btn-close-preview">
<i class="fa fa-times"></i>
</button>
<a href="#@<?php echo $element["slug"] ?>" class="lbh btn btn-primary pull-right margin-right-10"><?php echo Yii::t("common", "Go to the item") ?></a>
</div>
<div class="container-preview col-xs-12 no-padding margin-bottom-20" style="overflow-y: scroll">
<?php
if (!@$element["profilBannereUrl"] || (@$element["profilBannereUrl"] && empty($element["profilBannereUrl"])))
$url=Yii::app()->getModule( "costum" )->assetsUrl.$this->costum["htmlConstruct"]["element"]["banner"]["img"];
else
$url=Yii::app()->createUrl('/'.$element["profilBannerUrl"]);
?>
<div class="col-xs-12 no-padding" style="border-top: 1px solid #e7e7e7;border-bottom: 1px solid #e7e7e7;">
<?php
$imgHtml='<img style="width:16vw;" class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive"
alt="'.Yii::t("common","Banner").'"
src="'.$url.'">';
if (@$element["profilRealBannerUrl"] && !empty($element["profilRealBannerUrl"])){
$imgHtml='<a href="'.Yii::app()->createUrl('/'.$element["profilRealBannerUrl"]).'"
class="thumb-info"
data-title="'.Yii::t("common","Cover image of")." ".$element["name"].'"
data-lightbox="all">'.
$imgHtml.
'</a>';
}
echo $imgHtml;
?>
</div>
<div class="content-img-profil-preview col-xs-6 col-xs-offset-3 col-lg-4 col-lg-offset-4">
<?php if(isset($element["profilMediumImageUrl"]) && !empty($element["profilMediumImageUrl"])){ ?>
<a href="<?php echo Yii::app()->createUrl('/'.$element["profilImageUrl"]) ?>"
class="thumb-info"
data-title="<?php echo Yii::t("common","Profil image of")." ".$element["name"] ?>"
data-lightbox="all">
<img class="img-responsive" style="box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.5);" src="<?php echo Yii::app()->createUrl('/'.$element["profilMediumImageUrl"]) ?>" />
</a>
<?php }else{ ?>
<img class="img-responsive shadow2 thumbnail" style="box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.5);" src="<?php echo $this->module->assetsUrl ?>/images/thumbnail-default.jpg"/>
<?php } ?>
</div>
<div class="col-xs-12 margin-bottom-20 no-padding">
<h3 class="title text-gray col-xs-12 text-center margin-bottom-20"><?php echo $element["name"] ?></h3>
<span class="col-xs-12 text-center blockFontPreview">
<?php if($type==Project::COLLECTION){
$label=(isset($element["category"]) && $element["category"]=="cteR") ? "Territoire en CTE" : "Action";
$iconColor=(isset($element["category"]) && $element["category"]=="cteR") ? $iconColor : "purple";
$icon=(isset($element["category"]) && $element["category"]=="cteR") ? "map-marker" : "lightbulb-o";
?>
<span class="text-<?php echo $iconColor; ?>"><i class="fa fa-<?php echo $icon ?>"></i> <?php echo $label; ?></span>
<?php }else{ ?>
<span class="text-<?php echo $iconColor; ?>"><?php echo strtoupper(Yii::t("common", Element::getControlerByCollection($type))); ?></span>
<?php } ?>
<?php if(($type==Organization::COLLECTION || $type==Event::COLLECTION) && @$element["type"]){
if($type==Organization::COLLECTION)
$typesList=Organization::$types;
else
$typesList=Event::$types;
?>
<i class="fa fa-x fa-angle-right margin-left-10"></i>
<span class="margin-left-10"><?php echo Yii::t("category", $typesList[$element["type"]]) ?></span>
<?php } ?>
</span>
<?php
if(!empty($element["address"]["addressLocality"])){ ?>
<div class="header-address col-xs-12 text-center blockFontPreview">
<?php
echo !empty($element["address"]["streetAddress"]) ? "<i class='fa fa-map-marker'></i> ".$element["address"]["streetAddress"].", " : "";
echo !empty($element["address"]["postalCode"]) ?
$element["address"]["postalCode"].", " : "";
echo $element["address"]["addressLocality"];
?>
</div>
<?php } ?>
<div class="header-tags col-xs-12 text-center blockFontPreview">
<?php
if(@$element["tags"] && $type!=Project::COLLECTION){
foreach ($element["tags"] as $key => $tag) { ?>
<a href="javascript:;" class="letter-red" style="vertical-align: top;">#<?php echo $tag; ?></a>
<?php }
} ?>
</div>
</div>
<?php if($type==Event::COLLECTION){ ?>
<div class="event-infos-header text-center margin-top-10 col-xs-12 blockFontPreview" style="font-size: 14px;font-weight: none;"></div>
<?php } ?>
<?php if(isset($element["filRouge"])){