mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Show a hint if an attachment is secure.
This commit is contained in:
parent
d2a8055384
commit
11d45eaf59
2 changed files with 23 additions and 5 deletions
|
@ -19,18 +19,20 @@
|
|||
{{ delete_btn }}
|
||||
|
||||
{% set attach = attachment.vars.value %}
|
||||
{# @var attach \App\Entity\Attachments\Attachment #}
|
||||
|
||||
|
||||
{% if attachment_helper.fileExisting(attach) %}
|
||||
{% if not attach.external %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-fw fa-file"></i> {{ attach.filename }}
|
||||
</span>
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-fw fa-file"></i> {{ attach.filename }}
|
||||
</span>
|
||||
<br>
|
||||
<span class="badge badge-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_helper.humanFileSize(attach) }}
|
||||
</span>
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_helper.humanFileSize(attach) }}
|
||||
</span>
|
||||
</h6>
|
||||
{% else %}
|
||||
<br><br>
|
||||
|
@ -55,6 +57,14 @@
|
|||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
|
||||
{% if attach.secure %}
|
||||
<h6>
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -56,6 +56,14 @@
|
|||
</h6>
|
||||
{% endif %}
|
||||
|
||||
{% if attach.secure %}
|
||||
<h6>
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue