Commit ad02407f authored by Raph El's avatar Raph El

Merge branch 'qa' of https://gitlab.adullact.net/pixelhumain/co2 into qa

parents 117a3825 17f6fb7e
......@@ -1933,24 +1933,6 @@ var directory = {
str += "<div class='col-md-8 col-sm-8 col-xs-12 margin-top-25'>";
str += dateFormated+countSubEvents;
str += "</div>";
if("undefined" != typeof params.organizerObj && params.organizerObj != null){
str += "<div class='col-md-8 col-sm-8 col-xs-12 entityOrganizer margin-top-10'>";
if("undefined" != typeof params.organizerObj.profilThumbImageUrl &&
params.organizerObj.profilThumbImageUrl != ""){
str += "<img class='pull-left img-responsive' src='"+baseUrl+params.organizerObj.profilThumbImageUrl+"' height='50'/>";
}
console.log("typeDYN",params.organizerObj.type, params.organizerObj);
elem = dyFInputs.get(params.organizerObj.type);
str += "<h5 class='no-margin padding-top-5'><small>"+tradDynForm.organizedby+"</small></h5>";
str += "<a href='#page.type."+elem.col+".id."+params.organizerObj["_id"]["$id"]+"' class='lbh' > <small class='entityOrganizerName'>"+params.organizerObj.name+"</small></a>";
str += "</div>";
}
str += "<div class='col-md-8 col-sm-8 col-xs-12 entityRight padding-top-10 margin-top-10 pull-right' style='border-top: 1px solid rgba(0,0,0,0.2);'>";
......@@ -1978,7 +1960,22 @@ var directory = {
params.name +
"</a>";
if("undefined" != typeof params.organizer && params.organizer != null){
countOrganizer=Object.keys(params.organizer).length;
str += "<div class='col-xs-12 margin-top-10 no-padding'>";
str+="<span class='bold'>"+tradDynForm.organizedby+" : </span>";
$.each(params.organizer, function(e,v){
imgIcon = (typeof v.profilThumbImageUrl != "undefined" && v.profilThumbImageUrl!="" ) ? baseUrl+"/"+v.profilThumbImageUrl: assetPath + "/images/thumb/default_"+v.type+".png";
str+='<a href="#page.type.'+v.type+'.id.'+e+'" class="lbh-preview-element tooltips" ';
if(countOrganizer>1) str+= 'data-toggle="tooltip" data-placement="top" title="'+v.name+'"';
str+=">"+
'<img src="'+imgIcon+'" class="img-circle margin-right-10" width="35" height="35"/>';
if(countOrganizer==1) str+=v.name;
str+="</a>";
});
str+="</div>";
}
str += "<div class='entityDescription margin-bottom-10'>" +
params.description +
"</div>";
......@@ -3045,8 +3042,9 @@ var directory = {
.done(function (data) {
if ( data && data.result ) {
toastr.info("élément effacé");
$("#"+type+id).remove();
if( $(".contain_"+type+"_"+id).length > 0 )
if( $("#"+type+id).length > 0)
$("#"+type+id).remove();
else if( $(".contain_"+type+"_"+id).length > 0 )
$(".contain_"+type+"_"+id).remove();
else
urlCtrl.loadByHash( location.hash );
......
......@@ -69,6 +69,16 @@
// $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(empty($element["_id"])){
$what=(@$element["type"]) ? "the ".Element::getControlerByCollection($element["type"]) : "the element";
?>
<script type="text/javascript">
urlCtrl.loadByHash("");
bootbox.dialog({message:"<div class='alert-danger text-center'><strong><?php echo Yii::t("common","{what}, that you are looking for, has been deleted or doesn't exist", array("{what}"=>ucfirst(Yii::t("common", $what)))) ?></strong></div>"});
</script>
<?php
exit;
}
if(@Yii::app()->params["front"]) $front = Yii::app()->params["front"];
$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.';
$auth = Authorisation::canParticipate(Yii::app()->session['userId'], $type, (string)$element["_id"]);
......
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