src/Elements/Bundle/DemiFrontendBundle/Resources/views/Map/map.html.twig line 1

Open in your IDE?
  1. {#
  2.  * @var \Pimcore\Templating\GlobalVariables app
  3.  *
  4.  * @var \Elements\Demi\Model\Package | null tvbPackage
  5.  */ #}
  6. {% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
  7. {% block content %}
  8. {% set route = tvbPackage is defined ? 'demi_tvb_map_poi_json' : 'demi_map_poi_json' %}
  9. {% set mapPoiJson = url(route, {
  10.     'path' : document.getFullPath() | trim('/', 'left')
  11. }) %}
  12. {% set accoTeaserLink = url('demi_compact_teaser', {
  13.     'path' : document.getFullPath() | trim('/', 'left')
  14. }) %}
  15. {% set nearbySearchJson = '/var/tmp/typeahead/' ~ app.request.locale ~ '/nearbySearch.json' %}
  16. <script>
  17.     _config.historyController = true;
  18.     _config.accommodationMap = true;
  19.     _config.accommodationMapPoisUrl = '{{ mapPoiJson }}';
  20.     _config.accommodationMapDetailUrl = '{{ accoTeaserLink }}';
  21.     _config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses', {}) ? 'true' : 'false' }};
  22.     {% if demi_fileExists(nearbySearchJson, "PIMCORE_PUBLIC_VAR", '/var') %}
  23.         _config.nearbySearchAutocompleteUrl ='/cache-buster-{{ demi_getExistingCacheFile(nearbySearchJson) }}';
  24.     {% endif %}
  25. </script>
  26. <div id="map-overlay" class="overlay is-open js-accommodation-map">
  27.     <form action="" class="">
  28.         {{ include('@ElementsDemiFrontend/Includes/overlays/sections/header-with-title.html.twig', {
  29.             'title' : 'demi.map.view' | trans,
  30.             'backLink' : document.getFullPath()
  31.         }) }}
  32.         <div class="overlay__content js-accommodation-map accommodation-map">
  33.             <div class="js-accommodation-map__canvas accommodation-map__canvas"></div>
  34.             <div class="accommodation-map__controls accommodation-map__controls--top-full-width">
  35.                     {%  if demi_core_configuration("getSortingNearbySearch", {}) %}
  36.                         <div class="js-nearby-search-autocomplete nearby-search-autocomplete js-filter-form__autocomplete">
  37.                             <div class="form-box">
  38.                                 <div class="row row--gutter-width-0">
  39.                                     <div class="col">
  40.                                         <label class="d-block" for="map-nearby">
  41.                                             <script data-cookieconsent="ignore">
  42.                                                 _config.nearbySearch = true;
  43.                                             </script>
  44.                                             <input id="map-nearby"
  45.                                                    name="nearby"
  46.                                                    type="text"
  47.                                                    class="form-box__content form-control js-nearby-search-autocomplete__input"
  48.                                                    placeholder="{{ 'demi.search.nearby' | trans }}">
  49.                                         </label>
  50.                                     </div>
  51.                                     <div class="col-auto">
  52.                                         <button class="btn btn-primary form-box__addon-button js-nearby-search-autocomplete__my-location"
  53.                                                 type="button"
  54.                                                 title="{{ 'demi.search.nearby.my-location' | trans }}"
  55.                                                 aria-label="{{ 'demi.search.nearby.my-location' | trans }}">
  56.                                             <span class="demi-icon demi-icon-target" aria-hidden="true"></span>
  57.                                         </button>
  58.                                     </div>
  59.                                 </div>
  60.                             </div>
  61.                             <section aria-expanded="false" class="collapse js-multiselect-autocomplete__selected-detail">
  62.                                 <div class="sr-only">{{ "demi.filter.input-selected-values" | trans }}</div>
  63.                                 <div class="form-box__detail py-3 js-multiselect-autocomplete__selected-values-list">
  64.                                 </div>
  65.                             </section>
  66.                         </div>
  67.                     {% endif %}
  68.                     <div class="mt-2 float-right">
  69.                         <button type="button" class="btn btn-white accommodation-map__control accommodation-map__control--w-a js-draw-on-map__clear mr-2" aria-hidden="true" hidden="">
  70.                            {{ "demi.list.map.remove-area"| trans }}
  71.                         </button>
  72.                         <button type="button" class="btn btn-primary accommodation-map__control js-draw-on-map" aria-hidden="true">
  73.                             <span class="demi-icon demi-icon-draw-on-map js-draw-on-map__start-drawing"></span>
  74.                             <span class="demi-icon demi-icon-close js-draw-on-map__cancel-drawing" hidden=""></span>
  75.                         </button>
  76.                     </div>
  77.             </div>
  78.             <div class="js-accommodation-map__detail accommodation-map__detail" role="alert" aria-live="assertive">
  79.                 <div class="js-accommodation-map__detail-loading text-center" hidden>
  80.                     {{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig', {
  81.                         'styleModifier' : 'my-5'
  82.                     }) }}
  83.                 </div>
  84.                 {# ajax loaded #}
  85.                 <div class="js-accommodation-map__detail-content">
  86.                 </div>
  87.             </div>
  88.         </div>
  89.     </form>
  90. </div>
  91. {% endblock %}