Commit 488de511 authored by Pierre Goubeaux's avatar Pierre Goubeaux
Browse files

Alternatiba

parent 07c6e081
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
position: absolute !important; position: absolute !important;
} }
#dropdown {
background-color: whitesmoke;
width: 55% !important;
z-index: 1000;
}
#mapAlternatiba{ #mapAlternatiba{
height: 500px; height: 500px;
......
This diff is collapsed.
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
}, },
"htmlConstruct" : { "htmlConstruct" : {
"appRendering" : "vertical", "appRendering" : "vertical",
"preview": {
"element" : "costum.views.custom.alternatiba.element.preview"
},
"redirect" : { "redirect" : {
"logged" : "welcome", "logged" : "welcome",
"unlogged" : "welcome" "unlogged" : "welcome"
...@@ -159,7 +162,7 @@ ...@@ -159,7 +162,7 @@
"css" : "pageProfil.css", "css" : "pageProfil.css",
"initView" : "newspaper", "initView" : "newspaper",
"banner" : { "banner" : {
"img" : "/images/alternatiba/img-01.jpg", "img" : "/images/alternatiba/alter.png",
"preferences" : true, "preferences" : true,
"editButton" : { "editButton" : {
"dynform" : true "dynform" : true
...@@ -172,17 +175,9 @@ ...@@ -172,17 +175,9 @@
"events" : true, "events" : true,
"projects" : true, "projects" : true,
"community" : true, "community" : true,
"collections":{ "pois" : {
"label": "Favoris", "label" : "Articles",
"icon":"star", "icon" : "newspaper-o"
"class":"",
"separator":true,
"view":"directory",
"dataAttr":{
"dir":"collections",
"icon":"star"
},
"typeAllow":["citoyens"]
} }
}, },
"menuTop" : { "menuTop" : {
...@@ -190,7 +185,7 @@ ...@@ -190,7 +185,7 @@
"btnGroup" : { "btnGroup" : {
"imgProfil" : true, "imgProfil" : true,
"nameProfil" : true, "nameProfil" : true,
"newspaper" : true, "newspaper" : false,
"cospace" : false, "cospace" : false,
"chat" : false, "chat" : false,
"create" : false, "create" : false,
...@@ -235,17 +230,17 @@ ...@@ -235,17 +230,17 @@
"loader" : { "loader" : {
"background" : "white", "background" : "white",
"ring1" : { "ring1" : {
"color" : "#f8e600", "color" : "#098048",
"height" : 360, "height" : 420,
"width" : 360, "width" : 420,
"left" : -15, "left" : -15,
"borderWidth" : 4, "borderWidth" : 4,
"top" : -35 "top" : -35
}, },
"ring2" : { "ring2" : {
"color" : "#2A353D", "color" : "#098048",
"height" : 350, "height" : 400,
"width" : 350, "width" : 400,
"left" : -10, "left" : -10,
"borderWidth" : 5, "borderWidth" : 5,
"top" : -30 "top" : -30
...@@ -253,10 +248,10 @@ ...@@ -253,10 +248,10 @@
}, },
"progress" : { "progress" : {
"value" : { "value" : {
"background" : "#313757" "background" : "#098048"
}, },
"bar" : { "bar" : {
"background" : "red" "background" : "098048"
} }
}, },
"menuTop" : { "menuTop" : {
...@@ -264,7 +259,7 @@ ...@@ -264,7 +259,7 @@
"button" : { "button" : {
"paddingTop" : 900, "paddingTop" : 900,
"fontSize" : 25, "fontSize" : 25,
"color" : "black" "color" : "#098048"
}, },
"badge" : { "badge" : {
"background" : "#497614", "background" : "#497614",
...@@ -277,7 +272,7 @@ ...@@ -277,7 +272,7 @@
"display" : "none" "display" : "none"
}, },
"connectBtn" : { "connectBtn" : {
"background" : "#313757", "background" : "#098048",
"color" : "white", "color" : "white",
"fontSize" : 18, "fontSize" : 18,
"borderRadius" : 10, "borderRadius" : 10,
...@@ -289,7 +284,7 @@ ...@@ -289,7 +284,7 @@
"background" : "white", "background" : "white",
"button" : { "button" : {
"fontSize" : 25, "fontSize" : 25,
"color" : "black", "color" : "#098048",
"hover" : { "hover" : {
"borderBottom" : "2px solid #fff" "borderBottom" : "2px solid #fff"
} }
...@@ -300,7 +295,7 @@ ...@@ -300,7 +295,7 @@
"add" : { "add" : {
"bottom" : 10, "bottom" : 10,
"background" : "transparent", "background" : "transparent",
"color" : "black" "color" : "#098048"
}, },
"toolbarAdds" : { "toolbarAdds" : {
"bottom" : 10 "bottom" : 10
...@@ -312,15 +307,22 @@ ...@@ -312,15 +307,22 @@
] ]
}, },
"app" : { "app" : {
"#live" : { "#article" : {
"subdomainName" : "L'actualités", "hash" : "#app.search",
"slug" : "alternatiba", "icon" : "newspaper-o",
"formCreate" : false, "urlExtra" : "/page/article",
"useHeader" : true,
"useFilter" : true,
"inMenu" : true, "inMenu" : true,
"inMenuTop" : false, "open" : true,
"inMenuLeft" : true, "subdomainName" : "Tous les articles",
"useFilter" : false, "filters" : {
"viewMode" : "list" "types" : [
"poi"
],
"category" : "article"
},
"placeholderMainSearch" : "Quel article recherchez-vous ?"
}, },
"#agenda" : { "#agenda" : {
"subdomainName" : "L'agenda", "subdomainName" : "L'agenda",
...@@ -338,6 +340,85 @@ ...@@ -338,6 +340,85 @@
}, },
"projects" : { "projects" : {
"add" : true "add" : true
},
"poi" : {
"color" : "blue",
"icon" : "newspaper-o",
"name" : "Article",
"add" : "onlyAdmin",
"createLabel" : "Ecrire un article",
"dynFormCostum" : {
"beforeBuild" : {
"properties" : {
"name" : {
"label" : "Titre de l'article",
"placeholder" : "Entrez le titre de votre article..."
},
"parent" : {
"label" : "Auteur(s)"
},
"shortDescription" : {
"inputType" : "textarea",
"label" : "Résumé de l'article",
"placeholder" : "Entrez un résumé de votre article (200 caractères max.)...",
"rules" : {
"maxlength" : 200
},
"order" : 5
},
"description" : {
"markdown" : true,
"label" : "Texte de l'article",
"order" : 6
},
"image" : {
"label" : "Image(s)",
"order" : 7
},
"tags" : {
"label" : "Mot(s) clé (hashtags)"
},
"urls" : {
"label" : "Lien(s) : vidéo, page internet ou document...",
"order" : 8
},
"rank" : {
"inputType" : "checkboxSimple",
"label" : "Mettre à la Une",
"params" : {
"onText" : "Oui",
"offText" : "Non",
"onLabel" : "Article à la Une",
"offLabel" : "Article normal",
"labelText" : "Mettre l'article à la Une"
},
"checked" : false
}
}
},
"onload" : {
"actions" : {
"setTitle" : "Ecrire un article",
"html" : {
"infocustom" : "Formulaire de création d'un article"
},
"presetValue" : {
"type" : "article"
},
"hide" : {
"typeselect" : 1,
"breadcrumbcustom" : 1,
"locationlocation" : 1
}
}
}
}
}
},
"searchOpenMenu" : [
{
"url" : "#article",
"msg" : "Tous les articles"
} }
} ]
} }
...@@ -27,9 +27,9 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module-> ...@@ -27,9 +27,9 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->
?> ?>
<div class="col-xs-12 no-padding" style="border-top: 1px solid #e7e7e7;border-bottom: 1px solid #e7e7e7;"> <div class="col-xs-12 no-padding" style="border-top: 1px solid #e7e7e7;border-bottom: 1px solid #e7e7e7;">
<center>
<?php <?php
$imgHtml='<img style="width:16vw;" class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive" $imgHtml='<img style="width:16vw !important;" class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive"
alt="'.Yii::t("common","Banner").'" alt="'.Yii::t("common","Banner").'"
src="'.$url.'">'; src="'.$url.'">';
if (@$element["profilRealBannerUrl"] && !empty($element["profilRealBannerUrl"])){ if (@$element["profilRealBannerUrl"] && !empty($element["profilRealBannerUrl"])){
...@@ -41,7 +41,8 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module-> ...@@ -41,7 +41,8 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->
'</a>'; '</a>';
} }
echo $imgHtml; echo $imgHtml;
?> ?>
</center>
</div> </div>
<div class="content-img-profil-preview col-xs-6 col-xs-offset-3 col-lg-4 col-lg-offset-4"> <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"])){ ?> <?php if(isset($element["profilMediumImageUrl"]) && !empty($element["profilMediumImageUrl"])){ ?>
......
...@@ -37,20 +37,36 @@ $cssAnsScriptFilesTheme = array( ...@@ -37,20 +37,36 @@ $cssAnsScriptFilesTheme = array(
"type"=>"cms") ); "type"=>"cms") );
} }
if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
$element = Element::getByTypeAndId($this->costum["contextType"], $this->costum["contextId"] );
$pList = PHDB::findAndSort(Poi::COLLECTION,
array(
//"parent.".$this->costum["contextId"] => array('$exists'=>1),
//"parent.".$this->costum["contextId"].".type"=>$this->costum["contextType"],
"source.key"=>$this->costum["slug"],
"type"=>"article"), array("updated"=>-1), 3 );
}
$params = [ "tpl" => "alternatiba","slug"=>$this->costum["slug"],"canEdit"=>false,"el"=>$el ]; $params = [ "tpl" => "alternatiba","slug"=>$this->costum["slug"],"canEdit"=>false,"el"=>$el ];
echo $this->renderPartial("costum.views.tpls.acceptAndAdmin", $params,true ); echo $this->renderPartial("costum.views.tpls.acceptAndAdmin", $params,true );
?> ?>
<style type="text/css"> <style type="text/css">
@font-face{ @font-face{
font-family: "Helvetica"; font-family: "Helvetica";
src: url("<?php echo Yii::app()->getModule("costum")->getAssetsUrl() ?>/font/alternatiba/Helvetica.otf") src: url("<?php echo Yii::app()->getModule("costum")->getAssetsUrl() ?>/font/alternatiba/Helvetica.otf")
} }
#dropdown{ #dropdown {
background-color:whitesmoke; background-color: whitesmoke;
width: 59%; width: 55% !important;
z-index: 1000; z-index: 1000;
}
.article-plus {
width: 16% !important;
margin-left: 1%;
} }
</style> </style>
...@@ -70,7 +86,7 @@ $cssAnsScriptFilesTheme = array( ...@@ -70,7 +86,7 @@ $cssAnsScriptFilesTheme = array(
</div> </div>
<!-- Dropdown --> <!-- Dropdown -->
<div style="margin-left: 18.7vw;" id="dropdown" class="hidden-xs dropdown-result-global-search hidden-xs col-sm-5 col-md-5 col-lg-5 no-padding"> <div style="margin-left: 22.7vw;margin-top: -0.1%;" id="dropdown" class="hidden-xs dropdown-result-global-search hidden-xs col-sm-5 col-md-5 col-lg-5 no-padding">
</div> </div>
</center> </center>
</div> </div>
...@@ -97,16 +113,48 @@ $cssAnsScriptFilesTheme = array( ...@@ -97,16 +113,48 @@ $cssAnsScriptFilesTheme = array(
</div> </div>
<!-- Actualités --> <!-- Actualités -->
<div class="col-xs-12 text-center"> <div style="background-color: #ededed;" class="col-xs-12 text-center">
<div> <div>
<h1 style="font-family:'Helvetica';color: #098048;"> <h1 style="font-family:'Helvetica';color: #098048;">
<i class="fa fa-newspaper-o" aria-hidden="true"></i> Actualités <i class="fa fa-newspaper-o" aria-hidden="true"></i> Actualités
</h1> </h1>
</div> </div>
<div id="newsstream" class="col-xs-12 col-sm-12"> <div class="col-sm-10 col-sm-offset-1 col-xs-12">
<?php
</div> foreach($pList as $k => $v){
$imgPath=(isset($v["profilMediumImageUrl"]) && !empty($v["profilMediumImageUrl"])) ? Yii::app()->createUrl($v["profilMediumImageUrl"]) : Yii::app()->getModule("costum")->assetsUrl."/images/alternatiba/alter.png";
$desc=(isset($v['shortDescription'])) ? $v['shortDescription'] : "";
if(empty($desc) && isset($v["description"])){
$desc=/*(strlen($v["description"]) > 200) ? substr($v["description"], 0, 200)."..." :*/ $v["description"];
}
?>
<div id="entity<?php echo $k ?>" class="searchEntityContainer searchEntity shadow2 col-xs-12" style="margin-bottom: 15px !important;padding-top: 5px !important;padding-bottom: 5px !important;">
<div class="container-img col-xs-3 col-md-2"><img src="<?php echo $imgPath ?>" class="img-responsive"/>
</div>
<div class="container-info col-xs-9 col-xs-10">
<h3 class="text-left col-xs-8" style="font-size: 25px;text-transform: initial;color:#18a47c;"><?php echo $v["name"] ?></h3>
<a href="#page.type.poi.id.<?php echo $k ?>" class="lbh-preview-element col-xs-12 no-padding">
<img class="img-responsive article-plus" src="<?php echo Yii::app()->getModule('costum')->assetsUrl;?>/images/alternatiba/plus-01.svg">
</a>
<?php if(Authorisation::isInterfaceAdmin()){ ?>
<div class="col-xs-12"><button class="btn-primary addForumBtn" onclick="dyFObj.openForm('poi');">Ajouter une actualité</button></div>
<?php } ?>
</div>
</div>
<?php }
//var_dump($poiList);exit;
/*echo $this->renderPartial( "costum.views.tpls.multiElementBlock", array(
"poiList" => $poiList,
"blockName" => "el",
"titlecolor"=> "#e6344d",
"blockCt" => count($poiList),
"typeApp"=>"forum"
), true );*/
?>
</div>
</div> </div>
<!-- Cartographie --> <!-- Cartographie -->
...@@ -132,7 +180,7 @@ $cssAnsScriptFilesTheme = array( ...@@ -132,7 +180,7 @@ $cssAnsScriptFilesTheme = array(
<?php $params = array("canEdit" => $canEdit); ?> <?php $params = array("canEdit" => $canEdit); ?>
<!-- Agenda --> <!-- Agenda -->
<div class="col-xs-12 text-center"> <div style="background-color: #ededed;" class="col-xs-12 text-center">
<div> <div>
<h1 style="font-family:'Helvetica';color: #098048;"> <h1 style="font-family:'Helvetica';color: #098048;">
<i class="fa fa-calendar" aria-hidden="true"></i> Agenda <i class="fa fa-calendar" aria-hidden="true"></i> Agenda
...@@ -157,31 +205,68 @@ $cssAnsScriptFilesTheme = array( ...@@ -157,31 +205,68 @@ $cssAnsScriptFilesTheme = array(
<script type="text/javascript"> <script type="text/javascript">
jQuery(document).ready(function(){ jQuery(document).ready(function(){
$("#afficheMap").click(function(){
if (document.getElementById("mapAlternatiba").style.display == "initial") {
document.getElementById("mapAlternatiba").style.display = "none";
$("#afficheUp").removeClass('fa fa-angle-double-up').addClass('fa fa-angle-double-down');
}else{
document.getElementById("mapAlternatiba").style.display = "initial";
$("#afficheUp").removeClass('fa fa-angle-double-down').addClass('fa fa-angle-double-up');
}
});
setTitle("Alternatiba"); setTitle("Alternatiba");
$("#afficheMap").click(function(){
if (document.getElementById("mapAlternatiba").style.display == "initial") {
document.getElementById("mapAlternatiba").style.display = "none";
$("#afficheUp").removeClass('fa fa-angle-double-up').addClass('fa fa-angle-double-down');
}else{
document.getElementById("mapAlternatiba").style.display = "initial";
$("#afficheUp").removeClass('fa fa-angle-double-down').addClass('fa fa-angle-double-up');
}
});
var mapAlternatibaHome = {}; var mapAlternatibaHome = {};
var paramsMapAlternatiba = {}; var paramsMapAlternatiba = {};
initAlternatibaMapView(); initAlternatibaMapView();
$("#bg-homepage").removeClass("inline-block"); urlNews = "/news/co/index/type/"+costum.contextType+"/id/"+costum.contextId+"/formCreate/false/nbCol/1/scroll/false";
$("#bg-homepage").removeClass("pull-left");
urlNews = "/news/co/index/type/"+costum.contextType+"/id/"+costum.contextId+"/formCreate/false/nbCol/2/scroll/false";
ajaxPost("#newsstream",baseUrl+"/"+urlNews,{search:true, formCreate:false, scroll:false,nbCol : 1}, function(news){}, "html"); ajaxPost("#newsstream",baseUrl+"/"+urlNews,{search:true, formCreate:false, scroll:false,nbCol : 1}, function(news){}, "html");
});
$("#second-search-bar").off().on("keyup",function(e){
$("#input-search-map").val($("#second-search-bar").val());
$("#second-search-xs-bar").val($("#second-search-bar").val());
if(e.keyCode == 13){
mylog.log("searchObject.text",searchObject.text);
searchObject.text=$(this).val();
searchObject.sourceKey=costum.slug;
myScopes.type="open";
myScopes.open={};
startGlobalSearch(0, indexStepGS);
$("#dropdown").css('display','block');
}
});
$("#second-search-xs-bar").off().on("keyup",function(e){
$("#input-search-map").val($("#second-search-xs-bar").val());
$("#second-search-bar").val($("#second-search-xs-bar").val());
if(e.keyCode == 13){
mylog.log("searchObject.text",searchObject.text);
searchObject.text=$(this).val();
searchObject.sourceKey=costum.slug;
myScopes.type="open";
myScopes.open={};
startGlobalSearch(0, indexStepGS);
$("#dropdown").css('display','block');
}
});
$("#second-search-bar-addon-alternatiba, #second-search-xs-bar-addon").off().on("click", function(){
$("#input-search-map").val($("#second-search-bar").val());
mylog.log("searchObject.text",searchObject.text);
searchObject.text=$("#second-search-bar").val();
searchObject.sourceKey=costum.slug;
myScopes.type="open";
myScopes.open={};
startGlobalSearch(0, indexStepGS);
$("#dropdown").css('display','block');
});
function initAlternatibaMapView(){ function initAlternatibaMapView(){
alternatiba.initScopeObj(); alternatiba.initScopeObj();
......
...@@ -39,6 +39,7 @@ if( isset($this->costum["tpls"][$keyTpl]) ) { ...@@ -39,6 +39,7 @@ if( isset($this->costum["tpls"][$keyTpl]) ) {
.plus-img { .plus-img {
width: 39%; width: 39%;
height: auto; height: auto;
margin-left: 9vw;
} }
</style> </style>
......
Supports Markdown
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