From 8770a46caa6d833f1197064d8cda21925246dd78 Mon Sep 17 00:00:00 2001 From: nox Date: Thu, 21 Nov 2019 14:52:57 +0100 Subject: [PATCH 1/3] Ajout du css mapael --- public/css/mapael.css | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 public/css/mapael.css diff --git a/public/css/mapael.css b/public/css/mapael.css new file mode 100644 index 0000000..3ff5edc --- /dev/null +++ b/public/css/mapael.css @@ -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; +} \ No newline at end of file From a2121389bb13c59af63eae1049aaadf02409681f Mon Sep 17 00:00:00 2001 From: nox Date: Sat, 23 Nov 2019 16:50:18 +0100 Subject: [PATCH 2/3] Mise en place de la carte de France interactive --- src/Gmarche/Actions/RegionIndexAction.php | 21 +--- src/Gmarche/GmarcheModule.php | 2 +- src/Gmarche/views/index.twig | 118 +++++++++++++++++++--- views/layout.twig | 8 +- 4 files changed, 116 insertions(+), 33 deletions(-) diff --git a/src/Gmarche/Actions/RegionIndexAction.php b/src/Gmarche/Actions/RegionIndexAction.php index 9b81ebd..37ac75d 100644 --- a/src/Gmarche/Actions/RegionIndexAction.php +++ b/src/Gmarche/Actions/RegionIndexAction.php @@ -1,44 +1,31 @@ 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')); } } diff --git a/src/Gmarche/GmarcheModule.php b/src/Gmarche/GmarcheModule.php index 3adde69..fd4df78 100644 --- a/src/Gmarche/GmarcheModule.php +++ b/src/Gmarche/GmarcheModule.php @@ -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'); } } diff --git a/src/Gmarche/views/index.twig b/src/Gmarche/views/index.twig index 7da33c4..02a7235 100644 --- a/src/Gmarche/views/index.twig +++ b/src/Gmarche/views/index.twig @@ -4,19 +4,113 @@ Ğ1-Marché : Régions {% if page > 1 %}, page {{ page }} {% endif %} {% endblock %} {% block body %} -
- -
+
+ +
- -{% endblock %} + + + +{% endblock %} \ No newline at end of file diff --git a/views/layout.twig b/views/layout.twig index f712ea6..deda089 100644 --- a/views/layout.twig +++ b/views/layout.twig @@ -7,6 +7,7 @@ + - - + + + +
@@ -50,7 +53,6 @@ - {% if nom_user != '' %}
From e557174e96d42102f246ffcc557b803a2f55dd1b Mon Sep 17 00:00:00 2001 From: nox Date: Sat, 23 Nov 2019 17:18:44 +0100 Subject: [PATCH 3/3] Correction des urls --- public/js/script.js | 4 ++-- src/Gmarche/views/antenne.twig | 5 ----- src/Gmarche/views/index.twig | 6 ------ src/Product/ProductModule.php | 5 +---- src/Product/views/admin/products/index.twig | 10 +++------- src/Product/views/admin/recherches/index.twig | 4 ++-- 6 files changed, 8 insertions(+), 26 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 1f18d02..f344981 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -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') { diff --git a/src/Gmarche/views/antenne.twig b/src/Gmarche/views/antenne.twig index 5c9d49a..a14e4f5 100644 --- a/src/Gmarche/views/antenne.twig +++ b/src/Gmarche/views/antenne.twig @@ -15,8 +15,6 @@ } .main { grid-area: main; - /*justify-self: start; - align-self: start;*/ grid-column: 1 / 2; } .sidebar { @@ -67,9 +65,6 @@
-
diff --git a/src/Gmarche/views/index.twig b/src/Gmarche/views/index.twig index 02a7235..37e89a4 100644 --- a/src/Gmarche/views/index.twig +++ b/src/Gmarche/views/index.twig @@ -18,13 +18,7 @@
- -