templates/front/search/search.html.twig line 1

Open in your IDE?
  1. {% extends 'front/page.html.twig' %}
  2. {% trans_default_domain 'front' %}
  3. {% import "front/_shared/macros.html.twig" as macro %}
  4. {% block body_class %}{{ parent() }} {% endblock %}
  5. {%  block meta_title %}{{ page.metaTitle }}{% endblock %}
  6. {%  block meta_description %}{{ page.metaDescription }}{% endblock %}
  7. {% block header_class %}homes-head homes-head-reverse dark-header{% endblock %}
  8. {% block header_content %}
  9.     <div class="homes-search-container container">
  10.         {% if area %}
  11.             <h1>Vivre à <span>{{ area.label }}</span></h1>
  12.             <p class="intro">{{ area.description }}</p>
  13.         {% else %}
  14.             <h1>Nos <span>logements</span></h1>
  15.             <p class="intro">Découvrez nos coliving tout compris et équipés, toujours à côté des universités et des transports.</p>
  16.         {% endif %}
  17.         <div class="search" data-controller="search-filters">
  18.             <form action="#">
  19.                 <select name="area" class="d-none">
  20.                     <option>Où vivrez-vous ?</option>
  21.                     {% for area in addressAreas %}
  22.                         <option value="{{ area.id }}" {% if app.request.get('area') == area.id %}selected{% endif %}>{{ area.name }}</option>
  23.                     {% endfor %}
  24.                 </select>
  25.                 <div class="form-row first">
  26.                     <select name="district" id="district" class="{% if area and area.id != 1 %}d-none{% endif %}">
  27.                         <option value="" selected>{{ 'label.district'|trans }}</option>
  28.                         {% for item in filters.districts.items %}
  29.                             <option value="{{ item.id }}" {% if app.request.get('district') == item.id %}selected{% endif %}>{{ item.label }}</option>
  30.                         {% endfor %}
  31.                     </select> <!-- AREA -->
  32.                     <select name="accommodationType" id="accommodationType">
  33.                         <option value="" selected>{{ 'label.accommodation_type'|trans }}</option>
  34.                         {% for key,value in filters.accommodationTypes %}
  35.                             <option value="{{ value }}" {% if app.request.get('accommodationType') == value %}selected{% endif %}>{{ key|trans }}</option>
  36.                         {% endfor %}
  37.                     </select> <!-- HOME TYPE -->
  38.                     <!--select name="lengthOfStay" id="lengthOfStay">
  39.                         <option value="" selected>{{ 'label.lengthofstay'|trans }}</option>
  40.                         <option value="6" {% if app.request.get('lengthOfStay') == '6' %}selected{% endif %}>6 mois</option>
  41.                         <option value="12" {% if app.request.get('lengthOfStay') == '12' %}selected{% endif %}>12 mois</option>
  42.                         <option value="24" {% if app.request.get('lengthOfStay') == '24' %}selected{% endif %}>24 mois</option>
  43.                     </select--> <!-- LENGTH OF STAY -->
  44.                     <select name="price" id="price">
  45.                         <option value="" selected>Prix</option>
  46.                         <option value="0-200" {% if app.request.get('price') == '0-200' %}selected{% endif %}>Moins de 200€/mois</option>
  47.                         <option value="200-400" {% if app.request.get('price') == '200-400' %}selected{% endif %}>200 à 400€/mois</option>
  48.                         <option value="400-600" {% if app.request.get('price') == '400-600' %}selected{% endif %}>400 à 600€/mois</option>
  49.                         <option value="600-800" {% if app.request.get('price') == '600-800' %}selected{% endif %}>600 à 800€/mois</option>
  50.                         <option value="800-1000" {% if app.request.get('price') == '800-1000' %}selected{% endif %}>800 à 1000€/mois</option>
  51.                     </select> <!-- LENGTH OF STAY -->
  52.                     <select name="service" id="service">
  53.                         <option value="">Service</option>
  54.                         {% for service in filters.services.items %}
  55.                             <option value="{{ service.id }}" {% if app.request.get('service') == service.id %}selected{% endif %}>{{ service.label }}</option>
  56.                         {% endfor %}
  57.                     </select>
  58.                     <div class="show more" data-action="click->search-filters#more">Plus de filtres <span class="chevron"><img src="{{ asset('build/images/icons/chevron-down-dark.svg') }}"></span></div>
  59.                     <div class="show less d-none" data-action="click->search-filters#less">Moins de filtres <span class="chevron"><img src="{{ asset('build/images/icons/chevron-down-dark.svg') }}"></span></div>
  60.                 </div> <!-- form-row first-->
  61.                 <div class="form-row second d-none">
  62.                     <!--select name="totalBedrooms" id="totalBedrooms">
  63.                         <option value="" selected>{{ 'label.totalBedrooms'|trans }}</option>
  64.                         <option value="1">{{ 'total.rooms'|trans({count: 1}) }}</option>
  65.                         <option value="2">{{ 'total.rooms'|trans({count: 2}) }}</option>
  66.                         <option value="3">{{ 'total.rooms'|trans({count: 3}) }}</option>
  67.                         <option value="4">{{ 'total.rooms'|trans({count: 4}) }}</option>
  68.                         <option value="5">{{ 'total.rooms'|trans({count: 5}) }}</option>
  69.                     </select-->
  70.                     <select name="privateBathroom" id="privateBathroom">
  71.                         <option value="" selected>{{ 'label.privateBathroom'|trans }}</option>
  72.                         <option value="1">{{ 'label.yes'|trans }}</option>
  73.                         <option value="0">{{ 'label.no'|trans }}</option>
  74.                     </select> <!-- PRIVATE BATHROOM -->
  75.                     <select name="petFriendly" id="petFriendly">
  76.                         <option value="" selected>{{ 'label.petFriendly'|trans }}</option>
  77.                         <option value="1">{{ 'label.yes'|trans }}</option>
  78.                         <option value="0">{{ 'label.no'|trans }}</option>
  79.                     </select> <!-- Pet Friendly -->
  80.                     <select name="girlsOnly" id="girlsOnly">
  81.                         <option value="" selected>{{ 'label.girlsOnly'|trans }}</option>
  82.                         <option value="1">{{ 'label.yes'|trans }}</option>
  83.                         <option value="0">{{ 'label.no'|trans }}</option>
  84.                     </select> <!-- LENGTH OF STAY -->
  85.                 </div> <!-- form-row first-->
  86.             </form>
  87.         </div>
  88.     </div> <!-- home search container -->
  89. {% endblock %}
  90. {% block page_content %}
  91.     <main class="homes">
  92.         <section class="container">
  93.             <div
  94.                  id="accommodations-list-controller"
  95.                  data-controller="accommodations-list"
  96.                  data-token="{{ mapbox_token }}"
  97.                  data-ajax-route="{{ path('front_search_ajax') }}"
  98.                  data-map-route="{{ path('front_search_map') }}"
  99.                  data-map-lat="{{ area ? area.latitude : '4.83254560283995' }}"
  100.                  data-map-lng="{{ area ? area.longitude : '45.75878851153359' }}"
  101.             >
  102.                 <div id="search-header" class="container-fluid">
  103.                     <div class="col-12 title-ctn">
  104.                         {% embed "front/search/search-list-header.html.twig" with {pagination: pagination} %}{% endembed %}
  105.                     </div>
  106.                 </div>
  107.                 <div class="row">
  108.                     <div class="col-12 col-lg-8 left">
  109.                         <div id="accommodations-list-container">
  110.                             <div id="accommodations-list" class="row">
  111.                                 {% embed "front/search/search-list.html.twig" with {list: list, pagination: pagination} %}{% endembed %}
  112.                             </div>
  113.                         </div>
  114.                         {% embed 'front/_shared/loader.html.twig' %}{% endembed %}
  115.                     </div> <!-- left col-8 -->
  116.                     <div class="col-4 d-none d-lg-block pr-0">
  117.                         <div id="map-sidebar" class="sidebar">
  118.                             <div class="sidebar__inner">
  119.                                 <div id="map-container"></div>
  120.                             </div>
  121.                         </div>
  122.                     </div>
  123.                 </div> <!-- row -->
  124.             </div> <!-- accommodations-list-controller -->
  125.         </section> <!-- container -->
  126.         {% include "front/_shared/faq.html.twig" %}
  127.     </main>
  128. {% endblock %}
  129. {% block javascripts %}
  130.     {{ parent() }}
  131. {% endblock %}
  132. {% block javascripts_footer %}
  133. {% endblock %}