{#
* @var \Pimcore\Templating\GlobalVariables app
*
* @var \Elements\Demi\Model\Package | null tvbPackage
*/ #}
{% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
{% block content %}
{% set route = tvbPackage is defined ? 'demi_tvb_map_poi_json' : 'demi_map_poi_json' %}
{% set mapPoiJson = url(route, {
'path' : document.getFullPath() | trim('/', 'left')
}) %}
{% set accoTeaserLink = url('demi_compact_teaser', {
'path' : document.getFullPath() | trim('/', 'left')
}) %}
{% set nearbySearchJson = '/var/tmp/typeahead/' ~ app.request.locale ~ '/nearbySearch.json' %}
<script>
_config.historyController = true;
_config.accommodationMap = true;
_config.accommodationMapPoisUrl = '{{ mapPoiJson }}';
_config.accommodationMapDetailUrl = '{{ accoTeaserLink }}';
_config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses', {}) ? 'true' : 'false' }};
{% if demi_fileExists(nearbySearchJson, "PIMCORE_PUBLIC_VAR", '/var') %}
_config.nearbySearchAutocompleteUrl ='/cache-buster-{{ demi_getExistingCacheFile(nearbySearchJson) }}';
{% endif %}
</script>
<div id="map-overlay" class="overlay is-open js-accommodation-map">
<form action="" class="">
{{ include('@ElementsDemiFrontend/Includes/overlays/sections/header-with-title.html.twig', {
'title' : 'demi.map.view' | trans,
'backLink' : document.getFullPath()
}) }}
<div class="overlay__content js-accommodation-map accommodation-map">
<div class="js-accommodation-map__canvas accommodation-map__canvas"></div>
<div class="accommodation-map__controls accommodation-map__controls--top-full-width">
{% if demi_core_configuration("getSortingNearbySearch", {}) %}
<div class="js-nearby-search-autocomplete nearby-search-autocomplete js-filter-form__autocomplete">
<div class="form-box">
<div class="row row--gutter-width-0">
<div class="col">
<label class="d-block" for="map-nearby">
<script data-cookieconsent="ignore">
_config.nearbySearch = true;
</script>
<input id="map-nearby"
name="nearby"
type="text"
class="form-box__content form-control js-nearby-search-autocomplete__input"
placeholder="{{ 'demi.search.nearby' | trans }}">
</label>
</div>
<div class="col-auto">
<button class="btn btn-primary form-box__addon-button js-nearby-search-autocomplete__my-location"
type="button"
title="{{ 'demi.search.nearby.my-location' | trans }}"
aria-label="{{ 'demi.search.nearby.my-location' | trans }}">
<span class="demi-icon demi-icon-target" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
<section aria-expanded="false" class="collapse js-multiselect-autocomplete__selected-detail">
<div class="sr-only">{{ "demi.filter.input-selected-values" | trans }}</div>
<div class="form-box__detail py-3 js-multiselect-autocomplete__selected-values-list">
</div>
</section>
</div>
{% endif %}
<div class="mt-2 float-right">
<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="">
{{ "demi.list.map.remove-area"| trans }}
</button>
<button type="button" class="btn btn-primary accommodation-map__control js-draw-on-map" aria-hidden="true">
<span class="demi-icon demi-icon-draw-on-map js-draw-on-map__start-drawing"></span>
<span class="demi-icon demi-icon-close js-draw-on-map__cancel-drawing" hidden=""></span>
</button>
</div>
</div>
<div class="js-accommodation-map__detail accommodation-map__detail" role="alert" aria-live="assertive">
<div class="js-accommodation-map__detail-loading text-center" hidden>
{{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig', {
'styleModifier' : 'my-5'
}) }}
</div>
{# ajax loaded #}
<div class="js-accommodation-map__detail-content">
</div>
</div>
</div>
</form>
</div>
{% endblock %}