Merge remote-tracking branch 'origin' into dev-check-sold
This commit is contained in:
commit
b035d4022d
|
@ -0,0 +1,51 @@
|
|||
.mapael .map {
|
||||
background-color: #cddee0;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
/* For all zoom buttons */
|
||||
.mapael .zoomButton {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
color: #000;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
font-weight: bold;
|
||||
left: 10px;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select : none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select : none;
|
||||
user-select: none;
|
||||
}
|
||||
/* Reset Zoom button first */
|
||||
.mapael .zoomReset {
|
||||
top: 10px;
|
||||
}
|
||||
/* Then Zoom In button */
|
||||
.mapael .zoomIn {
|
||||
top: 30px;
|
||||
}
|
||||
/* Then Zoom Out button */
|
||||
.mapael .zoomOut {
|
||||
top: 50px;
|
||||
}
|
||||
.mapael .mapTooltip {
|
||||
position: absolute;
|
||||
background-color: #474c4b;
|
||||
moz-opacity: 0.70;
|
||||
opacity: 0.70;
|
||||
filter: alpha(opacity=70);
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
z-index: 1000;
|
||||
max-width: 200px;
|
||||
display: none;
|
||||
color: #fff;
|
||||
}
|
|
@ -229,8 +229,8 @@ function UpdateRecherchesDetails(nom_connecte) {
|
|||
$(document).ready(function () {
|
||||
// On récupère le nom de l'antenne dans l'url pour afficher les biens/services de celle-ci
|
||||
var url = document.location.href;
|
||||
var antenne_slug = url.split('/')[4];
|
||||
var affichage_slug = url.split('/')[5];
|
||||
var antenne_slug = url.split('/')[5];
|
||||
var affichage_slug = url.split('/')[6];
|
||||
var nom_connecte = $("#nom_connecte").text();
|
||||
|
||||
if (affichage_slug == 'produits') {
|
||||
|
|
|
@ -1,44 +1,31 @@
|
|||
<?php
|
||||
namespace App\Gmarche\Actions;
|
||||
|
||||
use App\Gmarche\Table\RegionTable;
|
||||
use Framework\Actions\RouterAwareAction;
|
||||
use Framework\Renderer\RendererInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class RegionIndexAction
|
||||
{
|
||||
|
||||
/**
|
||||
* @var RendererInterface
|
||||
*/
|
||||
private $renderer;
|
||||
|
||||
/**
|
||||
* @var RegionTable
|
||||
*/
|
||||
private $regionTable;
|
||||
|
||||
use RouterAwareAction;
|
||||
|
||||
public function __construct(
|
||||
RendererInterface $renderer,
|
||||
RegionTable $regionTable
|
||||
RendererInterface $renderer
|
||||
) {
|
||||
$this->renderer = $renderer;
|
||||
$this->regionTable = $regionTable;
|
||||
$this->renderer = $renderer;
|
||||
}
|
||||
|
||||
public function __invoke(Request $request)
|
||||
public function __invoke()
|
||||
{
|
||||
$params = $request->getQueryParams();
|
||||
$regions = $this->regionTable->findAll()->paginate(15, $params['p'] ?? 1);
|
||||
session_start();
|
||||
if (isset($_SESSION['user'])) {
|
||||
$nom_user = $_SESSION['user'];
|
||||
} else {
|
||||
$nom_user = '';
|
||||
}
|
||||
return $this->renderer->render('@gmarche/index', compact('nom_user','regions'));
|
||||
return $this->renderer->render('@gmarche/index', compact('nom_user'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,6 @@ class GmarcheModule extends Module
|
|||
$container->get(RendererInterface::class)->addPath('gmarche', __DIR__ . '/views');
|
||||
$router = $container->get(Router::class);
|
||||
$router->get("$gmarchePrefix", RegionIndexAction::class, 'gmarche.index');
|
||||
$router->get("$gmarchePrefix{slug:[a-z\-0-9]+}", AntenneShowAction::class, 'gmarche.antenne');
|
||||
$router->get("$gmarchePrefix{france}/{slug:[a-z\-0-9]+}", AntenneShowAction::class, 'gmarche.antenne');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
}
|
||||
.main {
|
||||
grid-area: main;
|
||||
/*justify-self: start;
|
||||
align-self: start;*/
|
||||
grid-column: 1 / 2;
|
||||
}
|
||||
.sidebar {
|
||||
|
@ -67,9 +65,6 @@
|
|||
</ul>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<!-- if antennes
|
||||
paginate(antennes, 'gmarche.antenne', {slug: slug})
|
||||
endif -->
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
|
|
|
@ -4,19 +4,107 @@
|
|||
Ğ1-Marché : Régions {% if page > 1 %}, page {{ page }} {% endif %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="container" style="height:auto; width:24rem; text-align:center;border: 0px">
|
||||
<img src="\images\logo_home.jpg" style="width:24rem;margin-left: 0px;"/>
|
||||
<div class="row card" style="width: 22rem;margin-left: 0.1rem;">
|
||||
<div class="container" style="height:auto; width:28rem; text-align:center;border: 0px">
|
||||
<img src="\images\logo_home.jpg" style="width:22rem;"/>
|
||||
<div class="row card" style="width:28rem;margin-left: -5.1rem;">
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for region in regions %}
|
||||
<a style="color:black;" href="{{ path('gmarche.antenne', {slug: region.slug, id: region.id} ) }}" title="{{ region.name }}">
|
||||
<li class="liste_regions list-group-item" style="padding: .2rem 1.25rem;">
|
||||
{{ region.name }}
|
||||
</li>
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="mapcontainer">
|
||||
<div class="map">
|
||||
<span>Alternative content for the map</span>
|
||||
</div>
|
||||
<div class="areaLegend"></div>
|
||||
<div class="plotLegend"></div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- paginate(regions, 'gmarche.index') -->
|
||||
{% endblock %}
|
||||
<script type="text/javascript">
|
||||
$(".container").mapael({
|
||||
map: {
|
||||
name: 'france_regions_2016',
|
||||
zoom: {
|
||||
//enabled: true
|
||||
},
|
||||
defaultArea: {
|
||||
attrs: {
|
||||
'fill': 'green',
|
||||
'stroke': '#99c7ff',
|
||||
'stroke-width': 0.6,
|
||||
'cursor': 'pointer'
|
||||
},
|
||||
attrsHover: {
|
||||
'stroke-width': 2.5,
|
||||
'fill': 'blue'
|
||||
}
|
||||
}
|
||||
},
|
||||
areas: {
|
||||
'region-84': {
|
||||
value: "Auvergne-Rhône-Alpes",
|
||||
href: "france/auvergne-rhone-alpes",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Auvergne-Rhône-Alpes</span>"}
|
||||
},
|
||||
'region-53': {
|
||||
value: "Bretagne",
|
||||
href: "france/bretagne",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Bretagne</span>"}
|
||||
},
|
||||
'region-27': {
|
||||
value: "Bourgogne-Franche-Comté",
|
||||
href: "france/bourgogne-franche-comte",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Bourgogne-Franche-Comté</span>"}
|
||||
},
|
||||
'region-24': {
|
||||
value: "Centre-Val de Loire",
|
||||
href: "france/centre-val-de-loire",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Centre-Val de Loire</span>"}
|
||||
},
|
||||
'region-94': {
|
||||
value: "Corse",
|
||||
href: "france/corse",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Corse</span>"}
|
||||
},
|
||||
'region-44': {
|
||||
value: "Grand-Est",
|
||||
href: "france/grand-est",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Grand-Est</span>"}
|
||||
},
|
||||
'region-32': {
|
||||
value: "Hauts-de-France",
|
||||
href: "france/hauts-de-france",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Hauts-de-France</span>"}
|
||||
},
|
||||
'region-11': {
|
||||
value: "Ile-de-France",
|
||||
href: "france/ile-de-france",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Ile-de-France</span>"}
|
||||
},
|
||||
'region-28': {
|
||||
value: "Normandie",
|
||||
href: "france/normandie",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Normandie</span>"}
|
||||
},
|
||||
'region-75': {
|
||||
value: "Nouvelle-Aquitaine",
|
||||
href: "france/nouvelle-aquitaine",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Nouvelle-Aquitaine</span>"}
|
||||
},
|
||||
'region-76': {
|
||||
value: "Occitanie",
|
||||
href: "france/occitanie",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Occitanie</span>"}
|
||||
},
|
||||
'region-52': {
|
||||
value: "Pays de la Loire",
|
||||
href: "france/pays-de-la-loire",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Pays de la Loire</span>"}
|
||||
},
|
||||
'region-93': {
|
||||
value: "Provence-Alpes-Côte d'Azur",
|
||||
href: "france/provence-alpes-cote-d-azur",
|
||||
tooltip: {content: "<span style=\"font-size:1.2rem;font-weight:bold;\">Provence-Alpes-Côte d'Azur</span>"}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -16,14 +16,11 @@ class ProductModule extends Module
|
|||
|
||||
public function __construct(ContainerInterface $container)
|
||||
{
|
||||
$gmarchePrefix = $container->get('gmarche.prefix');
|
||||
$gmarchePrefix = $container->get('gmarche.prefix').'france/';
|
||||
|
||||
$container->get(RendererInterface::class)->addPath('product', __DIR__ . '/views');
|
||||
$router = $container->get(Router::class);
|
||||
$router->get("$gmarchePrefix{region:[a-z\-0-9]+}/{slug:[a-z\-0-9]+}/produits", ProductIndexAction::class, 'product.ville');
|
||||
$router->get("$gmarchePrefix{region:[a-z\-0-9]+}/{slug:[a-z\-0-9]+}/recherches", RechIndexAction::class, 'product.recherches');
|
||||
|
||||
// $router->crud("$gmarchePrefix/{region:[a-z\-]+}/{slug:[a-z\-0-9]+}/{antenne:[0-9]{1,}}",[LoggedInMiddleware::class, ProductCrudAction::class],'product.admin');
|
||||
}
|
||||
}
|
||||
// $router->get("$gmarchePrefix/{region:[a-z\-0-9]+}/{slug:[a-z\-0-9]+}/{antenne:[0-9]{1,}}", ProductIndexAction::class, 'product.index');
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
display: none;
|
||||
}
|
||||
.toggle_radio label{
|
||||
/* font: 90%/1.618 "Source Sans Pro";*/
|
||||
color: rgba(0,0,0,.9);
|
||||
z-index: 0;
|
||||
display: block;
|
||||
|
@ -93,7 +92,7 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ gmarchePrefix }}">France</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ gmarchePrefix }}{{ region_slug }}">{{ region_name }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ gmarchePrefix }}france/{{ region_slug }}">{{ region_name }}</a></li>
|
||||
<li class="breadcrumb-item active">G-Marché de {{ antenne_name }}</li>
|
||||
|
||||
<div class="toggle_radio">
|
||||
|
@ -102,7 +101,7 @@
|
|||
<label for="first_toggle"><p>PRODUITS</p></label>
|
||||
<label for="second_toggle">
|
||||
<p>
|
||||
<a style="color:black;" href="{{ gmarchePrefix }}{{ region_slug }}/{{ antenne_slug }}/recherches">RECHERCHES</a>
|
||||
<a style="color:black;" href="{{ gmarchePrefix }}france/{{ region_slug }}/{{ antenne_slug }}/recherches">RECHERCHES</a>
|
||||
</p>
|
||||
</label>
|
||||
<div class="toggle_option_slider">
|
||||
|
@ -241,10 +240,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<!--
|
||||
crochet% set token_input = csrf_input %crochet
|
||||
|
||||
paginate(items, routePrefix ~ '.index', {id: item.id, region: explodeUrl()[2],
|
||||
slug: explodeUrl()[3], antenne: explodeUrl()[4]}) -->
|
||||
crochet% set token_input = csrf_input %crochet-->
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -93,14 +93,14 @@
|
|||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ gmarchePrefix }}">France</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ gmarchePrefix }}{{ region_slug }}">{{ region_name }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ gmarchePrefix }}france/{{ region_slug }}">{{ region_name }}</a></li>
|
||||
<li class="breadcrumb-item active">G-Marché de {{ antenne_name }}</li>
|
||||
|
||||
<div class="toggle_radio">
|
||||
<input type="radio" class="toggle_option" id="first_toggle" name="toggle_option">
|
||||
<input style="color:black;" type="radio" checked class="toggle_option" id="second_toggle" name="toggle_option">
|
||||
<label for="first_toggle">
|
||||
<a style="color:black;" href="{{ gmarchePrefix }}{{ region_slug }}/{{ antenne_slug }}/produits">PRODUITS</a>
|
||||
<a style="color:black;" href="{{ gmarchePrefix }}france/{{ region_slug }}/{{ antenne_slug }}/produits">PRODUITS</a>
|
||||
</label>
|
||||
<label for="second_toggle">
|
||||
<p>RECHERCHES</p>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<link rel="shortcut icon" type="image/x-icon" href="\images\favicon.ico">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bree+Serif&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kalam&display=swap">
|
||||
<link rel="stylesheet" href="\css\mapael.css">
|
||||
<link rel="stylesheet" href="\css\style.css">
|
||||
<style>
|
||||
body {
|
||||
|
@ -27,10 +28,12 @@
|
|||
grid-column: 2 / 3;
|
||||
}
|
||||
</style>
|
||||
<!--<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>-->
|
||||
|
||||
<script type="text/javascript" src="/js/jquery-3.4.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/connex.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mapael/2.1.0/js/jquery.mapael.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="https://rawgit.com/neveldo/mapael-maps/master/france/france_regions_2016.js" charset="utf-8"></script>
|
||||
</head>
|
||||
<body class="fond page">
|
||||
<div class="site">
|
||||
|
@ -50,7 +53,6 @@
|
|||
<div class="navbar-text" style="color:lightgray;margin-right:15px; margin-top:3px;">
|
||||
{{ "now"|date('d/m/y') }}
|
||||
</div>
|
||||
<!--{pourcent if current_user() pourcent}-->
|
||||
{% if nom_user != '' %}
|
||||
<!-- <button style="background-color: transparent;padding:0;border:0;" -->
|
||||
<form method="post" style="margin-top:5px;" action="{{ path('account.profil') }}">
|
||||
|
|
Loading…
Reference in New Issue