Files
myep-team/templates/administrative/assignment_mailing/_attachments.html.twig
T

23 lines
1.2 KiB
Twig

{# The template's files, swapped when a template is picked. The files dropped for this mailing
are listed outside of it, by the dropzone, which a swap would otherwise empty. #}
<div id="mailing-attachments" {% if oob|default(false) %}hx-swap-oob="true"{% endif %}>
{% if mailingDto.template and mailingDto.template.attachments is not empty %}
<div class="text-sm text-gray-500 pb-1">
Aus der Vorlage, gehen immer mit:
</div>
<ul class="flex flex-col space-y-1 pb-2">
{% for attachment in mailingDto.template.attachments %}
<li class="flex items-center space-x-2 border rounded-sm px-2 py-1">
{{ icon('document', 'w-4 h-4 shrink-0') }}
<a href="{{ path('app_common_download', { 'uuid': attachment.uuid, 'inline': 1 }) }}"
target="_blank"
class="flex-1 underline">
{{ attachment.displayName ?? attachment.originalFilename }}
</a>
<span class="text-sm text-gray-500">{{ attachment.size|file_size(1) }}</span>
</li>
{% endfor %}
</ul>
{% endif %}
</div>