[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

@@ -5,7 +5,11 @@
src="{{ attachment.getThumbnailUrl() }}"
width="{{ thumbnail.getWidth() }}"
height="{{ thumbnail.getHeight() }}">
<figcaption><a
href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a>
</figcaption>
<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>