src/Elements/Bundle/DemiFrontendBundle/Resources/views/Accommodation/includes/acco-packages.desktop.html.twig line 1

Open in your IDE?
  1. {% if packages is not defined %}{% set packages = null %}{% endif %}
  2. {% if destinationPackages is not defined %}{% set destinationPackages = null %}{% endif %}
  3. <section class="mt-4" data-track-content data-content-name="accommodation-packages">
  4.     {% if not isAffiliate %}
  5.     <h2 class="mb-4 text-primary">{{ "demi.detail.package-offers"|trans }}</h2>
  6.     {% endif %}
  7.     <div class="js-search-data__show-if-submitted" {{ availabilityIsChecked ? '' : 'hidden' }}>
  8.     {{ include('@ElementsDemiFrontend/Accommodation/includes/corridor-matrix.html.twig', {
  9.         'styleModifier': 'pt-3',
  10.         'type': 'packages'
  11.         }) }}
  12.     </div>
  13.     <div class="js-room-list" aria-live="polite">
  14.         <div class="js-room-list__loading" hidden>
  15.             <div class="card-body text-center py-5">
  16.                 {{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig') }}
  17.             </div>
  18.         </div>
  19.         <div class="js-room-list__content mt-3" data-list="packages">
  20.             {% if packages is not empty or (destinationPackages is not empty and demi_core_configuration('getShowDestinationPackagesOnAccoDetail',[])) %}
  21.             <ul class="list-unstyled row row--vertical-gutter-30 vertical-gutter--4">
  22.                 {% set position = 1 %}
  23.                 {% if packages is not empty %}
  24.                     {% for package in packages %}
  25.                     <li class="col-4 vertical-gutter__item">
  26.                         {% set productKey = demi_getCheapestProducts(package.getProducts()) %}
  27.                         {% set productKeys = package.getProducts()|keys  %}
  28.                         {% set firstProductId = productKeys[productKey] %}
  29.                         {{ include('@ElementsDemiFrontend/Includes/teaser/package-teaser.html.twig', {
  30.                             'housePackageMaster': pimcore_object(package.getHousePackageMasterId()),
  31.                             'cheapestProducts': [package.getProduct(firstProductId)],
  32.                             'accommodation': accommodation,
  33.                             'position': position}) }}
  34.                     </li>
  35.                         {% set position = position + 1 %}
  36.                     {% endfor %}
  37.                 {% endif %}
  38.                 {% if destinationPackages is not empty and demi_core_configuration("getShowDestinationPackagesOnAccoDetail",[]) and not isAffiliate %}
  39.                     {% for package in destinationPackages %}
  40.                     <li class="col-4">
  41.                         {{ include('@ElementsDemiFrontend/Includes/teaser/destinationPackage-teaser.html.twig', {
  42.                         'destinationPackage': package,
  43.                         'accommodation': accommodation,
  44.                         'position': position})
  45.                         }}
  46.                     </li>
  47.                         {% set position = position + 1 %}
  48.                     {% endfor %}
  49.                 {% endif %}
  50.             </ul>
  51.             {% endif %}
  52.             {% if packages is empty and destinationPackages is empty %}
  53.             <div class="card-body">
  54.                 <div class="font-medium text-muted">
  55.                     <div class="row row--gutter-width-10">
  56.                         <div class="col col-auto">
  57.                             <span class="demi-icon demi-icon-warning icon-in-text"
  58.                                   aria-label="{{ 'demi.warning'|trans }}"
  59.                                   title="{{ 'demi.warning'|trans }}"></span>
  60.                         </div>
  61.                         <div class="col">
  62.                             {{ "demi.detail.no-packages"|trans }}
  63.                         </div>
  64.                     </div>
  65.                 </div>
  66.             </div>
  67.             {% endif %}
  68.         </div>
  69.     </div>
  70.     <div class="js-corridor__room-packages"></div>
  71. </section>