{% do jsConfig().add('inputStates', true) %}
{% do jsConfig().add('datepicker', true) %}
{% do jsConfig().add('numberSpinner', true) %}
{% set language = app.request.locale %}
{% set viewdata = demi_additionalPrepareDateForDetailFile(offeritem, language, document) %}
{% do demi_paymentSetDefaultCurrency(viewdata.provider) %}
{% set currency = demi_paymentGetCurrency() %}
{% set metaTitle = offeritem.metaTitle %}
{% if metaTitle is empty %}
{% set metaTitle = offeritem.name %}
{% set metaTitle = metaTitle ~ (viewdata.provider.getTown() ? ( ' ' ~ 'demi.seo.in'|trans ~ " " ~ viewdata.provider.getTown().getName() ~ ' ') : '') %}
{% endif %}
{% if not editmode %}
{% do elements_head_title().setTitle(metaTitle, true) %}
{% do elements_head_meta(chooseDescription(offeritem.metaDescription, offeritem.getDescription(constant('Elements\\Demi\\Deskline\\Constant\\DescriptionInterface::DESCRIPTION_SERVICE_DESCRIPTION'))|striptags), true ) %}
{% endif %}
{% set breadcrumbUrl = app.request.pathInfo %}
{% do elements_canonical().checkAllParams(false).setDomain(viewdata.canonicalUrl)|raw %}
{% if not viewdata.canonicalUrl is same as(app.request.pathInfo) %}
{% do elements_robots().setNoIndex(true) %}
{% endif %}
{% set fromDate = fromDate|default(carbon().now) %}
{% set images = offeritem.getImages(null, fromDate) %}
{% if viewdata.photoCount > 0 %}
{% do elements_opengraph().setImages([hostUrl() ~ images[0]]|merge(elements_opengraph().getImages())) %}
{% endif %}
{% set generalDocuments = [] %}
{% for doc in offeritem.getDocuments() %}
{% if doc is not instanceof("\\Pimcore\\Model\\DataObject\\DemiDocumentImage") %}
{% set generalDocuments = generalDocuments|merge([doc]) %}
{% endif %}
{% endfor %}
{% extends '@ElementsDemiFrontend/Layout/layout.html.twig' %}
{% block content %}
{# TODO @msteyrer breadcrumb helper bundle not in use atm#}
{# {% do breadcrumbHelper().set({#}
{# 'parentId': document.id,#}
{# 'url': breadcrumbUrl,#}
{# 'label': offeritem.name(language)|default('')#}
{# }) %}#}
{# {{ include('@ElementsDemiFrontend/Navigation/breadcrumb.html.twig') }}#}
{% do jsonLd().add("AdditionalService", demi_additionalJsonlDData(offeritem, viewdata.fromToRanges, {locale: language})) %}
{# {% do jsConfig().add('tracking', true) %}#}
{# {% do jsConfig().add('activityList', true) %}#}
{# {% do jsConfig('_config').add('initialTracking', [{#}
{# type: 'detailView',#}
{# data: {#}
{# id: viewdata.provider.id,#}
{# name: demi_impressionName(viewdata.provider),#}
{# category: demi_impressionCategory(viewdata.provider, null, null, null, offeritem),#}
{# brand: demi_impressionBrand(viewdata.provider),#}
{# price: demi_getFirstPrice(offeritem),#}
{# }#}
{# }]) %}#}
{# {{ dump(jsConfig()) }}#}
{# {% do jsConfig().add('ajaxModal', true) %}#}
{% do jsConfig().add({
tracking: true,
activityList: true,
initialTracking: [{
type: 'detailView',
data: {
id: viewdata.provider.id,
name: demi_impressionName(viewdata.provider),
category: demi_impressionCategory(viewdata.provider, null, null, null, offeritem),
brand: demi_impressionBrand(viewdata.provider),
price: demi_additionalGetFirstPrice(offeritem),
}
}],
ajaxModal: true,
ajaxOverlay: true,
offerOverlay: true,
additionalOffersJson: {},
overlay: true
}) %}
{{ include("@ElementsDemiFrontend/Includes/canonicalOverride.html.twig", {
object: offeritem
}) }}
{% if not activeTab|default('') in viewdata.anchors %}
{% set activeTab = '#details' %}
{% else %}
{% do jsConfig('_initialState').add('activeTab', activeTab|default('')) %}
{% endif %}
<main id="main" role="main" class="js-affix__container">
<div class="ribbon row row--gutter-width-1 d-md-none">
<div class="col col-auto d-flex flex-column">
<button type="button" onclick="history.back()"
class="ribbon__item py-3 btn-no-styling px-3 flex-auto flex-row">
<span class="demi-icon demi-icon-chevron-left f17" aria-label="{{ 'demi.back'|trans }}"
title="{{ 'demi.back'|trans }}"></span>
</button>
</div>
<div class="col">
<div class="ribbon__item py-3 font-medium h-100">
<div class="row row--gutter-width-10 align-items-baseline">
<a href="#" onclick="history.back()">{{ 'demi.back'|trans }}</a>
</div>
</div>
</div>
</div>
{{ include('@ElementsDemiFrontend/Includes/modals/warningOnMultipleAccoProductsModal.html.twig', {
cartUrl: viewdata.cartUrl,
}) }}
<div hidden>
{{ include('@ElementsDemiFrontend/Accommodation/lightboxTopbar.html.twig') }}
</div>
{% if viewdata.photoCount >= 1 %}
{% do jsConfig().add('lightbox', true) %}
{% if pimcore_device().isDesktop() %}
{{ include('@ElementsDemiFrontend/AdditionalService/includes/additionalservice-header-multi-image.desktop.html.twig', {
photoCount: viewdata.photoCount,
imageList: viewdata.detailSlides
}) }}
{% endif %}
{% if not pimcore_device().isDesktop() %}
<figure class="figure">
{% if offeritem.getFirstImage(null, fromDate) %}
{{ offeritem.getFirstImage(null, fromDate).thumbnail('demi-mobile-header-img').html({
class: 'img-full-width'
})|raw }}
{% endif %}
{% if viewdata.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="#{{ offeritem.id }}-imgs-overlay"
data-tracking-category="Gallery"
data-tracking-action="open">
{% set galleryString = (viewdata.photoCount > 1 ? 'demi.detail.images-gallery-button'|trans : 'demi.detail.image-gallery-button'|trans)|replace({'[AMOUNT_IMAGES]': viewdata.photoCount}) %}
{{ galleryString }}
</button>
</div>
{% endif %}
</figure>
{% endif %}
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/elements/breadcrumb.html.twig') }}
<div class="container container--additional-service-detail pt-4 pt-md-5">
<div class="row mb-md-3">
<div class="col">
{{ include('@ElementsDemiFrontend/AdditionalService/detail/intro.html.twig', {
detailHeadline: offeritem.name(language),
}) }}
{% if viewdata.serviceTown|default(null) %}
<div class="media text-muted mb-md-0 mb-3">
<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">
{{ viewdata.serviceTown }}
</div>
</div>
{% endif %}
</div>
<div class="col col-auto">
<div>
{% set logos = viewdata.provider.getImages([constant('\\Elements\\Demi\\Deskline\\Constant\\DocumentInterface::DOCUMENT_TYPE_SERVICE_PROVIDER_LOGO')]) %}
{% if not logos is empty %}
{{ include('@ElementsDemiFrontend/Accommodation/includes/serviceprovider-logo.html.twig', {
logo: logos[0]
}) }}
{% endif %}
</div>
</div>
</div>
<div class="row">
<div class="col-xl-9 col-md-8 col-12 order-2 order-md-1">
<script data-cookieconsent="ignore">
_config.paramTabs = true;
_config.loadAccoImages = true;
</script>
<div class="mt-md-3">
<ul class="nav nav-border-tabs d-none d-md-flex" role="tablist">
<li class="nav-item">
<a class="nav-link js-param-tab {{ activeTab|default('') == viewdata.anchors['details'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ viewdata.anchors['details'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab|default('') == viewdata.anchors['details'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="additionalservice-details"
data-tracking-label="{{ offeritem.name|escape('html') }}">
{{ "demi.additionalservice.detail.tab.description"|trans }}
</a>
</li>
{% if viewdata.photoCount > 3 %}
<li class="nav-item">
<a class="nav-link js-param-tab js-acco-images__tab {{ activeTab|default('') == viewdata.anchors['pictures'] ? ' active' : '' }} js-tracking js-tracking--click"
href="{{ viewdata.anchors['pictures'] }}"
data-toggle="tab"
role="tab"
aria-expanded="{{ activeTab|default('') == viewdata.anchors['pictures'] ? 'true' : 'false' }}"
data-tracking-category="button"
data-tracking-action="additionalservice-pictures"
data-tracking-label="{{ offeritem.name|escape('html') }}">
{% if viewdata.videoCount|default(0) == 0 %}
{{ "demi.detail.tab.photos"|trans }}
{% else %}
{{ "demi.detail.tab.photos-videos"|trans }}
{% endif %}
</a>
</li>
{% endif %}
</ul>
</div>
<div class="pt-md-2">
<div class="tab-content">
<div class="tab-pane pt-md-2{{ activeTab == viewdata.anchors['details'] ? ' active' : '' }}"
id="details" role="tabpanel">
{% set infoTemplateName = viewdata.descriptionTypes|length + viewdata.localDescriptions|length > 4 ? "serviceInfoCollapse" : "serviceInfo" %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/' ~ infoTemplateName ~'.html.twig', {
detailHeadline: 'demi.additionalservice.detail.service-headline-description'|trans,
detailText: viewdata.serviceDescription|default(''),
moreDescriptions: viewdata.descriptionTypes,
localDescriptions: viewdata.localDescriptions,
offerItem: offeritem
}) }}
{% if not viewdata.providerDescription is empty %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/serviceproviderInfo.html.twig', {
detailHeadline: 'demi.additionalservice.detail.serviceprovider-headline-description'|trans,
detailText: viewdata.providerDescription,
}) }}
{% endif %}
{% if not viewdata.datesAndTimes is empty and (not viewdata.datesAndTimes.dates is empty or not viewdata.datesAndTimes.times is empty) %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/date.html.twig', {
detailDate: viewdata.datesAndTimes.dates|join("<br>"),
detailTime: viewdata.datesAndTimes.times
}) }}
{% endif %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/contact.html.twig', {
service: offeritem,
addressOwner: addressOwner|default(null),
addressObject: addressObject|default(null)
}) }}
{% if not viewdata.linkArray is empty %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/links.html.twig', {
detailHeadline: templateData|default(null) ? templateData.detailLinkHeader : '',
detailLinks: viewdata.linkArray,
}) }}
{% endif %}
{% if generalDocuments is not empty %}
{{ include('@ElementsDemiFrontend/AdditionalService/includes/documents.html.twig', {
'detailDocuments' : generalDocuments
}) }}
{% endif %}
</div>
{% if viewdata.photoCount > 3 %}
<div class="tab-pane pt-md-2{{ activeTab == viewdata.anchors.pictures ? ' active' : '' }}" id="pictures" role="tabpanel">
{{ include('@ElementsDemiFrontend/Accommodation/includes/acco-pictures.desktop.html.twig', {
additionalService: true,
photoCount: viewdata.photoCount,
fromDate: fromDate,
imageList: viewdata.detailSlides,
package: null
}) }}
</div>
{% endif %}
</div>
</div>
</div>
<script>_config.affix = true;</script>
{# DEMI ADJUSTMENTS: styling #}
<div class="col-12 col-md-4 col-xl-3 order-1 order-md-2">
<div class="js-affix__placeholder">
<div class="card bordered additional-offer-card" data-affix-offset="149">
<div class="card-body additional-offer-card__body p-md-4 p-2">
<div>
<div class="container" id="vacancysearch">
<div class="py-2">
<div class="js-ajax-form js-additional-services">
<div aria-live="polite">
{% if viewdata.latest.gte(carbon().now) %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/vacancysearch.html.twig', {
detailHeadline: 'demi.additionalservice.detail.datepicker-notice'|trans,
dateFromLabel: 'demi.additionalservice.detail.from'|trans,
dateToLabel: 'demi.additionalservice.detail.to'|trans,
detailEarliest: viewdata.earliest,
detailLatest: viewdata.latest,
}) }}
{% else %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/serviceover.html.twig', {
detailHeadline: 'demi.additionalservice.detail.offer-over'|trans
}) }}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container container--additional-service-related">
<div class="pt-2">
{% if false and relatedItems and relatedItems|length %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/relatedItems.html.twig', {
detailRelatedItems: relatedItems,
detailHeadline: 'demi.additionalservice.detail.headline-relatedservices'|trans
}) }}
{% endif %}
{% if not offeritem.getDemiExtension() is empty %}
{{ include('@ElementsDemiFrontend/AdditionalService/detail/demiExtension.html.twig', {
detailExtension: offeritem.getDemiExtension(),
}) }}
{% endif %}
</div>
</div>
</main>
{{ include('@ElementsDemiFrontend/Includes/overlays/img-gallery.html.twig', {
additionalService: offeritem,
tvbPackage: null,
destinationPackage: null,
imagesTypes: []
}) }}
{% if pimcore_device().isPhone() %}
{{ include('@ElementsDemiFrontend/Includes/overlays/date.html.twig', {
'date': carbon().now()
}) }}
{% endif %}
{% endblock %}