[UI][Attachment] Use Attachment methods to get the proper URL, rather than crafting it in a template

This commit is contained in:
2021-08-18 14:04:17 +01:00
parent 6799052ff5
commit 4b2a92d052
5 changed files with 17 additions and 11 deletions

View File

@@ -1,9 +1,9 @@
<div>
<figure>
<video class="u-video" src="{{ path('attachment_view', {'id': attachment.getId()}) }}" controls poster="{{ path('attachment_thumbnail', thumbnail_parameters) }}">
<video class="u-video" src="{{ attachment.getUrl() }}" controls poster="{{ attachment.getThumbnailUrl()}}">
</video>
<figcaption><a
href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a>
</figcaption>
</figure>
</div>
</div>