{% if not editmode %}
{% do elements_head_title().setTitle( demi_seoTitleForAcco(accommodation,document), true ) %}
{% do elements_head_meta().setDescription( demi_seoDescriptionforAcco(accommodation) ) %}
{% endif %}
{% set destinationPackages = destinationPackages is defined ? destinationPackages : null %}
{#{% set canonicalUrl = demi_demiUrl({#}
{# 'accommodation': accommodation#}
{#},'demi_acco_detail_page',true) %}#}
{% set canonicalUrl = linkGenerator().generate(accommodation, {canonical: true, relative: false, reset: true}) %}
{% do elements_canonical().checkAllParams(false).setDomain(canonicalUrl)|raw %}
{% if not canonicalUrl is same as(app.request.pathInfo) %}
{% do elements_robots().setNoIndex(true) %}
{% endif %}
{% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
{% block content %}
{% do demi_paymentSetDefaultCurrency(accommodation) %}
{% if not availabilityIsChecked %}
{% set fromDate = null %}
{% else %}
{% set fromDate = demi_getSearchFrom() %}
{% endif %}
{% set resultSetPresent = false %}
{% if accommodationResultSet is defined and accommodationResultSet is not null and accommodationResultSet.getMinPriceProductSets is not empty and accommodationResultSet.getMinPriceProductSets()|length > 0 %}
{% set resultSetPresent = true %}
{% endif %}
{% set ajaxUrl = demi_demiUrl({
'accommodation': accommodation
},'demi_acco_ajax') %}
{% if '?' in ajaxUrl %}
{% set parts = ajaxUrl|split('?') %}
{% set ajaxUrl = parts[0] %}
{% endif %}
{% set liveDetailProductsUrl = ajaxUrl ~ "?ajaxRequestType=getLiveDetailProducts" %}
{% set corridorMatrixUrl = ajaxUrl ~ "?ajaxRequestType=getCorridorMatrix" %}
{% set productUrl = ajaxUrl ~ "?ajaxRequestType=getProductByIdAndMealcode" %}
{% set paymentInformationUrl = ajaxUrl ~ "?ajaxRequestType=getProductByIdAndMealcode" %}
{% set address = accommodation.getAddress() %}
{% set maxRatingValue = demi_core_configuration('getMaxRatingValue',[]) ?: 5 %}
{% set maxRatingNormalized = demi_core_configuration('getMaxRatingNormalized',[]) ?: 5 %}
{% set anchors = {
'detail': '#details',
'package': '#packages',
'rooms': '#rooms'
} %}
{% if activeTab is defined and activeTab not in anchors %}
{% set activeTab = '#details' %}
{% else %}
{% do jsConfig('_initialState').add({'activeTab': activeTab}) %}
{% endif %}
{% set step1Url = demi_demiUrl({
'path': demi_core_configuration('getCheckoutPath',[]).getFullPath(),
'controller': 'cart',
'action': 'step1'
},'demi_checkout',true) %}
{% set addToCartUrl = step1Url %}
{% set imagesTypes = demi_getAccoImagesTypesAsArray(accommodation) %}
{% set classifications = accommodation.getClassifications() %}
{% set hasClassificationsWithIcons = false %}
{% for classification in classifications %}
{% set group = classification.getClassificationGroup() %}
{% if group is not empty and group.getIconSmall() %}
{% set hasClassificationsWithIcons = true %}
{% endif %}
{% endfor %}
{% set jsonLdData = demi_getAccommodationJsonLdData(accommodation, options is defined ? options : [], packages is defined ? packages : null) %}
{% do jsonLd().add("accommodation", jsonLdData) %}
{# TODO @msteyrer breadcrumb helper bundle not in use atm
{% do breadcrumbHelper().set({
'parentId': document.getId(),
'url': accoUrlPlain,
'label': accommodation.getName()
}) %}
{{ include('@ElementsDemiFrontend/Navigation/breadcrumb.html.twig') }} #}
<script data-cookieconsent="ignore">
_config.viewType = "object";
_config.historyController = true;
_config.roomSelection = true;
_config.searchData = true;
_config.detailResultUrl = '{{ liveDetailProductsUrl }}';
_config.corridorSearchUrl = '{{ corridorMatrixUrl }}';
_config.detailPaymentInfoUrl = '{{ paymentInformationUrl }}';
_config.detailProductUrl = '{{ productUrl }}';
_config.addToCartUrl = '{{ addToCartUrl }}';
_config.addToCartUrl = '{{ addToCartUrl|raw }}';
_config.cartWarningOnMultipleAccoProducts = {{ demi_core_configuration('getWarningOnMultipleAccoProducts',[]) ? 'true': 'false' }};
_config.cartInfoUrl = '{{ demi_checkoutUrl('cart','hasAccoInCart')|raw }}';
_config.roomList = true;
_config.paramTabs = true;
_config.isWhitelabel = {{ demi_core_configuration("getIsWhitelabel",[]) ? 'true' : 'false' }};
_config.trackingCountingClicksUrl = '{{ countingClicksUriJs|raw }}';
_config.productData = {
id: {{ accommodation.getId() }},
name: "{{ demi_impressionName(accommodation) }}",
category: "{{ demi_impressionCategory(accommodation, null, searchParam) }}",
brand: "{{ demi_impressionBrand(accommodation) }}"
};
_config.acommodationMapHideBusinesses = {{ demi_core_configuration('getMapHideBusinesses',[]) ? 'true' : 'false' }};
{% set mealtypeId = searchParam.getMealTypeId() %}
{% if mealtypeId is not empty and mealtypeId[0] is not empty %}
_config.urlParams = _config.urlParams || [];
_config.urlParams.push({name: "mealtype", value: "{{ mealtypeId[0] }}"});
{% endif %}
{% if searchParam.getBookOnly() %}
_config.urlParams = _config.urlParams || [];
_config.urlParams.push({name: "bookonly", value: "on"});
{% endif %}
</script>
{{ include('@ElementsDemiFrontend/Includes/canonicalOverride.html.twig', {'object' : accommodation }) }}
{{ include('@ElementsDemiFrontend/Includes/tags/detail-acco.html.twig',
{
'isMobile': false,
'acco': accommodation,
'searchParam': searchParam,
'accoResultSet': accommodationResultSet,
'productResultSet': productResultSet,
'packages': packages is defined ? packages : null,
'sortedMarketingGroups': sortedMarketingGroups,
'sortedFacilities': sortedFacilities,
'sortedHealthMeasures':sortedHealthMeasures,
'hasHousePackages': hasHousePackages
}
) }}
<main id="main" role="main">
<div>
<div class="js-search-data__show-if-submitted" {{ availabilityIsChecked ? '' : 'hidden' }}>
{{ include('@ElementsDemiFrontend/Includes/ribbon.html.twig',{'searchParam': searchParam,'showBackButton': true, 'withFlag': false}) }}
</div>
<div class="js-search-data__hide-if-submitted" {{ availabilityIsChecked ? 'hidden' : '' }}>
{{ include('@ElementsDemiFrontend/Includes/ribbon-price.html.twig',{'resultSet': accommodationResultSet ? accommodationResultSet.getMinPriceBase(true): null, 'accommodation': accommodation}) }}
</div>
</div>
<div class="container">
{% if accommodation.getIsTesthotel() %}
<div class="demi-test-acco-notice mb-3 text-danger"><strong>Testbetrieb</strong> nur für Debug/aktive
Pimcore User sichtbar
</div>{% endif %}
<h1 class="h2 text-primary{{ hasClassificationsWithIcons ? ' mb-1' : '' }}">{{ demi_getAccoNameWithStars(accommodation) }}</h1>
{% for classification in classifications %}
<div class="row row--gutter-width-20 mb-2">
<div class="col col-auto">
{% set count = classification.getClassificationGroupAmount() %}
{% set group = classification.getClassificationGroup() %}
{% if count is not empty and classification.getShowAsIcon() and classification.demiGetIcon() is not null %}
<span class="classification_holder hidden-xs"
aria-label="{{ count }} {{ group.getName() }}">
{% for c in 0..count %}
{% set thumbnail = classification.demiGetIcon().getThumbnail('demi-classification') %}
{{ thumbnail.getHTML()|raw }}
{% endfor %}
{% if classification.getIsSuperior() %}
<span class="classification-superior">S</span>
{% endif %}
</span>
{% endif %}
</div>
</div>
{% endfor %}
<div class="row row--gutter-width-20 mb-2">
<div class="col col-auto">
{{ accommodation.getCategoryNames(2) }}
</div>
<div class="col">
<div class="media text-muted">
{% if accommodation.getTown() is not null and (accommodation.getTown().getNameLocalized(app.request.locale) is not empty or accommodation.getTown().getName() is not empty) %}
<div class="demi-icon demi-icon-marker mr-1 icon-in-text"
title="{{ 'demi.list.town'|trans }}" aria-label="{{ 'demi.list.town'|trans }}"></div>
<div class="media-body">
{{ accommodation.getTown().getNameLocalized(app.request.locale) is not empty ? accommodation.getTown().getNameLocalized(app.request.locale) : accommodation.getTown().getName() }}
</div>
{% elseif accommodation.getDistrict() is not null and (accommodation.getDistrict().getNameLocalized(app.request.locale) or accommodation.getDistrict().getName() is not empty) %}
<div class="demi-icon demi-icon-marker mr-1 icon-in-text"
title="{{ 'demi.list.town'|trans }}" aria-label="{{ 'demi.list.town'|trans }}"></div>
<div class="media-body">
{{ accommodation.getDistrict().getNameLocalized(app.request.locale) is not empty ? accommodation.getDistrict().getNameLocalized(app.request.locale) : accommodation.getDistrict().getName() }}
</div>
{% elseif address is not null and address.getTown is not null %}
<div class="demi-icon demi-icon-marker mr-1 icon-in-text"
title="{{ 'demi.detail.town'|trans }}"
aria-label="{{ 'demi.detail.town'|trans }}"></div>
<div class="media-body">
{{ address.getTown() }}
</div>
{% endif %}
</div>
</div>
</div>
<div class="row row--gutter-width-20 mb-2">
<div class="col">
{% if accommodation.getRatingSystem()=="TrustYou" %}
{% set normalizedRating = demi_ratingGetNormalized(accommodation, maxRatingValue, maxRatingNormalized) %}
{% if normalizedRating is not empty %}
<img src="/static/demi/debug/img/trustyou-logo.png" alt="Logo Trustyou" class="mb-1">
{{ include('@ElementsDemiFrontend/Includes/rating.html.twig', {
"score": normalizedRating,
"text": accommodation.getRatingScoreDescription(),
"styleModifier": "mb-1",
"showReviewCount": true,
"ratingCount": accommodation.getRatingCountDirect()
}) }}
{% endif %}
{% endif %}
</div>
<div class="col col-auto">
{{ include('@ElementsDemiFrontend/Accommodation/includes/serviceprovider-logo.html.twig', {
"logo": accommodation.getImages([constant('Elements\\Demi\\Deskline\\Constant\\DocumentInterface::DOCUMENT_TYPE_SERVICE_PROVIDER_LOGO')])|first
}) }}
</div>
</div>
</div>
<figure class="figure my-3">
{% set firstImage = accommodation.getFirstImage(imagesTypes,fromDate) %}
{% if firstImage is not null %}
{{ firstImage.getThumbnail('demi-mobile-header-img').getHTML({ 'imgAttributes': {'class': 'img-full-width' }})|raw }}
{% endif %}
{% set images = accommodation.getImages(imagesTypes, fromDate, true) %}
{% set photoCount = images|length %}
{% if photoCount > 1 %}
<div class="figure__item figure__item--right figure__item--bottom m-3">
<button class="btn btn-primary js-overlay__toggle js-tracking--click-piwik"
data-target="#{{ accommodation.getId() }}-imgs-overlay"
data-tracking-category="Gallery"
data-tracking-action="open">
{% set galleryString = photoCount > 1 ? 'demi.detail.images-gallery-button'|trans : 'demi.detail.image-gallery-button'|trans %}
{% set galleryString = galleryString|replace({'[AMOUNT_IMAGES]': photoCount}) %}
{% do elements_opengraph().setImages(elements_opengraph().getImages|merge( [app.request.getHost() ~ (images|first).getThumbnail('ogimages')])) %}
{{ galleryString }}
</button>
</div>
</div>
{% endif %}
</figure>
<div class="container" aria-live="polite">
<div class="js-room-list__loading js-corridor__search-info-loading" hidden>
<div class="text-center py-3">
{{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig') }}
</div>
</div>
<div class="js-room-list__content js-corridor__search-info-content" id="searchInfo" data-list="searchInfo">
{{ include('@ElementsDemiFrontend/Accommodation/searchInfoBox.mobile.html.twig', {
"accommodationResultSet": accommodationResultSet,
"isPackage": false,
}) }}
</div>
</div>
<div class="mt-3">
<ul class="nav nav-border-tabs justify-content-center" role="tablist">
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['detail'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['detail'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['detail'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="detail"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ 'demi.detail.tab.accommodation-details'|trans }}
</a>
</li>
<li class="nav-item" {{ hasHousePackages or (destinationPackages is not null and destinationPackages|length > 0 and demi_core_configuration("getShowDestinationPackagesOnAccoDetail",[])) ? "" : "hidden" }}>
<a class="nav-link js-param-tab{{ activeTab == anchors['package'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['package'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['package'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="package"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ 'demi.detail.tab.packages'|trans }}
</a>
</li>
<li class="nav-item">
<a class="nav-link js-param-tab {{ activeTab == anchors['rooms'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['rooms'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['rooms'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="rooms"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ demi_getRoomsTabTranslationKey(accommodation)|trans }}
</a>
</li>
</ul>
</div>
<div class="bg-light-gray pb-4 pt-2">
<div class="tab-content">
<div class="tab-pane{{ activeTab == anchors['detail'] ? ' active ' : '' }} pt-2" id="details"
role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-details.mobile.html.twig" ,{
'package': false,
'address': address,
'photoCount': photoCount is defined ? photoCount : 0,
'availabilityIsChecked': availabilityIsChecked,
'fromDate': fromDate
}) }}
</div>
<div class="tab-pane{{ activeTab == anchors['package'] ? ' active ' : '' }} pt-2" id="packages"
role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-packages.mobile.html.twig" ,{
'packages': packages is defined ? packages : null,
'destinationPackages': destinationPackages is defined ? destinationPackages : null,
'accommodation': accommodation
}) }}
</div>
<div class="tab-pane{{ activeTab == anchors['rooms'] ? ' active ' : '' }} pt-2" id="rooms"
role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-rooms.html.twig" ,{
'package': false,
'availabilityIsChecked': availabilityIsChecked,
'accommodation': accommodation,
'housePackageMaster': null,
'resultSetPresent': resultSetPresent,
'tvbPackage': null,
}) }}
</div>
</div>
<div class="mt-4 text-center">
{{ include("@ElementsDemiFrontend/Accommodation/includes/enquiry-button.html.twig", {
"text": "demi.detail.enquiry-button"|trans,
"trackingCategory": "Accommodation detail",
"trackingAction": "click enquiry"
}) }}
</div>
</div>
</main>
{% set contactSnippet = demi_core_configuration('getContactSnippet',[]) %}
{% if(contactSnippet is not empty) %}
{{ pimcore_inc(contactSnippet) }}
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/overlays/search.html.twig',{
'filterSnippet': pimcore_relation('filterSnippet').getData(),
'searchParam': searchParam,
'noDate': noDate is defined ? noDate : searchParam.getDateFrom() is not null,
'isSearch': true
}) }}
{{ include('@ElementsDemiFrontend/Includes/overlays/img-gallery.html.twig',{
'accommodation': accommodation,
'imagesTypes': imagesTypes
}) }}
{% if demi_core_configuration("getDisableEnquiry",[])!=true and accommodation.getAddress() is not empty and accommodation.getAddress().getEmail() is not empty %}
{{ include('@ElementsDemiFrontend/Includes/overlays/inquiry-overlay.html.twig', {
'accommodation': accommodation,
'searchParams': searchParam,
'user': user
}) }}
{% endif %}
{% if demi_core_configuration('getWarningOnMultipleAccoProducts',[]) %}
{{ include('@ElementsDemiFrontend/Includes/modals/warningOnMultipleAccoProductsModal.html.twig', {'cartUrl': step1Url}) }}
{% endif %}
{% endblock %}