{% if not availabilityIsChecked %}
{% set fromDate = null %}
{% else %}
{% set fromDate = demi_getSearchFrom() %}
{% endif %}
{% if not editmode %}
{% do elements_head_title().setTitle( demi_seoTitleForHousePackage(accommodation,housePackageMaster,null), true ) %}
{% do elements_head_meta().setDescription( demi_seoDescriptionForHousePackage(accommodation,housePackageMaster,null,fromDate),true ) %}
{% endif %}
{% set canonicalUrl = linkGenerator().generate(housePackageMaster) %}
{% do elements_canonical().checkAllParams(false).setDomain(canonicalUrl)|raw %}
{% set deactivateHrefland = true %}
{% do demi_paymentGetDefaultCurrency(accommodation) %}
{% set address = accommodation.getAddress() %}
{% set maxRatingValue = demi_core_configuration('getMaxRatingValue',[]) ?: 5 %}
{% set maxRatingNormalized = demi_core_configuration('getMaxRatingNormalized',[]) ?: 5 %}
{% set hasRatingWidget = demi_ratingGetHasRatingWidgetTrustYou(accommodation) %}
{% set accoUrlPlain = demi_demiUrl({
'accommodation': accommodation
},'demi_acco_detail_page',true) %}
{% set accoUrl = accoUrlPlain %}
{% if "?" in accoUrl %}
{% set accoUrl = accoUrl ~ "&activeTab=%23packages" %}
{% else %}
{% set accoUrl = accoUrl ~ "?activeTab=%23packages" %}
{% endif %}
{% set housePackageResultSet = housePackageResultSet|length ? housePackageResultSet[0] : null %}
{% set ajaxUrl = demi_demiUrl({
'accommodation': accommodation,
'package': housePackageMaster
},'demi_acco_package_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 step1Url = demi_demiUrl({
'path': demi_core_configuration('getCheckoutPath',[]).getFullPath(),
'controller': 'cart',
'action': 'step1'
},'demi_checkout',true) %}
{% set anchors = {
'details': '#details',
'booking': '#booking',
'pictures': '#pictures',
'rating': '#ratings'
} %}
{% if activeTab is not defined or activeTab not in anchors %}
{% set activeTab = '#details' %}
{% else %}
{% do jsConfig('_initialState').add({'activeTab': activeTab}) %}
{% endif %}
{% set imagesTypes = demi_getAccoImagesTypesAsArray(housePackageMaster) %}
{% set imageList = housePackageMaster.getImages(null, fromDate, true) %}
{% set imageList = imageList|merge(accommodation.getImages(imagesTypes, fromDate, true)) %}
{% if imageList is not empty %}
{% do elements_opengraph().addImage(imageList[0].getThumbnail('slider-main').getPath()) %}
{% endif %}
{% set photoCount = imageList|length %}
{% set videoCount = impressionLinks["video"]|length %}
{% set panoCount = impressionLinks["pano"]|length %}
{% if showJsonLd %}
{% set jsonLdData = demi_getProductJsonLdData(accommodation, housePackageResultSet, housePackageMaster, fromDate, []) %}
{% 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()
}) %}
{% do breadcrumbHelper().append({
'parentId': document.getId(),
'url': canonicalUrl,
'label': housePackageMaster.getName()
}) %}
{{ include('@ElementsDemiFrontend/Navigation/breadcrumb.html.twig') }} #}
{% endif %}
{% set headerName = "full" %}
{% set width = 0 %}
{% set forceMultiHeader = accommodation.getForceMultiHeader() %}
{% if imageList is defined and imageList|length > 0 and imageList[0] is not empty %}
{% set width = imageList[0].getCustomSettings()["imageWidth"] %}
{% do elements_opengraph().addImage(imageList[0].getFullPath()) %}
{% endif %}
{% if width < demi_core_configuration("getMinWidthForFullHeader",[]) or forceMultiHeader %}
{% set headerName = "multi-image" %}
{% endif %}
{% if not canonicalUrl is same as(app.request.pathInfo) %}
{% do elements_robots().setNoIndex(true) %}
{% endif %}
{% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
{% block content %}
{{ include("@ElementsDemiFrontend/Includes/canonicalOverride.html.twig", {
"object": accommodation,
"package": housePackageMaster
}) }}
<script type="text/javascript" data-cookieconsent="ignore">
_config.viewType = "package";
_config.historyController = true;
_config.roomSelection = true;
_config.searchData = true;
_config.detailResultUrl = '{{ liveDetailProductsUrl|raw }}';
_config.corridorSearchUrl = '{{ corridorMatrixUrl|raw }}';
_config.detailPaymentInfoUrl = '{{ paymentInformationUrl|raw }}';
_config.detailProductUrl = '{{ productUrl|raw }}';
_config.addToCartUrl = '{{ step1Url|raw }}';
_config.cartWarningOnMultipleAccoProducts = {{ demi_core_configuration('getWarningOnMultipleAccoProducts',[]) ? 'true': 'false' }};
_config.cartInfoUrl = '{{ demi_checkoutUrl('cart','hasAccoInCart')|raw }}';
_config.roomList = true;
_config.hpmId = "{{ housePackageMaster.getId() }}";
_config.trackingCountingClicksUrl='{{ countingClicksUriJs|raw }}';
_config.productData = {
id: {{ accommodation.getId() }},
name: "{{ demi_impressionName(accommodation) }}",
category: "{{ demi_impressionCategory(accommodation, housePackageMaster, searchParam) }}",
brand: "{{ demi_impressionBrand(accommodation) }}"
};
{#_config.productData = {#}
{# id: {{ accommodation.getId() }},#}
{# name: "{{ demi_impressionName(accommodation) }}",#}
{# category: "{{ demi_impressionCategory(accommodation, housePackageMaster, searchParam, null) }}",#}
{# 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/tags/detail-package.html.twig',
{
'isMobile': false,
'acco': accommodation,
'searchParam': searchParam,
'accoResultSet': accommodationResultSet is defined ? accommodationResultSet : null ,
'productResultSet': productResultSet is defined ? productResultSet : null,
'packages': packages is defined ? packages : null,
'sortedMarketingGroups': sortedMarketingGroups,
'sortedFacilities': sortedFacilities,
'sortedHealthMeasures':sortedHealthMeasures,
'photoCount': photoCount,
'videoCount': videoCount,
'panoCount': panoCount,
'housePackageResultSet': housePackageResultSet,
'housePackageMaster': housePackageMaster
}
) }}
<main id="main" role="main">
<div hidden>
{{ include('@ElementsDemiFrontend/Accommodation/lightboxTopbar.html.twig') }}
</div>
{% set heroImageAlt = 'Package ' ~ housePackageMaster.getName() ~ ' - ' ~ accommodation.name %}
{% if imageList|length >= 3 or headerName=="full" %}
{{ include('@ElementsDemiFrontend/Accommodation/includes/acco-header-' ~ headerName ~'.desktop.html.twig',
{
'photoCount': photoCount,
'videoCount': videoCount,
'panoCount': panoCount,
'imageList': imageList,
'alt': heroImageAlt
}
) }}
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/elements/search-info.desktop.html.twig', { "searchParam": searchParam, "availabilityIsChecked": availabilityIsChecked, "isSearch": false}) }}
<div class="container mt-5">
<div class="row">
<div class="col-xl-9 col-12">
<div class="row mb-5">
<div class="col">
{% 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="text-primary">{{ housePackageMaster.getName() }}</h1>
<h2 class="mb-0">
<a class="js-tracking--click-piwik"
href="{{ accoUrlPlain }}"
data-tracking-category="Package detail"
data-tracking-action="accomoation click">
{{ demi_getAccoNameWithStars(accommodation) }}
</a>
</h2>
<a href="{{ accoUrl }}"
class="mb-3 d-block text-primary js-tracking--click-piwik"
data-tracking-category="Package detail"
data-tracking-action="all packages click">
{{ "demi.detail.package.show-all-offers-of-acco"|trans }}
</a>
<div class="row mb-2">
<div class="col col-auto">
{{ accommodation.getCategoryNames(2) }}
</div>
<div class="col col-auto">
<div class="media text-muted">
{% if address is not empty and address.getTown() is not empty %}
<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 class="col col-auto">
{% if distance is defined and distance is not empty %}
<div class="media text-muted">
<span class="badge badge-primary mr-1">{{ distance['value'] }}</span>
<div class="media-body">
<span class="text-primary">{{ distance['from'] }}</span>
</div>
</div>
{% endif %}
</div>
</div>
</div>
<div class="col col-auto">
<div class="mb-4">
{{ 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>
{% if accommodation.getRatingSystem()=="TrustYou" %}
{% set normalizedRating = demi_ratingGetNormalized(accommodation, maxRatingValue, maxRatingNormalized) %}
{% if normalizedRating is not empty %}
{{ include('@ElementsDemiFrontend/Accommodation/includes/rating-md.html.twig', {
"score": normalizedRating,
"text": accommodation.getRatingScoreDescription(),
"styleModifier": "mb-1",
"showReviewCount": true,
"ratingCount": accommodation.getRatingCountDirect(),
"isTextWhite" : false
}) }}
{% endif %}
{% endif %}
</div>
</div>
<div class="col col-auto">
<div class="row">
<div class="col col-auto d-xl-none d-md-block">
<div class="ml-3" aria-live="polite">
<div class="js-room-list__loading js-corridor__search-info-loading--compact" 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--compact" data-list="searchInfoCompact">
{{ include('@ElementsDemiFrontend/Accommodation/searchInfoBoxCompact.desktop.html.twig', {
"accommodationResultSet": accommodationResultSet is defined ? accommodatonReslutSet : null,
"productResultSet": productResultSet is defined ? productResultSet : null,
"accommodation": accommodation,
}) }}
</div>
</div>
</div>
</div>
</div>
</div>
<script data-cookieconsent="ignore">
_config.paramTabs = true;
_config.loadAccoImages = true;
</script>
<div class="mt-3">
<ul class="nav nav-border-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['details'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['details'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['details'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="package-details"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ "demi.detail.package.tab.package"|trans }} & {{ "demi.detail.package.tab.acco"|trans }}
</a>
</li>
{% if hasRatingWidget %}
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['rating'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['rating'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['rating'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="rating"
data-tracking-label="{{ accommodation.getName()|escape }}">
{{ "demi.detail.tab.ratings"|trans }}
</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link js-param-tab js-acco-images__tab{{ activeTab == anchors['pictures'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['pictures'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['pictures'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="picture"
data-tracking-label="{{ accommodation.getName()|escape }}">
{% if videoCount == 0 %}
{{ "demi.detail.tab.photos"|trans }}
{% else %}
{{ "demi.detail.tab.photos-videos"|trans }}
{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link js-param-tab{{ activeTab == anchors['booking'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ anchors['booking'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab == anchors['booking'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="{{ "demi.detail.package.tab.availability"|trans }}"
data-tracking-label="package-booking">
{{ "demi.detail.package.tab.availability"|trans }}
</a>
</li>
</ul>
</div>
<div class="pb-4 pt-2">
<div class="tab-content">
<div class="tab-pane pt-2{{ activeTab == anchors['details'] ? ' active' : '' }}" id="details" role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/package-details.desktop.html.twig",{
'housePackageMaster': housePackageMaster,
'accommodation': accommodation
}) }}
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-details.desktop.html.twig" ,{
'package': true,
'address': address,
'photoCount': photoCount,
'availabilityIsChecked': availabilityIsChecked,
'fromDate': fromDate
}) }}
</div>
{% if hasRatingWidget %}
<div class="tab-pane pt-2{{ activeTab == anchors['rating'] ? ' active' : '' }}" id="ratings" role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-ratings.desktop.html.twig", {'hasRatingWidget': hasRatingWidget, 'package' : true}) }}
</div>
{% endif %}
<div class="tab-pane pt-2{{ activeTab == anchors['pictures'] ? ' active' : '' }}" id="pictures" role="tabpanel">
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.html.twig", {
'photoCount': photoCount,
'videoCount': videoCount,
'panoCount': panoCount,
'impressionsLinks': impressionLinks,
'fromDate': fromDate,
'imageList': imageList,
'accoId': accommodation.getId(),
'housePackageMasterId': housePackageMaster.getId(),
'package' : true
}) }}
</div>
<div class="tab-pane pt-2{{ activeTab == anchors['booking'] ? ' active' : '' }}" id="booking" role="tabpanel">
{{ include('@ElementsDemiFrontend/Accommodation/includes/acco-rooms.html.twig', {
'package': true,
'availabilityIsChecked': availabilityIsChecked,
'housePackageMaster': housePackageMaster,
'productResultSet': housePackageResultSet,
'tvbPackage' : packages is defined ? packages : null,
'resultSetPresent' : availabilityIsChecked,
'accommodationResultSet' : accommodationResultSet is defined ? accommodatonReslutSet : null,
}) }}
</div>
</div>
</div>
</div>
{{ include("@ElementsDemiFrontend/Accommodation/includes/acco-sidebar.desktop.html.twig",{
'accommodationResultSet': housePackageResultSet,
'productResultSet': housePackageResultSet,
'isPackage': true,
}) }}
</div>
</div>
</main>
{% if not demi_core_configuration("getDisableEnquiry",[]) 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 %}