templates/pages/espacepro/restaurants/index.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/front/baseinternes.html.twig' %}
  2. {% block title %}{{ parametres.structure.name ?? company_name }} | {{ title }}{% endblock %}
  3. {% block stylesheets %}
  4.     <style>
  5.         .blog-single-aside__content .title{
  6.             color: #993300!important;
  7.             text-shadow: none!important;
  8.         }
  9.         p{text-align: justify;margin-bottom:1rem!important}
  10.     </style>
  11. {% endblock %}
  12. {% block body %}
  13.     <section class="top-banniere">
  14.         <div class="page-banner" style="background-image: url({{ asset('assetics/internes/images/restaurant.jpg') }})">
  15.             {#{{ fil_arial(title) }}#}
  16.         </div>
  17.     </section>
  18.     <section class="tour-item-banner-2">
  19.         <div class="container">
  20.             <h4 class="pull-right"><a href="{{ path('home') }}">Accueil</a> / {{ menu }} / <span> {{ title|u.truncate(50, '...') }}</span></h4>
  21.         </div>
  22.     </section>
  23.     <section class="mt-2 mb-5">
  24.         <div class="container js-filter-restaurant">
  25.             <div class="row">
  26.                 <div class="col-lg-3">
  27.                     <div class="sidebar" style="margin-bottom: 50px!important;">
  28.                         <div class="blog-sidebar">
  29.                             {{ form_start(formsearch, {'attr': {'class': 'js-filter-form-restaurant'}}) }}
  30.                             <div class="spinner-border js-loading" role="status" aria-hidden="true" style="display: none;">
  31.                                 <span class="sr-only">Loading...</span>
  32.                             </div>
  33.                             <div class="blog-sidebar__widget">
  34.                                 <h3>Recherche par filtre</h3>
  35.                                 <style>
  36.                                     .form-check-input{
  37.                                         position:absolute;right:-50% !important;
  38.                                     }
  39.                                     .sidebar-category .form-group.hr{
  40.                                         border-bottom: 1px solid #ccc!important;
  41.                                         padding-bottom: 20px;
  42.                                     }
  43.                                 </style>
  44.                                 <div class="sidebar-category">
  45.                                     <div class="form-group hr">
  46.                                         <label for="q">{{ form_label(formsearch.q) }}</label>
  47.                                         {{ form_widget(formsearch.q) }}
  48.                                     </div>
  49.                                     <div class="form-group hr">
  50.                                         <label for="ville">{{ form_label(formsearch.villes) }}</label>
  51.                                         {{ form_widget(formsearch.villes) }}
  52.                                     </div>
  53.                                     <div class="form-group hr">
  54.                                         <label for="ville">{{ form_label(formsearch.communes) }}</label>
  55.                                         {{ form_widget(formsearch.communes) }}
  56.                                     </div>
  57.                                     <div class="form-group hr">
  58.                                         <label for="ville">{{ form_label(formsearch.specialites) }}</label>
  59.                                         {{ form_widget(formsearch.specialites) }}
  60.                                     </div>
  61.                                     <button style="cursor: pointer;" type="submit" class="btn btn-primary btn-block">
  62.                                         <i class="ti-search"></i> Filtrer
  63.                                     </button>
  64.                                 </div>
  65.                             </div>
  66.                             {{ form_end(formsearch) }}
  67.                         </div>
  68.                     </div>
  69.                 </div>
  70.                 <div class="col-lg-9">
  71.                     <aside>
  72.                         <div class="special-tour__tittle">
  73.                             <!-- section tittle -->
  74.                             <div class="section-tittle">
  75.                                 <h2>{{ title }}</h2>
  76.                                 <div class="section-tittle__line-under"></div>
  77.                                 <p><span>{{ title }}</span></p>
  78.                             </div>
  79.                             <p class="destination-4-2__sub-tittle" style="width: 100%!important;"></p>
  80.                         </div>
  81.                         {% if restaurants|length != 0 %}
  82.                             <div class="row">
  83.                                 <div class="col-xl-12 col-lg-12 col-md-12">
  84.                                     <div class="grid-left-sidebar__filter">
  85.                                         {#<span class="grid-left-sidebar__filter--result">
  86.                                             {{ restaurants.totalItemCount() }} Restaurant(s) affiché(s) sur {{ restaurants.itemNumberPerPage() }}
  87.                                         </span>#}
  88.                                         <span class="pull-right js-filter-sorting-restaurant">
  89.                                             Trier Par : &nbsp{% include 'pages/espacepro/restaurants/partials/__sorting.html.twig' with {restaurants: restaurants} only %}
  90.                                         </span>
  91.                                     </div>
  92.                                     <div class="row js-filter-content-restaurant">
  93.                                         {% include 'pages/espacepro/restaurants/partials/__card.html.twig' with {restaurants: restaurants } %}
  94.                                     </div>
  95.                                     <!-- pagination -->
  96.                                     <div class="wander-pagination__pagination js-filter-pagination-restaurant" style="display: flex; justify-content: center; justify-items: center;">
  97.                                         <div>
  98.                                             {{ knp_pagination_render(restaurants) }}
  99.                                         </div>
  100.                                     </div>
  101.                                 </div>
  102.                             </div>
  103.                         {% else %}
  104.                             <div class="jumbotron mt-5">
  105.                                 <div class="alert alert-info">
  106.                                     <i class="fa fa-info-circle"></i> Aucune donnée disponible pour le mmoment
  107.                                 </div>
  108.                             </div>
  109.                         {% endif %}
  110.                     </aside>
  111.                 </div>
  112.             </div>
  113.         </div>
  114.     </section>
  115. {% endblock %}
  116. {% block javascripts %}
  117.     <script>
  118.         //Check Commune from cities select
  119.         let cities = document.getElementById('villes');
  120.         async function checkCommunes(){
  121.             let communes = document.getElementById('communes');
  122.             let url = Routing.generate('check.communes', {'id': parseInt(this.value)}, false);
  123.             const response = await fetch(url, {
  124.                 headers: {
  125.                     'X-Requested-With': 'XMLHttpRequest'
  126.                 }
  127.             })
  128.             if (response.status >= 200 &&  response.status < 300){
  129.                 const data = await response.json()
  130.                 communes.innerHTML = data.communes
  131.             }else{
  132.                 console.error(response)
  133.             }
  134.         }
  135.         cities.addEventListener('change', checkCommunes);
  136.     </script>
  137. {% endblock %}