mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed an exception when try to show info page of a part with invalid attachments.
This commit is contained in:
parent
72db95ca70
commit
0ebc5bfdad
1 changed files with 3 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue