templates/includes/areas/multiple-image-download.html.twig line 1

Open in your IDE?
  1. {% set object = object|default(null) %}
  2. {% set hasWishlist = hasWishlist | default(false) %}
  3. {% if object and object.gallery.items is not empty %}
  4.     {% set galleryImages = [object.teaserImage] | merge(object.gallery.items) %}
  5.     {% if galleryImages is not empty %}
  6.             <div class="js-dropdown dropdown dropdown--gallery ">
  7.                 <button class="btn btn-lg btn-white" type="button" id="ddDownload" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  8.                                  <span class="btn__icon">
  9.                                      <span class="icon icon-download" aria-hidden="true"></span>
  10.                                  </span>
  11.                     <span class="btn__text">{{ 'detail.downloads' | trans }}</span>
  12.                 </button>
  13.                 <ul class="dropdown-menu js-dropdown-persist" aria-labelledby="ddDownload" >
  14.                     {% for item in galleryImages|filter(i => app.user ? true : not i.image.property('isPrintQuality')) %}
  15.                         <li>
  16.                             {% if item.image.property('isPrintQuality') %}
  17.                                 <button type="button"
  18.                                         data-target="#dlModal"
  19.                                         class="dropdown-item js-dl-modal-toggle"
  20.                                         data-content-url="{{ item }}"
  21.                                         data-download="{{ item.image.filename }}"
  22.                                         data-modal-checkbox="false">
  23.                                     {{ item.image.filename }}
  24.                                 </button>
  25.                             {% else %}
  26.                                 <a class="dropdown-item"
  27.                                    href="{{ item }}"
  28.                                    download={{ item.image.filename }}>
  29.                                     {{ item.image.filename }}
  30.                                 </a>
  31.                             {% endif %}
  32.                         </li>
  33.                     {% endfor %}
  34.                 </ul>
  35.             </div>
  36.     {% endif %}
  37. {% endif %}