gnu-social/templates/cards/blocks/attachment.html.twig
Eliseu Amaro b3d582f665
[PLUGINS][AttachmentCollections] Fixed "Error: Expected Doctrine\ORM\Query\Lexer::T_IDENTIFIER, got 'Plugin\AttachmentCollections\Entity\AttachmentCollection'"
[TWIG] Cards are now divided into blocks and macros, additional macros done, attachments page no longer inside cards directory
[CARDS][Navigation] Now using macros to create section, details, and nav elements
2022-02-07 01:54:04 +00:00

17 lines
526 B
Twig

{% 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 %}