mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-05 02:35:16 +02:00
Improved info box on part tables.
This commit is contained in:
parent
0e57c0a6d5
commit
6b99784238
4 changed files with 867 additions and 797 deletions
|
@ -1,6 +1,6 @@
|
|||
{% import "helper.twig" as helper %}
|
||||
|
||||
<table class="table table-striped table-hover table-responsive-sm">
|
||||
<table class="table table-striped table-sm table-hover table-responsive-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -18,7 +18,7 @@
|
|||
{% for attachment in part.attachments %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ helper.attachment_icon(attachment, attachment_helper) }}
|
||||
{{ helper.attachment_icon(attachment, attachment_manager) }}
|
||||
</td>
|
||||
<td class="align-middle">{{ attachment.name }}</td>
|
||||
<td class="align-middle">{{ attachment.attachmentType.fullPath }}</td>
|
||||
|
@ -34,9 +34,9 @@
|
|||
<span class="badge badge-primary">
|
||||
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external{% endtrans %}
|
||||
</span>
|
||||
{% elseif attachment_helper.fileExisting(attachment) %}
|
||||
{% elseif attachment_manager.fileExisting(attachment) %}
|
||||
<span class="badge badge-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_helper.humanFileSize(attachment) }}
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attachment) }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge badge-warning">
|
||||
|
@ -48,16 +48,22 @@
|
|||
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if attachment == part.masterPictureAttachment %}
|
||||
<br>
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-id-card"></i> {% trans %}attachment.preview{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<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) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
||||
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ attachment|entityURL('file_view') }}"{% endif %} target="_blank"
|
||||
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
||||
data-no-ajax title="{% trans %}attachment.view{% endtrans %}" rel="noopener">
|
||||
<i class="fas fa-eye fa-fw"></i>
|
||||
</a>
|
||||
<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) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
||||
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ attachment|entityURL('file_download') }}"{% endif %} data-no-ajax
|
||||
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
||||
title="{% trans %}attachment.download{% endtrans %}">
|
||||
<i class="fas fa-download fa-fw"></i>
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue