Commit 195b7cdc authored by tonyemma's avatar tonyemma
Browse files

add tpls projets, modifier logo costrasbourg + css, creation model...

add tpls projets, modifier logo costrasbourg + css, creation model CostumGenerique, debut reorganisation des dossiers tpls
parent 1faa9a13
assets/images/costrasbourg/logo.png

215 KB | W: | H:

assets/images/costrasbourg/logo.png

354 KB | W: | H:

assets/images/costrasbourg/logo.png
assets/images/costrasbourg/logo.png
assets/images/costrasbourg/logo.png
assets/images/costrasbourg/logo.png
  • 2-up
  • Swipe
  • Onion skin
<?php
class CostumgeneriqueController extends CommunecterController {
protected function beforeAction($action) {
//parent::initPage();
return parent::beforeAction($action);
}
public function actions(){
return array(
'getprojects' => 'costum.controllers.actions.costumgenerique.GetProjectsAction'
);
}
//public function actionPersondah
/*public function actionIndex()
{
if(Yii::app()->request->isAjaxRequest)
echo $this->renderPartial("../default/index");
else
$this->render("index");
//$this->redirect(Yii::app()->createUrl( "/".Yii::app()->params["module"]["parent"] ));
}*/
}
<?php
class GetProjectsAction extends CAction{
public function run($id = null,$type= null,$slug = null, $view = null, $page =null){
$controller = $this->getController();
$params = CostumGenerique::getProjects($_POST);
Rest::json($params);
}
}
\ No newline at end of file
......@@ -10,6 +10,63 @@
"filters" : {
"sourceKey" : true
},
"dynForm" : {
"jsonSchema" : {
"title" : "Template config",
"type" : "object",
"properties" : {
"text1" : {
"label" : "Text 1",
"inputType" : "textarea",
"path" : "costum.text1"
},
"logoMin" : {
"label" : "Image Logo",
"inputType" : "text",
"path" : "costum.logoMin"
},
"elementBanner" : {
"label" : "Image Banière",
"inputType" : "image",
"path" : "costum.elementBanner"
},
"color1" : {
"label" : "Couleur 1",
"inputType" : "colorpicker",
"path" : "costum.colors.pink"
},
"color2" : {
"label" : "Couleur 2",
"inputType" : "colorpicker",
"path" : "costum.colors.dark"
},
"typeObj" : {
"label" : "Selectionnez les éléments qui peuvent etre ajouter",
"inputType" : "select",
"placeholder" : "---- Things that can be added ----",
"options" : {
"poi" : "Point of Interests",
"organization" : "Organization",
"project" : "projects",
"event" : "Events",
"person" : "People",
"proposal" : "Proposals"
},
"path" : "costum.slug"
},
"menuApp" : {
"label" : "Selectionnez les modules qui peuvent etre ajouter",
"inputType" : "select",
"placeholder" : "---- Active Modules ----",
"options" : {
"search" : "Search",
"agenda" : "Agenda"
},
"path" : "costum.slug"
}
}
}
},
"htmlConstruct" : {
"appRendering" : "vertical",
"redirect" : {
......@@ -75,13 +132,13 @@
"directory" : {
"results" : {
"organizations" : {
"defaultImg" : "/images/coeurNumerique/default_directory.png"
"defaultImg" : "/images/filiereCostum/no-banner.jpg"
},
"projects" : {
"defaultImg" : "/images/coeurNumerique/default_directory.png"
"defaultImg" : "/images/filiereCostum/no-banner.jpg"
},
"events" : {
"defaultImg" : "/images/coeurNumerique/default_directory.png"
"defaultImg" : "/images/filiereCostum/no-banner.jpg"
}
},
"preview" : true,
......@@ -162,7 +219,7 @@
"loader" : {
"background" : "white",
"ring1" : {
"color" : "#6abea2",
"color" : "#8ec641",
"height" : 360,
"width" : 360,
"left" : -15,
......@@ -170,7 +227,7 @@
"top" : -35
},
"ring2" : {
"color" : "#313757",
"color" : "#669933",
"height" : 350,
"width" : 350,
"left" : -10,
......@@ -180,7 +237,7 @@
},
"progress" : {
"value" : {
"background" : "#313757"
"background" : "#8ec641"
},
"bar" : {
"background" : "red"
......@@ -204,7 +261,7 @@
"display" : "none"
},
"connectBtn" : {
"background" : "#313757",
"background" : "#8ec641",
"color" : "white",
"fontSize" : 18,
"borderRadius" : 10,
......@@ -270,6 +327,7 @@
"#live" : {
"subdomainName" : "L'actualité",
"class" : "Annuaire",
"slug" : "costrasbourg2",
"formCreate" : false,
"useFilter" : false,
"viewMode" : "list"
......
<?php
class CostumGenerique{
const COLLECTION = "costum";
const CONTROLLER = "costum";
const MODULE = "costum";
public static function getProjects($post){
$params = array(
"result" => false
);
$limit = @$post["limit"] ? $post["limit"] : 3;
$allProjet = PHDB::findAndLimitAndIndex("projects",array("source.key" => $post["source"]), $limit);
if($allProjet){
$params = array(
"result" => true
);
$res["elt"] = array();
foreach($allProjet as $key => $value){
array_push($res["elt"], array(
"id" => (String) $value["_id"],
"name" => $value["name"],
"slug" => $value["slug"],
"description" => (@$value["description"] ? $value["description"] : "Non renseigné"),
"shortDescription" => (@$value["shortDescription"] ? $value["shortDescription"] : "Non renseigné"),
"profilMediumImageUrl" => @$value["profilMediumImageUrl"] ? $value["profilMediumImageUrl"] : "none")
);
}
return array_merge($params,$res);
}
return $params;
}
}
\ No newline at end of file
......@@ -20,7 +20,8 @@ section{
.header{
background-image : url(<?= Yii::app()->getModule("costum")->assetsUrl; ?>/images/costrasbourg/header.jpg);
background-size: cover;
padding: 15%;
padding: 25%;
margin-top : -3%;
}
.bloc{
margin-top: 4%;
......@@ -44,7 +45,7 @@ h1{
padding : 2%;
}
.title{
color: white;
color: black;
}
.logo{
margin-top: -50%;
......@@ -62,12 +63,14 @@ h1{
}
</style>
<?php
$params = [ "tpl" => "costrasbourg2","slug"=>$this->costum["slug"],"canEdit"=>false,"el"=>$el ];
echo $this->renderPartial("costum.views.tpls.acceptAndAdmin", $params,true );
?>
<!-- HEADER -->
<div class="header text-center">
<span class="test" style="padding-top: -1%;">
<span class="title" style="font-size: 10vw;"><b>Co</b>Strasbourg</span> <br>
<span class="title" style="font-size: 3vw;">booster la résilience à Strasbourg
</span>
</div>
<div class="logo">
<img src="<?= Yii::app()->getModule("costum")->assetsUrl; ?>/images/costrasbourg/logo.png" class="img-responsive">
......@@ -77,12 +80,11 @@ h1{
<div class="bloc">
<h1 class="text-center bloc-h1 h1nocolor">
<span style="text-decoration: underline;"><i class="fa fa-newspaper-o" aria-hidden="true"></i>
<span style="text-decoration: underline; text-underline-position: under;"><i class="fa fa-newspaper-o" aria-hidden="true"></i>
Actua</span>lités</h1>
<div class="container bloc-container">
<center>
<div id="newsstream" style="width: 95%;">
</div>
<?= $this->renderPartial("costum.views.tpls.news", array("canEdit" => false)); ?>
</center>
</div>
</div>
......@@ -102,12 +104,10 @@ h1{
<!-- Projet -->
<div class="bloc">
<h1 class="text-center bloc-h1 h1nocolor">
<span style="text-decoration: underline;"><i class="fa fa-lightbulb-o" aria-hidden="true"></i>
<span style="text-decoration: underline; text-underline-position: under;"><i class="fa fa-lightbulb-o" aria-hidden="true"></i>
Proj</span>ets</h1>
<div class="container bloc-container">
<div id="content-results-project">
</div>
</div>
<?= $this->renderPartial("costum.views.tpls.projects.projectsCarousel", array("limit" => 9, "color" => "#b1b1b1")); ?>
</div>
<!-- Espace entraide -->
......@@ -116,8 +116,7 @@ Proj</span>ets</h1>
<i class="fa fa-cubes" aria-hidden="true"></i>
Espace d'entraide</h1>
<div class="container bloc-container">
<div id="content-results-ressources">
</div>
<?= $this->renderPartial("costum.views.tpls.app.ressource"); ?>
</div>
<div class="text-center" style="color : #8ec641; font-size: 5vw; padding: 1%;"> <i class="fa fa-plus-circle" aria-hidden="true"></i>
......@@ -127,123 +126,23 @@ Espace d'entraide</h1>
<!-- Démocratie -->
<div class="bloc" style="margin-bottom : 4%">
<h1 class="text-center bloc-h1 h1nocolor">
<span style="text-decoration: underline;"><i class="fa fa-gavel" aria-hidden="true"></i>
<span style="text-decoration: underline; text-underline-position: under;"><i class="fa fa-gavel" aria-hidden="true"></i>
Démoc</span>ratie</h1>
<div class="container bloc-container">
<div id="content-results-dda">
</div>
<?= $this->renderPartial("costum.views.tpls.app.dda"); ?>
</div>
<div class="text-center" style="color : #8ec641; font-size: 5vw; padding: 1%;">
<div class="text-center " style="color : #8ec641; font-size: 5vw; padding: 1%;">
<a href="javascript:;" data-hash="#dda" class="lbh-menu-app " style="text-decoration : none;"> <i class="fa fa-plus-circle" aria-hidden="true"></i> </a>
<a href="javascript:;" data-hash="#dda" class="lbh-menu-app " style="text-decoration : none; color: #8ec641;"> <i class="fa fa-plus-circle" aria-hidden="true"></i> </a>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
pageProfil.views.directoryProjects = function(){
var donnee = {
"pageProfil.params.dir" : "projects",
"contextData.type" : costum.contextType,
"limit" : 3
} ;
// donnee["pageProfil.params.dir"]=(!notEmpty(donnee["pageProfil.params.dir"])) ? donnee["links"][donnee["contextData.type"]] : donnee["pageProfil.params.dir"];
getAjax('', baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+donnee["contextData.type"]+'/id/'+costum.contextId+'/dataName/'+donnee["pageProfil.params.dir"]+'/limit/'+donnee["limit"]+'?tpl=json',
function(data){
var type = ($.inArray(donnee["pageProfil.params.dir"], ["poi","ressources","vote","actions","discuss"]) >=0) ? donnee["pageProfil.params.dir"] : null;
if(typeof donnee["pageProfil.params.dir"] != "undefined" && donnee["pageProfil.params.dir"])
canEdit=donnee["pageProfil.params.dir"];
mylog.log("DATA HERE", data);
var html = "";
html = html + directory.showResultsDirectoryHtml(data, null, null, canEdit);
$("#content-results-project").html(html);
if(typeof mapCO != "undefined"){
mapCO.clearMap();
mapCO.addElts(data);
mapCO.map.invalidateSize();
}
coInterface.bindButtonOpenForm();
}
,"html");
};
pageProfil.views.directoryProjects();
//Ressource
pageProfil.views.directoryRessources = function(){
var donnee = {
"pageProfil.params.dir" : "classifieds",
"contextData.type" : costum.contextType
} ;
getAjax('', baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+costum.contextType+'/id/'+costum.contextId+'/dataName/ressources?tpl=json',
function(data){
var type = ($.inArray(donnee["pageProfil.params.dir"], ["poi","ressources","vote","actions","discuss"]) >=0) ? donnee["pageProfil.params.dir"] : null;
if(typeof donnee["pageProfil.params.dir"] != "undefined" && donnee["pageProfil.params.dir"])
canEdit=donnee["pageProfil.params.dir"];
mylog.log("DATA HERE", data);
var html = "";
html = html + directory.showResultsDirectoryHtml(data, null, null, canEdit);
$("#content-results-ressources").html(html);
if(typeof mapCO != "undefined"){
mapCO.clearMap();
mapCO.addElts(data);
mapCO.map.invalidateSize();
}
coInterface.bindButtonOpenForm();
}
,"html");
};
pageProfil.views.directoryDda = function(){
var donnee = {
"pageProfil.params.dir" : "proposals",
"contextData.type" : costum.contextType
} ;
getAjax('', baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+costum.contextType+'/id/'+costum.contextId+'/dataName/surveys?tpl=json',
function(data){
var type = ($.inArray(donnee["pageProfil.params.dir"], ["poi","ressources","vote","actions","discuss"]) >=0) ? donnee["pageProfil.params.dir"] : null;
if(typeof donnee["pageProfil.params.dir"] != "undefined" && donnee["pageProfil.params.dir"])
canEdit=donnee["pageProfil.params.dir"];
mylog.log("DATA HERE", data);
var html = "";
html = html + directory.showResultsDirectoryHtml(data, null, null, canEdit);
$("#content-results-dda").html(html);
if(typeof mapCO != "undefined"){
mapCO.clearMap();
mapCO.addElts(data);
mapCO.map.invalidateSize();
}
coInterface.bindButtonOpenForm();
}
,"html");
};
pageProfil.views.directoryProjects();
pageProfil.views.directoryRessources();
pageProfil.views.directoryDda();
urlNews = "/news/co/index/type/"+costum.contextType+"/id/"+costum.contextId+"/formCreate/false/nbCol/5/scroll/false";
var mapCoStrabourgHome = {};
ajaxPost("#newsstream",baseUrl+"/"+urlNews,{search:true, formCreate:false, scroll:false}, function(news){}, "html");
var mapPossessionHome = {};
var paramsMapPossession = {};
......@@ -301,7 +200,6 @@ var possession={
popup += '</div></a>';
popup += '</div>';
popup += '</div>';
console.log(popup);
return popup;
};
}
......
<?php
/**
* TPLS QUI PERMET AFFICHAGE DES NEWS
*/
$keyTpl = "dda";
$defaultcolor = "white";
$tags = "structags";
$limit = @$limit ? $limit : 12;
$paramsData = [ "title" => "",
"limit" => $limit,
"tags" => "structags"
];
if( isset($this->costum["tpls"][$keyTpl]) ) {
foreach ($paramsData as $i => $v) {
if( isset($this->costum["tpls"][$keyTpl][$i]) )
$paramsData[$i] = $this->costum["tpls"][$keyTpl][$i];
}
}
?>
<div id="content-results-dda">
</div>
<script type="text/javascript">
$(document).ready(function(){
pageProfil.views.directoryDda = function(){
var donnee = {
"pageProfil.params.dir" : "proposals",
"contextData.type" : costum.contextType
} ;
getAjax('', baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+costum.contextType+'/id/'+costum.contextId+'/dataName/surveys/limit/12?tpl=json',
function(data){
var type = ($.inArray(donnee["pageProfil.params.dir"], ["poi","ressources","vote","actions","discuss"]) >=0) ? donnee["pageProfil.params.dir"] : null;
if(typeof donnee["pageProfil.params.dir"] != "undefined" && donnee["pageProfil.params.dir"])
canEdit=donnee["pageProfil.params.dir"];
mylog.log("DATA HERE", data);
var html = "";
html = html + directory.showResultsDirectoryHtml(data, null, null, canEdit);
$("#content-results-dda").html(html);
if(typeof mapCO != "undefined"){
mapCO.clearMap();
mapCO.addElts(data);
mapCO.map.invalidateSize();
}
coInterface.bindButtonOpenForm();
}
,"html");
};
// pageProfil.views.directoryProjects();
pageProfil.views.directoryDda();
});
</script>
\ No newline at end of file
<?php
/**
* TPLS QUI PERMET AFFICHAGE DES NEWS
*/
$keyTpl = "ressource";
$defaultcolor = "white";
$tags = "structags";
$limit = @$limit ? $limit : 12;
$paramsData = [ "title" => "",
"limit" => $limit,
"tags" => "structags"
];
if( isset($this->costum["tpls"][$keyTpl]) ) {
foreach ($paramsData as $i => $v) {
if( isset($this->costum["tpls"][$keyTpl][$i]) )
$paramsData[$i] = $this->costum["tpls"][$keyTpl][$i];
}
}
?>
<div id="content-results-ressources">
</div>
<script type="text/javascript">
$(document).ready(function(){
//Ressource
pageProfil.views.directoryRessources = function(){
var donnee = {
"pageProfil.params.dir" : "classifieds",
"contextData.type" : costum.contextType
} ;
getAjax('', baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+costum.contextType+'/id/'+costum.contextId+'/dataName/ressources/limit/<?= $limit ?>?tpl=json',
function(data){
var type = ($.inArray(donnee["pageProfil.params.dir"], ["poi","ressources","vote","actions","discuss"]) >=0) ? donnee["pageProfil.params.dir"] : null;
if(typeof donnee["pageProfil.params.dir"] != "undefined" && donnee["pageProfil.params.dir"])
canEdit=donnee["pageProfil.params.dir"];
mylog.log("DATA HERE", data);
var html = "";
html = html + directory.showResultsDirectoryHtml(data, null, 3, canEdit);
$("#content-results-ressources").html(html);
if(typeof mapCO != "undefined"){
mapCO.clearMap();
mapCO.addElts(data);
mapCO.map.invalidateSize();
}
coInterface.bindButtonOpenForm();
}
,"html");
};
pageProfil.views.directoryRessources();
});
</script>
\ No newline at end of file
<?php
$keyTpl = "mapbasic";
$paramsData = [ "title" => "",
"color" => "",
"latitude" => "",
"longitude" => "",
"cities" => "FR",
"type" => []
];
if( isset($this->costum["tpls"][$keyTpl]) ) {
foreach ($paramsData as $i => $v) {
if( isset($this->costum["tpls"][$keyTpl][$i]) )
$paramsData[$i] = $this->costum["tpls"][$keyTpl][$i];
}
}
?>
<div class="col-xs-12 mapBackground no-padding" id="mapBasic"></div>
<script type="text/javascript">
$(document).ready(function(){
var mapBasicHome = {};
var paramsMapBasic = {};
initBasicMapView();
});
var basic={
initScopeObj : function(){
$(".content-input-scope-basic").html(scopeObj);
var params = {
subParams : {
cities : {
type : ["cities"],
country : ["FR"]
}
}
}
scopeObj.initVar(params);
scopeObj.init();
},
mapDefault : function(){
mapCustom.popup.default = function(data){
mylog.log("mapCO mapCustom.popup.default", data);
var id = (typeof data.id != "undefined") ? data.id : data._id.$id ;
var imgProfil = mapCustom.custom.getThumbProfil(data) ;
var popup = "";
popup += "<div class='padding-5' id='popup"+id+"'>";
popup += "<img src='" + imgProfil + "' height='30' width='30' class='' style='display: inline; vertical-align: middle; border-radius:100%;'>";
popup += "<span style='margin-left : 5px; font-size:18px'>" + data.name + "</span>";
if (typeof data.email != "undefined" && data.email != null ){
popup += "<div id='pop-contacts' class='popup-section'>";
popup += "<div class='popup-subtitle'>Contact</div>";
popup += "<div class='popup-info-profil'>";
popup += "<i class='fa fa-envelope fa_email'></i> <a href='mailto:"+data.email+"'>" + data.email+"</a>";