{% set showSearchData = false %}
{% set from = elements_customDateFormat(app.request.get('from')) %}
{% set to = elements_customDateFormat(app.request.get('to')) %}
{% set units = 0 %}
{% set guests = 0 %}
{% set roomrows = searchParam.getRoomrows() %}
{% set hasPackageContainer = hasPackageContainer is defined ? hasPackageContainer : false %}
{% if isAffiliate is not defined %}
{% set isAffiliate = false %}
{% endif %}
{% if roomrows is iterable %}
{% for roomrow in roomrows %}
{% set units = units + roomrow.getUnits() %}
{% set guests = guests + roomrow.getAdults() %}
{% if roomrow.getChildAges() is iterable %}
{% set guests = guests + roomrow.getChildAges() | length %}
{% endif %}
{% if roomrow.getChildBirthdays() is iterable %}
{% set guests = guests + roomrow.getChildBirthdays() | length %}
{% endif %}
{% endfor %}
{% endif %}
<script data-cookieconsent="ignore">
_config.searchData = true;
</script>
<section class="search-info {{ accommodation is defined ? 'acco-detail' : '' }} {{ isSearch ? '' : 'js-search-data__show-if-submitted' }}" {{ not isSearch and not availabilityIsChecked ? 'hidden' : '' }}>
<div class="row row--gutter-width-0">
{% if historyBack is defined %}
<div class="col col-auto">
<button type="button" onclick="history.back()" class="search-info__back-btn btn-no-styling ">
<span class="demi-icon demi-icon-chevron-left f17" aria-label="{{ 'demi.back' | trans }}" title="{{ 'demi.back' | trans }}"></span>
</button>
</div>
{% endif %}
<div class="col">
<div class="search-info__data">
<div class="row row--gutter-width-xl-60 align-items-center js-search-data__show-if-submitted" {{ availabilityIsChecked ? '' : 'hidden' }}>
<div class="col col-auto search-info-item js-overlay__toggle" data-target="#search-overlay">
<div class="row">
<div class="col col-auto">
<span class="demi-icon demi-icon-calendar-insert mr-1 icon-in-text text-primary" title="{{ 'demi.search.travel-period' | trans }}" aria-label="{{ 'demi.search.travel-period' | trans }}"></span>
{% if from is not instanceof("\\Carbon\\Carbon") %}
{% set from = carbon() %}
{% endif %}
{% if to is not instanceof("\\Carbon\\Carbon") %}
{% set to = date('+7days') %}
{% endif %}
<time datetime="2017-06-16" class="js-search-data__arrival">{{ elements_dateFormat(from, "date-day_date_long") }}</time>
<span class="search-info__from-to-icon demi-icon demi-icon-arrow-from-to mx-2 text-primary"></span>
<time datetime="2017-06-22" class="js-search-data__departure">{{ elements_dateFormat(to, "date-day_date_long") }}</time>
</div>
</div>
</div>
{% if not document.property("demi_hideVacancySearch") %}
<div class="col col-auto search-info-item js-overlay__toggle" data-target="#search-overlay">
<div class="search-info-item__data">
<span class="demi-icon demi-icon-nights mr-1 icon-in-text text-primary" title="{{ "demi.nights" | trans }}" aria-label="{{ "demi.nights" | trans }}"></span>
<span class="js-search-data__nights">{{ units }}</span>
</div>
</div>
<div class="col col-auto search-info-item js-overlay__toggle" data-target="#search-overlay">
<div class="search-info-item__data">
<span class="demi-icon demi-icon-bed mr-1 icon-in-text text-primary" title="{{ "demi.search.rooms" | trans }}" aria-label="{{ "demi.search.rooms" | trans }}"></span>
<span class="js-search-data__rooms">{{ units }}</span>
</div>
</div>
<div class="col col-auto search-info-item js-overlay__toggle" data-target="#search-overlay">
<div class="search-info-item__data">
<span class="demi-icon demi-icon-person mr-1 icon-in-text text-primary" title="{{ "demi.search.persons" | trans }}" aria-label="{{ "demi.search.persons" | trans }}"></span>
<span class="js-search-data__persons">{{ guests }}</span>
</div>
</div>
<div class="col col-auto">
<button type="button" class="btn btn-{{ accommodation is defined ? 'default' : 'success' }} js-overlay__toggle search-info-search-button" data-target="#search-overlay">
{{ "demi.search.change" | trans }}
</button>
</div>
{% endif %}
</div>
<div class="js-search-data__hide-if-submitted row row--gutter-width-20 align-items-center" {{ availabilityIsChecked ? 'hidden' : '' }}>
{% if isSearch and not hasPackageContainer and not isAffiliate %}
<div class="col col-auto">
<h1 class="m-0 h2">{{ not editmode ? pimcore_input('headline') : '' }}</h1>
</div>
{% endif %}
{% if not document.property("demi_hideVacancySearch") %}
<div class="col{{ isAffiliate ? ' text-center' : '' }}">
<button type="button" class="btn btn-success js-overlay__toggle{{ isAffiliate ? ' btn-lg' : '' }}" data-target="#search-overlay">
{{ "demi.list.search-vacancies-button" | trans }}
</button>
</div>
{% endif %}
</div>
</div>
</div>
{% if not isAffiliate %}
<div class="col col-auto search-info__hotline d-none d-lg-block">
{{ pimcore_inc(demi_core_configuration("getContactSnippet", []), {"headerVersion" : true}) }}
</div>
{% endif %}
</div>
</section>
{% set showMoreOptions = not pimcore_relation('filterSnippet').empty ? demi_showMoreFilterOptions(pimcore_relation('filterSnippet').getElement()) %}
{% set showMoreOptions = accommodation is defined ? false : showMoreOptions %}
{% if noSearchOverlay is not defined and not editmode %}
{{ include('@ElementsDemiFrontend/Includes/overlays/search.html.twig', {
'filterSnippet' : pimcore_relation('filterSnippet').getData(),
'searchParam' : searchParam,
'noDate' : noDate is defined ? noDate : searchParam.isNoDate(),
'isSearch' : true,
'modifierClass' : isAffiliate ? 'overlay--centered-top' : 'overlay--centered',
'showMoreOptions' : showMoreOptions
}) }}
{% endif %}