Commit 5f469eb1 authored by Clément Damiens's avatar Clément Damiens

Merged branch master into simpleInterface

parents c369fa9a 1a745e74
......@@ -3916,6 +3916,14 @@ var co = {
}
smallMenu.openAjaxHTML( baseUrl+'/graph/co/d3/'+what);
} );},
badge : function () {
var what = "id/"+userId+"/type/citoyens";
if(contextData && contextData.id && contextData.type ) {
contextDataType = dyFInputs.get(contextData.type).ctrl;
what = "id/"+contextData.id+"/type/"+contextDataType;
}
smallMenu.openAjaxHTML( baseUrl+'/connect/co/badge/'+what);
},
gmenu : function () { },
mind : function () {
if( contextData && contextData.type == "citoyens")
......
......@@ -1611,7 +1611,7 @@ var directory = {
// "<img class='img-responsive' src='"+baseUrl+params.profilImageUrl+"'/>"+
// '</a>'+
'</div>';
/*
if( params.creator == userId || params.author == userId || params.parentId == userId || dyFObj.canUserEdit() ){
str += '<hr>'+
'<div class="col-md-12 col-sm-12 col-xs-12 shadow2 padding-15 margin-top-25">'+
......@@ -1620,7 +1620,7 @@ var directory = {
'<i class="fa fa-pencil"></i> '+trad["modifyelement"]+
'</a></div>';
}
*/
str += "</div>";
......
......@@ -156,6 +156,7 @@ class CommunecterController extends Controller
"switch" => array("href" => "/ph/co2/default/switch"),
"live" => array("href" => "/ph/co2/default/live"),
"sitemap" => array("href" => "/ph/co2/default/sitemap"),
"img" => array("href" => "/ph/co2/default/img"),
),
"city"=> array(
"index" => array("href" => "/ph/co2/city/index", "public" => true),
......
......@@ -308,6 +308,7 @@ class AppController extends CommunecterController {
if(@$element["parentId"] && @$element["parentType"])
$element['parent'] = Element::getSimpleByTypeAndId( $element["parentType"], $element["parentId"]);
if(@$element["organizerId"] && @$element["organizerType"] &&
$element["organizerId"] != "dontKnow" && $element["organizerType"] != "dontKnow")
$element['organizer'] = Element::getByTypeAndId( $element["organizerType"], $element["organizerId"]);
......
......@@ -108,6 +108,11 @@ class DefaultController extends CommunecterController {
$this->render("index");
}
public function actionImg($n)
{
echo $this->module->getAssetsUrl()."/images/".$n;
}
public function actionHome()
{
//$this->layout = "//layouts/mainSearch";
......
......@@ -89,6 +89,7 @@
<div class="pull-left elemt_name elipsis">
<i class="fa fa-<?php echo $specs["icon"]?> text-<?php echo @$specs["text-color"]?>"></i>
<span class=""><?php echo $v["name"]; ?></span>
<?php
$id = null;
if(@$v["_id"])
......@@ -98,6 +99,9 @@
//echo ($type) ? Element::getLink(@$type."s",$id) : "no type"; //echo @$type;?>
</div><br>
<div class="elemt_date pull-left text-left elipsis">
<a href="#page.type.citoyens.id.<?php echo @$v["creator"]; ?>" class="lbh">
<i class="fa-user fa"></i>
</a>
<span class="dateTZ">
<?php echo @$v["updatedLbl"];?>
<?php if(@$v["price"]) echo " | <span class='text-azure'>" .@$v["price"].' '.@$v["devise"].'</span>';?>
......
......@@ -9,6 +9,14 @@
<button class="btn btn-default pull-right btn-close-preview" style="margin-top:-15px;">
<i class="fa fa-times"></i>
</button>
<?php if( $element["creator"] == Yii::app()->session["userId"] || Authorisation::canEditItem( Yii::app()->session["userId"], "poi", $id, $element["parentType"], $element["parentId"] ) ){?>
<button class="btn btn-default pull-right text-red deleteThisBtn" data-type="poi" data-id="<?php echo $id ?>" style="margin-top:-15px;">
<i class=" fa fa-trash"></i>
</button>
<button class="btn btn-default pull-right btn-edit-preview" style="margin-top:-15px;">
<i class="fa fa-pencil"></i>
</button>
<?php } ?>
<!-- <h3 class="text-center letter-green"><i class="fa fa-map-marker"></i> Point d'intéret</h3> -->
<div id="poi"></div>
</div>
......@@ -31,15 +39,20 @@
initBtnLink();
$("#modal-preview-coop .btn-close-preview").click(function(){
$("#modal-preview-coop .btn-close-preview, .deleteThisBtn").click(function(){
console.log("close preview");
$("#modal-preview-coop").hide(300);
$("#modal-preview-coop").html("");
});
$(".btn-edit-preview").click(function(){
$("#modal-preview-coop").hide(300);
$("#modal-preview-coop").html("");
dyFObj.editElement('poi', '<?php echo $id ?>' );
});
//poi["sections"] = <?php echo json_encode(CO2::getContextList("poi")); ?>
Sig.showMapElements(Sig.map, new Array(poiAlone));
});
</script>
\ No newline at end of file
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