[COMPONENT][Attachment] Do not show download links for non-local attachments

This commit is contained in:
2021-12-03 02:22:50 +00:00
parent ff5f346fec
commit 582519e13e
5 changed files with 24 additions and 10 deletions

View File

@@ -2,8 +2,12 @@
<figure>
<video class="u-video" src="{{ attachment.getUrl() }}" controls poster="{{ attachment.getThumbnailUrl('medium')}}">
</video>
<figcaption><a
href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a>
<figcaption>
{% if attachment.getFilename() is not null %}
<a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a>
{% else %}
{{ attachment.getBestTitle(note) }}
{% endif %}
</figcaption>
</figure>
</div>