Support external hosted attachments via link.

This commit is contained in:
Jan Böhmer 2019-08-10 19:16:56 +02:00
parent 87db2523e1
commit ca48343293
3 changed files with 46 additions and 2 deletions

View file

@ -22,9 +22,17 @@
</td>
<td class="align-middle">{{ attachment.name }}</td>
<td class="align-middle">{{ attachment.type.fullPath }}</td>
<td class="align-middle">{{ attachment.filename }}</td>
<td class="align-middle">
{% if attachment_helper.fileExisting(attachment) %}
{% if attachment.external %}
<a href="{{ attachment.uRL }}" target="_blank" class="link-external">{{ attachment.host }}</a>
{% else %}
{{ attachment.filename }}
{% endif %}
</td>
<td class="align-middle">
{% if attachment.external %}
<i>{% trans %}attachment.external_file{% endtrans %}</i>
{% elseif attachment_helper.fileExisting(attachment) %}
{{ attachment_helper.humanFileSize(attachment) }}
{% else %}
<b class="text-danger">{% trans %}attachment.file_not_found{% endtrans %}</b>