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 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/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/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 7da33c4..37e89a4 100644 --- a/src/Gmarche/views/index.twig +++ b/src/Gmarche/views/index.twig @@ -4,19 +4,107 @@ Ğ1-Marché : Régions {% if page > 1 %}, page {{ page }} {% endif %} {% endblock %} {% block body %} -
- -
+
+ +
- -{% endblock %} + +{% endblock %} \ No newline at end of file diff --git a/src/Product/ProductModule.php b/src/Product/ProductModule.php index 93b5275..17c2bf0 100644 --- a/src/Product/ProductModule.php +++ b/src/Product/ProductModule.php @@ -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'); diff --git a/src/Product/views/admin/products/index.twig b/src/Product/views/admin/products/index.twig index cf4e4d9..f418154 100644 --- a/src/Product/views/admin/products/index.twig +++ b/src/Product/views/admin/products/index.twig @@ -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 @@
{% endblock %} diff --git a/src/Product/views/admin/recherches/index.twig b/src/Product/views/admin/recherches/index.twig index 0092176..e949319 100644 --- a/src/Product/views/admin/recherches/index.twig +++ b/src/Product/views/admin/recherches/index.twig @@ -93,14 +93,14 @@