media-list-content.html.twig 851 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 %}{{ base_url_relative }}/media-manager/{{base64_encode(the_file.filepath)}}{% 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 %}