media-list-content.html.twig 847 B

12345678910111213141516171819
  1. {% set index = uri.param('index') %}
  2. {% for file in admin.files(true, index) %}
  3. {% set the_file = file.file %}
  4. {% if the_file.exists and the_file.display() is not empty %}
  5. <div class="card-item">
  6. <div class="admin-media-details">
  7. <a href="{% if is_modal %}#{% else %}{{ admin_route('/media-manager/' ~ the_file.filepath|base64_encode) }}{% endif %}" class="js__media-element" data-file-url="{{ file.page_route ~ '/' ~ file.title }}">
  8. {% set thumbnail = the_file.display(the_file.extension == 'svg' ? 'source' : 'thumbnail') %}
  9. {% if thumbnail %}
  10. <img src="{{thumbnail.cropZoom(250, 250).url}}" />
  11. <h4 class="admin-media-title">{{ file.title }}</h4>
  12. {% endif %}
  13. </a>
  14. </div>
  15. </div>
  16. {% endif %}
  17. {% endfor %}