[UI] Use event 'ShowAttachment' to permit plugins like Embed to alter the representation

This commit is contained in:
Hugo Sales 2021-04-25 21:21:12 +00:00
parent 94edad43d9
commit 2d91095260
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 9 additions and 3 deletions

View File

@ -38,9 +38,15 @@
</video>
</div>
{% else %}
<div>
<i> <a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getTitle() }}</a> </i>
</div>
{% for show in handle_event('ShowAttachment', attachment) %}
<div>
{{ show | raw }}
</div>
{% else %}
<div>
<i> <a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getTitle() }}</a> </i>
</div>
{% endfor %}
{% endif %}
{% endfor %}
</div>