templates/Tour/detail/map.html.twig line 1

Open in your IDE?
  1. {% set contentPoolDomainMapping = {
  2.     '1142': 'maps.erzberg-leoben.at',
  3.     '1141': 'maps.gesaeuse.at',
  4.     '1137': 'maps.murtal.at',
  5.     '1138': 'maps.regionmurau.at',
  6.     '1140': 'maps.regiongraz.at',
  7.     '1077': 'maps.ausseerland.at',
  8.     '1136': 'maps.schladming-dachstein.at',
  9.     '1120': 'maps.suedsteiermark.com',
  10.     '1139': 'maps.hochsteiermark.at',
  11.     '1133': 'maps.oststeiermark.com',
  12.     '1135': 'maps.thermen-vulkanland.at'
  13. } %}
  14. {#1134 is fallback Steiermark pool#}
  15. {% set contentPoolId = tour.mandatorId ?? '1134' %}
  16. {% set mapDomain = 'maps.steiermark.com' %}
  17. {% if contentPoolDomainMapping[contentPoolId] is defined %}
  18.     {% set mapDomain = contentPoolDomainMapping[contentPoolId] %}
  19. {% endif %}
  20. <section class="container content-block">
  21.     {{ include('Includes/title-block.html.twig', {
  22.         title: 'tour-detail.Map & Downloads'|trans,
  23.         isCentered: true
  24.     }) }}
  25.     <div class="position-relative tour-map">
  26.             {% if tour.generalSolutionsId %}
  27.                 <div class="js-consent-overlay col-12 embed-responsive embed-responsive-9by3 embed-responsive-contwise-map-xs" data-consent-type="marketing">
  28.                     <div class="js-consent-overlay__overlay contwise-map__overlay embed-responsive-item consent-overlay bg-light-bg d-flex justify-content-md-center flex-column align-items-center">
  29.                         {{ 'cookies.accept-cookies-to-show-map' |trans }}
  30.                         <button type="button" class="btn btn-primary-light mt-4 js-consent-overlay__btn">
  31.                             {{ 'cookies.accept-marketing-cookies' |trans }}
  32.                         </button>
  33.                         <div class="loading-spinner js-consent-overlay__loading mt-4" aria-label="lädt" hidden>
  34.                             <div class="loading-spinner__item loading-spinner__item--1"></div>
  35.                             <div class="loading-spinner__item loading-spinner__item--2"></div>
  36.                             <div class="loading-spinner__item loading-spinner__item--3"></div>
  37.                         </div>
  38.                     </div>
  39.                     <iframe class="contwise-map__iframe js-consent-overlay__iframe embed-responsive-item" data-iframe-src="https://{{ mapDomain }}/v2/{{ app.request.locale }}/auto/2d/-1/detail/-1/-1/-1/-1/{{ tour.generalSolutionsId }}?hideCookieConsent=true&showEmbedded=true&showSheet=true&showMapTopControls=true" height="467px" width="100%"></iframe>
  40.                 </div>
  41.             {% endif %}
  42.     </div>
  43.     <div class="row vertical-gutter--2 pt-4 pt-md-5 d-flex justify-content-center">
  44.         {% if tour.gpxFile is instanceof('\\Pimcore\\Model\\Asset') %}
  45.             <div class="col-md-4 vertical-gutter__item"><a href="{{ path('app_asset_download', {id: tour.gpxFile.id}) }}" class="btn btn-outline-primary btn-block">{{ 'tour-detail.Download GPX Daten'|trans }}</a></div>
  46.         {% endif %}
  47.         {% if tour.kmlFile is instanceof('\\Pimcore\\Model\\Asset') %}
  48.             <div class="col-md-4 vertical-gutter__item"><a href="{{ path('app_asset_download', {id: tour.kmlFile.id}) }}" class="btn btn-outline-primary btn-block">{{ 'tour-detail.Download KML Daten'|trans }}</a></div>
  49.         {% endif %}
  50.     </div>
  51. </section>