mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-16 13:24:31 +02:00
Disable download and view buttons for attachments with invalid file.
This commit is contained in:
parent
05fd753189
commit
6551d3a56b
1 changed files with 10 additions and 2 deletions
|
@ -35,8 +35,16 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td><div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
<td><div class="btn-group" role="group" aria-label="Button group with nested dropdown">
|
||||||
<a href="{{ attachment|entityURL('file_view') }}" target="_blank" class="btn btn-secondary" data-no-ajax title="{% trans %}attachment.view{% endtrans %}"><i class="fas fa-eye fa-fw"></i></a>
|
<a href="{{ attachment|entityURL('file_view') }}" target="_blank"
|
||||||
<a href="{{ attachment|entityURL('file_download') }}" data-no-ajax class="btn btn-secondary" title="{% trans %}attachment.download{% endtrans %}"><i class="fas fa-download fa-fw"></i></a>
|
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
|
||||||
|
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>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-boundary="window">
|
<button id="btnGroupDrop1" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-boundary="window">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue