gnu-social/templates/cards/blocks/attachment.html.twig

17 lines
526 B
Twig
Raw Permalink Normal View History

{% set handled = false %}
{% for block in handle_event('ViewAttachment', {'attachment': attachment, 'note': note, 'title': title}) %}
{% set handled = true %}
<div class="note-attachments-unit">
{{ block | raw }}
</div>
{% endfor %}
{% if not handled %}
<div class="note-attachments-unit">
{% if attachment.getFilename() is not null %}
<a href="{{ attachment.getShowUrl(note) }}">{{ title }}</a>
{% else %}
{{ title }}
{% endif %}
</div>
{% endif %}