{% trans_default_domain 'articles' %}
{% if this.photos is not empty %}
<div {{ attributes }}>
   <p class="h4">
      {{ 'gallery'|trans }}
   </p>
   {% if not this.isUserLoggedIn %}
      <div class="photo-download-register">
         {{ 'registerMessage'|trans }} <a href="{{ path('register') }}">{{ 'register'|trans }}</a>
      </div>
   {% endif %}
   <div class="photo-list">
      {% for photo in this.photos|slice(1) %}
         <div class="photo">
            <twig:Picture thumbnail="{{ this.createThumbnailFromPhoto(photo) }}" type="articles_pressroom" />
            {% if this.isUserLoggedIn and not this.isPressroomUser %}
               <p class="not-pressroom-user">{{ 'pressroomMessage'|trans }}</p>
            {% else %}
               <div class="photo-details">
                  {{ this.getPhotoFilesize(photo)|formatFilesize }}
                  <a
                        {% if this.isPressroomUser %}
                           href="{{ this.photoOriginalPath(photo) }}" download
                        {% else %}
                           role="button" data-wpj-modal="{{ path('kupshop_components_modal_modal', {template: 'login'}) }}"
                        {% endif %}
                  >
                     <twig:ux:icon name="arrow-down-to-line" class="c-icon" />{{ 'download'|trans }}
                  </a>
               </div>
            {% endif %}
         </div>
      {% endfor %}
   </div>
</div>
{% endif %}
