Fixed an exception when try to show info page of a part with invalid attachments.

This commit is contained in:
Jan Böhmer 2019-10-13 17:34:59 +02:00
parent 72db95ca70
commit 0ebc5bfdad

View file

@ -39,13 +39,13 @@
{% endif %}
</td>
<td><div class="btn-group" role="group" aria-label="Button group with nested dropdown">
<a href="{{ attachment|entityURL('file_view') }}" target="_blank"
<td><div class="btn-group" role="group" aria-label="">
<a {% if attachment_helper.fileExisting(attachment) %}href="{{ attachment|entityURL('file_view') }}"{% endif %} target="_blank"
class="btn btn-secondary {% if not attachment_helper.fileExisting(attachment) %}disabled{% endif %}"
data-no-ajax title="{% trans %}attachment.view{% endtrans %}">
<i class="fas fa-eye fa-fw"></i>
</a>
<a href="{{ attachment|entityURL('file_download') }}" data-no-ajax
<a {% if attachment_helper.fileExisting(attachment) %}href="{{ attachment|entityURL('file_download') }}"{% endif %} data-no-ajax
class="btn btn-secondary {% if not attachment_helper.fileExisting(attachment) %}disabled{% endif %}"
title="{% trans %}attachment.download{% endtrans %}">
<i class="fas fa-download fa-fw"></i>