mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 17:55:03 +02:00
Show infos about filename and filesize on attachment edit tab.
This commit is contained in:
parent
3a11933a89
commit
09a5948149
3 changed files with 45 additions and 2 deletions
|
@ -14,7 +14,32 @@
|
|||
{{ form_widget(attachment) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ delete_btn }}
|
||||
{{ delete_btn }}
|
||||
|
||||
{% set attach = attachment.vars.value %}
|
||||
|
||||
{% if attachment_helper.fileExisting(attach) %}
|
||||
{% if not attach.external %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge badge-primary">
|
||||
<i class="fas fa-hdd 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>
|
||||
</h6>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge badge-warning">
|
||||
<i class="fas fa-exclamation-circle fa-fw"></i> {% trans %}attachment.file_not_found{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue