{% extends "common/index_bootstrap.html.twig" %} {% block stylesheet %} {% endblock %} {% block content %}

{{ "Download of documents" | trans }}

{{ "Please wait while your files are being gathered for the download, this operation may take a few minutes." | trans }}  ...
{% set total_size = 0 %} {% for file in list["files"] %} {% set size = 0 %} {% set total_size = total_size + size %} {% endfor %}

{{ "The file contains the following elements" | trans }}

{{ "Base" | trans }} {{ "Name" | trans }} {{ "Sub definition" | trans }} {{ "Thumbnail" | trans }}
{{ app|sbas_from_bas(file['base_id'])|sbas_labels(app) }} {{ file['base_id']|bas_labels(app) }} {{ file['original_name'] }} {% if file['subdefs'] is iterable and file['subdefs']|length > 0 %}
    {% for sd, subdef in file['subdefs'] %}
  • {{ subdef['label'] }} ...
  • {% set size = size + subdef['size'] %} {% endfor %}
{% endif %}
{% set record_key = app|sbas_from_bas(file['base_id']) ~'_'~ file['record_id']%} {% if record_key in records|keys %} {% set record = attribute(records, record_key) %} {% set thumbnail = record.get_thumbnail() %} {% if thumbnail.isLandscape() %} {% set w = 140 %} {% if thumbnail.get_height() > 0 and thumbnail.get_width() > 0 %} {% set h = (w / (thumbnail.get_width() / thumbnail.get_height()))|round %} {% else %} {% set h = 140 %} {% endif %} {% else %} {% set h = 105 %} {% if thumbnail.get_height() > 0 %} {% set w = (h * (thumbnail.get_width() / thumbnail.get_height()))|round %} {% else %} {% set w = 105 %} {% endif %} {% endif %} {% endif %}
{% if anonymous %} {% endif%}
{% endblock %}