{% set hasRatingWidget = demi_ratingGetHasRatingWidgetTrustYou(accommodation) %}
{% set extension = accommodation.getDemiExtension().getDemiEnrichAcco() %}
{% set hasBookingLink = false %}
{% if extension and extension.getDemiEnrichAccoObject() is instanceof("\\Pimcore\\Model\\DataObject\\DemiEnrichAcco") and extension.getDemiEnrichAccoObject().getBookingUrl() %}
{% set hasBookingLink = true %}
{% set bookingLink = demi_findNiceUrl(extension.getDemiEnrichAccoObject().getBookingUrl()) %}
{% endif %}
<section class="container">
{% if impressionLinks is not empty %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/impressions.mobile.html.twig", {
"package": package,
'impressionLinks': impressionLinks,
"photoCount": photoCount,
"trackingLabel": accommodation.getId()
}) }}
{% endif %}
<section class="mt-4" data-track-content
data-content-name="{{ package is defined and package is not null ? 'package-' : '' }}accommodation-description">
<h2 class="h3 mb-2">{{ 'demi.detail.headline.acco-details'|trans }}</h2>
<div class="card box-shadow js-expandable expandable-block">
<script data-cookieconsent="ignore">
_config.expandable = true;
</script>
<div class="expandable-block__content-wrapper js-expandable__content-wrapper">
<div class="card-body js-expandable__content expandable-block__content">
<div class="wysiwyg">
{{ include('@ElementsDemiFrontend/Accommodation/includes/detail-templates/acco-current-information.html.twig', {'accommodation': accommodation}) }}
{{ accommodation.getDescription(null, app.request.locale, fromDate)|raw }}
</div>
{% set marketingLogos = [] %}
{% set noLogoMarketingGroups = [] %}
{% if sortedMarketingGroups is not empty %}
{% for marketingGroup in sortedMarketingGroups %}
{% set marketingGroupId = marketingGroup.getId() %}
{% if marketingGroup.getName(app.request.locale) is not empty %}
{% if marketingGroup.demiGetIcon() is not empty %}
{% set marketingLogos = marketingLogos | merge({marketingGroupId: {
'name': marketingGroup.getName(app.request.locale),
'icon': marketingGroup.demiGetIcon(),
'text': marketingGroup.getTooltip()
}}) %}
{% else %}
{% if marketingGroup.getId() not in (marketingLogos|keys) %}
{% set noLogoMarketingGroups = noLogoMarketingGroups | merge([marketingGroup]) %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/marketinggroups.mobile.html.twig",{
"noLogoMarketingGroups": noLogoMarketingGroups,
"marketingLogos": marketingLogos
}) }}
{% endif %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/classifications.html.twig", []) }}
</div>
</div>
{{ include('@ElementsDemiFrontend/Includes/elements/read-more.mobile.html.twig') }}
</div>
</section>
{% if sortedHealthMeasures is not empty %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/health-and-security.mobile.html.twig", {
"package": package,
"sortedFacilities": sortedHealthMeasures,
"headlineKey": "demi.detail.headline.health-facilities"
}) }}
{% endif %}
{% set hostInfo = demi_getHostInformation(accommodation) %}
{% set hostImages = hostInfo["hostImages"] %}
{% set hostDescriptions = hostInfo["hostDescriptions"] %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/hostdescriptions.mobile.html.twig", {
"package": package,
"hostImages": hostImages,
"hostDescriptions": hostDescriptions
}) }}
{% set links = accommodation.getLinks([
constant("Elements\\Demi\\Deskline\\Constant\\LinkTypeInterface::DESKLINE_LINK_URL"),
constant("Elements\\Demi\\Deskline\\Constant\\LinkTypeInterface::DESKLINE_LINK_NOTDEFINED")]) %}
{% set lt = accommodation.getDescription(constant("\\Elements\\Demi\\Deskline\\Constant\\DescriptionInterface::DESCRIPTION_SERVICE_PROVIDER_CONDITIONS"), app.request.locale, fromDate) %}
{% if lt is empty %}
{% set lt = accommodation.getDescription(constant("\\Elements\\Demi\\Deskline\\Constant\\DescriptionInterface::DESCRIPTION_SERVICE_PROVIDER_CONDITIONS"), "en", fromDate) %}
{% endif %}
{% if sortedFacilities is not empty or links is not empty or lt is not empty %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/facilities.mobile.html.twig", {
"package": package,
"sortedFacilities": sortedFacilities,
"links": links,
"lt": lt
}) }}
{% endif %}
{% if accommodation.getDemiExtension() is not empty %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/demiExtensions.mobile.html.twig", {
"extensions": accommodation.getDemiExtension(),
"package": package
}) }}
{% endif %}
{% set lat = "" %}
{% set lng = "" %}
{% if accommodation.getPosition() is not empty and address is not empty %}
{% set pos = accommodation.getPosition() %}
{% if pos.getLatitude() is not empty and pos.getLongitude() is not empty %}
{% set lat = pos.getLatitude %}
{% set lng = pos.getLongitude() %}
{% endif %}
{% set googleMapLink = demi_getGoogleMapsUrl(
accommodation.getName() ~ demi_getStars(accommodation, true),
address,
app.request.locale,
lat,
lng,
accommodation.getProperty('google_place_id')
) %}
{% endif %}
{% if address is not empty or accommodation.getServiceProviderArrivalVoucher() is not empty %}
<section class="mt-4 accommodation-contact" data-track-content
data-content-name="{{ package ? 'package-' : 'accommodation-' }}contact">
<h2 class="h3 mb-2">{{ 'demi.detail.headline.contact-and-getting-there'|trans }}</h2>
<div class="card box-shadow">
<div class="card-body">
{% if address is not empty %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/contactaddress.mobile.html.twig", {
'headlineText': demi_getAccoNameWithStars(accommodation),
'address': address,
'googleMapLink': googleMapLink is defined ? googleMapLink : null,
'trackingLabel': accommodation.getName(),
'lat': lat,
'lng': lng,
'acco': accommodation
}) }}
{% endif %}
{% if accommodation.getServiceProviderArrivalVoucher() is not empty %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/arrivalvoucher.mobile.html.twig", {
'accommodation': accommodation
}) }}
{% endif %}
</div>
</div>
</section>
{% endif %}
{% if accommodation.getRatingSystem() == "TrustYou" and hasRatingWidget == true %}
{{ include("@ElementsDemiFrontend/Accommodation/includes/detail-templates/rating.mobile.html.twig", {
'package': package,
'accommodation': accommodation
}) }}
{% endif %}
<div class="mt-4">
{% if package %}
{% set id = "booking" %}
{% else %}
{% set id = "rooms" %}
{% endif %}
{% if hasBookingLink or accommodation.getSystemIdentifier() is same as "Deskline" %}
<div class="js-search-data__show-if-submitted " {{ availabilityIsChecked ? 'hidden' : '' }} >
<a href="#{{ id }}"
data-target="#{{ id }}"
aria-controls="{{ id }}"
class="btn btn-success btn-block btn-lg js-open-tab-and-scroll js-tracking--click"
data-tracking-category="{{ package ? 'Package detail': 'Accommodation detail' }}"
data-tracking-action="click booking detail bottom"
>
<script data-cookieconsent="ignore">
_config.openTabAndSroll = true;
</script>
<span class="btn__icon demi-icon demi-icon-cart mr-2" aria-hidden="true"></span>
{{ "demi.detail.booking-button"|trans }}
</a>
<div class="mt-2 text-center text-success small">
{{ "demi.detail.promote-booking-speed"|trans }}
</div>
</div>
{% if hasBookingLink %}
<a class="btn btn-success btn-block btn-lg my-3"
href="{{ bookingLink }}" target="_blank">
<span class="demi-icon demi-icon-person btn__icon"></span>
{{ "demi.detail.external-booking.cta" | trans }}
</a>
{% else %}
{% set resultSet = accommodationResultSet is defined ? accommodationResultSet : null %}
{% if demi_accoBookableOrOfferable(accommodation, resultSet ,demi_core_configuration("getDisableEnquiry",[])) and not document.property("demi_hideVacancySearch") %}
<button type="button"
class="btn btn-success btn-block btn-lg js-overlay__toggle my-3 js-open-tab-and-scroll js-search-data__hide-if-submitted"
data-tab-target="#{{ id }}"
data-target="#search-overlay" {{ availabilityIsChecked ? 'hidden' : '' }}>
<span class="demi-icon demi-icon-person btn__icon"></span>
{{ 'demi.detail.search-vacancies-button'|trans }}
</button>
{% endif %}
{% endif %}
{% endif %}
</div>
</section>