Commit 008f9257 authored by Pierre Goubeaux's avatar Pierre Goubeaux
Browse files

tpl et modif alternatiba

parent 195b7cdc
......@@ -2,8 +2,6 @@
background-color: white;
color: #098048 !important;
border-radius: 20px !important;
margin-top: 2vw;
margin-bottom: 2vw;
}
#newsstream {
......@@ -37,7 +35,6 @@
#second-search-bar-addon-alternatiba{
position: relative;
left: 2.5%;
margin-top: 3%;
}
......@@ -67,8 +64,8 @@
}
.text-one{
background-color: white;
color: #098048;
background-color: #098048;
color: white;
font-family: 'Helvetica';
font-size: 37px;
margin-left: 29vw;
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg class="ArrowLeft" fill="black" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 240.823 240.823" style="enable-background:new 0 0 240.823 240.823;" xml:space="preserve">
<g>
<path id="Chevron_Right" d="M57.633,129.007L165.93,237.268c4.752,4.74,12.451,4.74,17.215,0c4.752-4.74,4.752-12.439,0-17.179
l-99.707-99.671l99.695-99.671c4.752-4.74,4.752-12.439,0-17.191c-4.752-4.74-12.463-4.74-17.215,0L57.621,111.816
C52.942,116.507,52.942,124.327,57.633,129.007z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg class="ArrowRight" fill="black" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 240.823 240.823" style="enable-background:new 0 0 240.823 240.823;" xml:space="preserve">
<g>
<path id="Chevron_Right" d="M57.633,129.007L165.93,237.268c4.752,4.74,12.451,4.74,17.215,0c4.752-4.74,4.752-12.439,0-17.179
l-99.707-99.671l99.695-99.671c4.752-4.74,4.752-12.439,0-17.191c-4.752-4.74-12.463-4.74-17.215,0L57.621,111.816
C52.942,116.507,52.942,124.327,57.633,129.007z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
This diff is collapsed.
......@@ -22,7 +22,8 @@ $cssAnsScriptFilesTheme = array(
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModuleMap, Yii::app()->getModule( Map::MODULE )->getAssetsUrl() );
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl);
HtmlHelper::registerCssAndScriptsFiles($cssAndScriptFilesModule, Yii::app()->getModule( "co2" )->getAssetsUrl());
$logo = $this->costum["logo"];
......@@ -42,9 +43,15 @@ $cssAnsScriptFilesTheme = array(
<style type="text/css">
@font-face{
font-family: "Helvetica";
src: url("<?php echo Yii::app()->getModule("costum")->getAssetsUrl() ?>/font/alternatiba/Helvetica.otf")
}
font-family: "Helvetica";
src: url("<?php echo Yii::app()->getModule("costum")->getAssetsUrl() ?>/font/alternatiba/Helvetica.otf")
}
#dropdown{
background-color:whitesmoke;
width: 59%;
z-index: 1000;
}
</style>
<div class="text-center row">
......@@ -53,25 +60,28 @@ $cssAnsScriptFilesTheme = array(
<div class="one col-xs-12">
<center>
<img class="img-responsive img-one" src="<?php echo Yii::app()->getModule('costum')->assetsUrl;?>/images/alternatiba/logo1.svg">
<p class="text-one col-xs-10 col-lg-5 col-sm-8">Ensemble nous sommes une force</p>
<div style="margin-left: 18vw;" class="hidden-xs col-xs-8" id="searchBar">
<a data-type="filters" href="javascript:;">
<span id="second-search-bar-addon-alternatiba" class="text-white input-group-addon pull-left main-search-bar-addon-mednum">
<i id="fa-search" class="fa fa-search"></i>
</span>
</a>
<input type="text" class="form-control pull-left text-center main-search-bars" id="second-search-bar" placeholder="Une recherche">
</div>
<!-- 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>
</center>
</div>
<img class="img-responsive seconde-img-one" src="<?php echo Yii::app()->getModule('costum')->assetsUrl;?>/images/alternatiba/img-01.jpg">
</div>
<p style="margin-top: 2vw;margin-bottom: 2vw;" class="text-one col-xs-10 col-lg-5 col-sm-8">Ensemble nous sommes une force</p>
<!-- SearchBar -->
<div style="margin-left: 18vw;" class="hidden-xs col-xs-8" id="searchBar">
<a data-type="filters" href="javascript:;">
<span id="second-search-bar-addon-alternatiba" class="text-white input-group-addon pull-left main-search-bar-addon-mednum">
<i id="fa-search" class="fa fa-search"></i>
</span>
</a>
<input type="text" class="form-control pull-left text-center main-search-bars" id="second-search-bar" placeholder="Une recherche">
</div>
<!-- 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>
<div class="col-xs-12">
<center>
......@@ -170,7 +180,8 @@ $cssAnsScriptFilesTheme = array(
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");
});
function initAlternatibaMapView(){
alternatiba.initScopeObj();
......
<?php
$defaultColor = "green";
$structField = "structags";
$element = array();
$i = 1;
?>
<div id="community" class="container tplsCommunity">
<!-- LA ZONE EST MINÉE -->
<?php
if(isset($this->costum["tpls"]["community"])){
foreach($this->costum["tpls"]["community"]["data"] as $key => $value){
$community = Organization::getMembersByOrganizationId($this->costum["contextId"],"organizations");
foreach ($community as $keyElt => $valueElt) {
array_push($element,Element::getElementSimpleById($keyElt,"organizations",null,["name", "profilMediumImageUrl"]));
}
if (!empty($element)) {
$costum = CacheHelper::getCostum();
?>
<div class="col-md-4 communityCms">
<div class="communityCms-<?= $value["title"]; ?>">
<img src="<?= Yii::app()->getModule("costum")->assetsUrl.$value["img"]; ?>" class="img-responsive" style="text-align: center">
<h2 class="text-center"> <?= $value["title"]; ?></h2>
</div>
</div>
<div id="communityblock" class="col-xs-12">
<?php
foreach ($element as $k => $v) {
if (empty($v["profilMediumImageUrl"]) || $v["profilMediumImageUrl"]== null ) {
$img = Yii::app()->getModule('costum')->assetsUrl."/images/templates/default_directory.png";
}else{
$img = Yii::app()->baseUrl.$v["profilMediumImageUrl"];
}
if ($i <= 3) {
?>
<div class="card">
<div class="card-color col-md-4">
<div class="info-card text-center">
<a class="<?= $v["name"]?> bold text-dark add2fav lbh-preview-element" href="#page.type.organizations.id.<?= $v["_id"]?>">
<div style="border-radius: 10px;box-shadow: 0vw 0vw 1vw -5px gray;">
<img style="border-radius:100vw;" class="img-responsive" src="<?= $img ?>"><br>
</div>
<p style="margin-top:1vw;color:black"><?= $v["name"] ?>
</a>
</div>
</div>
</div>
<?php
}
if($canEdit){ ?>
<a class='btn btn-xs btn-danger editTpl' href='javascript:;' data-id='<?= ["contextId"]; ?>' data-collection='<?= ["contextType"]; ?>' data-key='communityblock' data-path='costum.tpls.communityblock'><i class='fa fa-pencil'></i></a>
<a class='btn btn-xs btn-danger deleteLine' href='javascript:;' data-id='<?= ["contextId"]; ?>' data-collection='<?= ["contextType"]; ?>' data-key='communityblock' data-path='costum.tpls.communityblock'><i class='fa fa-trash'></i></a>
<?php }
} ?>
$i++;}else{
}
}
?>
</div>
<?php
}else{
?>
<div class="col-xs-12">Aucune organisation membre dans la communauté</div>
<?php
}
?>
</div>
<?php
/**
* TPLS QUI PERMET AFFICHAGE DES 3 DERNIERS NOUVEAUTÉS
* MODÈLE INSPIRER DU COSTUM FILIÈRE NUMÉRIQUE
* POSSIBILITÉ DE PARAMS LA COULEUR DE INFO
*/
$keyTpl = "blockEventDescription";
$defaultcolor = "white";
$tags = "structags";
$bk = (@$this->costum["tpls"]["events"]["blockEventDescription"]["background"] && !empty($this->costum["tpls"]["events"]["blockEventDescription"]["background"])) ? $this->costum["tpls"]["events"]["blockEventDescription"]["background"] : "black";
$color = (@$this->costum["tpls"]["events"]["blockEventDescription"]["color"] && !empty($this->costum["tpls"]["events"]["blockEventDescription"]["color"])) ? $this->costum["tpls"]["events"]["blockEventDescription"]["color"] : "white";
$paramsData = [ "colorBorderCard" => "",
"title" => "",
"icon" => "",
"color" => "",
"background" => "",
"defaultcolor" => "white",
"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];
}
}
?>
<style>
.img{
height: 220px;
width: 396px;
border: solid 6px <?= $bk; ?>;
}
.plus {
width: 39%;
height: auto;
}
</style>
<div id="containEvent" class="col-xs-12">
<?php
$i = 0;
// A crée dans un modèle a part ce code
date_default_timezone_set('UTC');
//On récupère sur ce mois-ci les évènements
$date_array = getdate ();
$numdays = $date_array["wday"];
$endDate = strtotime(date("Y-m-d H:i", time() + ((30 - $numdays) * 24*60*60)));
$startDate = strtotime(date("Y-m-d H:i"));
// Préparation de la requête
$where = array("source.key" => $this->costum["contextSlug"],
"startDate" => array('$gte' => new MongoDate($startDate)),
"endDate" => array('$lt' => new MongoDate($endDate)));
// var_dump($where);exit;
$allEvent = PHDB::find(Event::COLLECTION, $where);
// var_dump($allEvent);exit;
if($allEvent){
// $date = new DateTime();
?>
<style type="text/css">
.ArrowLeft{
width: 3vw;
margin-top: 7vw;
margin-left: -11vw;
}
.ArrowRight{
transform: rotate(180deg);
width: 3vw;
margin-top: 7vw;
margin-left: 6vw;
}
</style>
<div class="carousel-inner itemctr">
<div class="item active">
<?php
foreach($allEvent as $key => $value){
$date = date(DateTime::ISO8601, $value["startDate"]->sec);
$img = (isset($value["profilImageUrl"])) ? $value["profilImageUrl"] : "/images/templateCostum/no-banner.jpg";
if (!empty($value["shortDescription"]) && isset($value["shortDescription"])) {
$description = $value["shortDescription"];
}else{
$description = "Aucune description";
}
if ($i >= 3) {
?>
</div>
<div class="item">
<?php
$i = 0;
}
$i++;
?>
<div class="card text-center">
<div id="event" class="card-color col-md-4">
<img class="img" src="<?php echo Yii::app()->getModule('costum')->assetsUrl.$img ?>">
<p class="name-event"><?= $value["name"]; ?></p>
<p class="text-center"><?= $description ;?></p>
<a id="plus" class="undefined entityName bold text-dark add2fav lbh-preview-element" href="#page.type.events.id.<?= $value["_id"]; ?>">
<!-- <img class="img-responsive plus" src="<?php echo Yii::app()->getModule('costum')->assetsUrl;?>/images/alternatiba/plus-01.svg"> -->
<svg class="plus" id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 47.39 11.85"><defs><style>.cls-1{fill:black;}.cls-2{font-size:5.92px;fill:#fff;font-family:Helvetica-Bold, Helvetica;font-weight:700;}</style></defs><title>bouton en savoir plus </title><rect class="cls-1" width="47.39" height="11.85" rx="5.92"/><text class="cls-2" transform="translate(5.95 7.57) scale(0.9 1)">En savoir plus</text></svg>
</a>
</div>
</div>
<?php } ?>
</div>
<div id="arrow-caroussel">
<a style="opacity: 1" class="carousel-control" href="#docCarousel" data-slide="prev">
<?php echo $this->renderPartial("costum.assets.images.templates.ArrowLeft"); ?>
<span class="sr-only">Previous</span>
</a>
<a style="opacity:1;margin-left: 84vw;" class="carousel-control" href="#docCarousel" data-slide="next">
<?php echo $this->renderPartial("costum.assets.images.templates.ArrowRight"); ?>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<?php
}
else echo "Aucun évènement n'est prévu";
?>
<?php
echo $this->renderPartial("costum.views.tpls.editTplBtns", ["canEdit" => $canEdit, "keyTpl"=>$keyTpl]);
?>
<script type="text/javascript">
sectionDyf.<?php echo $keyTpl ?>ParamsData = <?php echo json_encode( $paramsData ); ?>;
jQuery(document).ready(function() {
sectionDyf.<?php echo $keyTpl ?>Params = {
"jsonSchema" : {
"title" : "Configurer la section bloc d'évènement",
"description" : "Personnaliser votre section sur les blocs d'évènement",
"icon" : "fa-cog",
"properties" : {
"title" : {
label : "Titre",
values : sectionDyf.<?php echo $keyTpl ?>ParamsData.title
},
icon : { label : "Icone",
inputType : "select",
options : {
"fa-newspaper-o" : "Newspapper",
"fa-calendar " : "Calendar",
"fa-lightbulb-o " :"Lightbulb"
},
value : "text"
},
"color" : {
label : "Couleur du texte",
inputType : "colorpicker",
values : sectionDyf.<?php echo $keyTpl ?>ParamsData.color
},
"background" : {
label : "Couleur du fond",
inputType : "colorpicker",
values : sectionDyf.<?php echo $keyTpl ?>ParamsData.background
},
defaultcolor : {
label : "Couleur",
inputType : "colorpicker",
values : sectionDyf.<?php echo $keyTpl ?>ParamsData.defaultcolor
},
tags : {
inputType : "tags",
label : "Tags",
values : sectionDyf.<?php echo $keyTpl ?>ParamsData.tags
}
},
save : function () {
tplCtx.value = {};
$.each( sectionDyf.<?php echo $keyTpl ?>Params.jsonSchema.properties , function(k,val) {
tplCtx.value[k] = $("#"+k).val();
});
console.log("save tplCtx",tplCtx);
if(typeof tplCtx.value == "undefined")
toastr.error('value cannot be empty!');
else {
dataHelper.path2Value( tplCtx, function(params) {
$("#ajax-modal").modal('hide');
location.reload();
} );
}
}
}
};
$(".edit<?php echo $keyTpl ?>Params").off().on("click",function() {
tplCtx.id = $(this).data("id");
tplCtx.collection = $(this).data("collection");
tplCtx.path = $(this).data("path");
dyFObj.openForm( sectionDyf.<?php echo $keyTpl ?>Params,null, sectionDyf.<?php echo $keyTpl ?>ParamsData);
});
});
</script>
</div>
\ No newline at end of file
......@@ -20,20 +20,20 @@ if( isset($this->costum["tpls"][$keyTpl]) ) {
$paramsData[$i] = $this->costum["tpls"][$keyTpl][$i];
}
}
$i = 1;
$y = 0;
$z= 1;
while($i < 8){
$z++;
$i++;
if($y < 3){
$listStep[$z][$y] = Poi::getPoiByStruct($poiList, "stepCaroussel".$i,$structags )[0];
$y++;
if($y > 3) $y=0;
}
echo $z; echo $y;
// $i = 1;
// $y = 0;
// $z= 1;
// while($i < 8){
// $z++;
// $i++;
// if($y < 3){
// $listStep = Poi::getPoiByStruct($poiList, "stepCaroussel".$i,$structags );
// $y++;
// if($y > 3) $y=0;
// }
// echo $z; echo $y;
}
var_dump($listStep);exit;
// var_dump($listStep);exit;
?>
<div id="wizardCaroussel" class="col-xs-12" style="margin-top: 2%;">
......
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