mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 17:19:34 +00:00
Split attachment path into internal and external path, so the external source URL can be retained after a file is downloaded
This commit is contained in:
parent
5bb79b5419
commit
ceb7c7bd65
21 changed files with 399 additions and 303 deletions
|
|
@ -154,26 +154,24 @@
|
|||
{% set attach = form.vars.value %}
|
||||
|
||||
{% if attach is not null %}
|
||||
{% if attachment_manager.fileExisting(attach) %}
|
||||
{% if not attach.external %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw {{ ext_to_fa_icon(attach.extension) }}"></i> {{ attach.filename }}
|
||||
</span>
|
||||
<br>
|
||||
<span class="badge bg-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attach) }}
|
||||
</span>
|
||||
</h6>
|
||||
{% else %}
|
||||
<br><br>
|
||||
<h6>
|
||||
{% if not attach.hasInternal() %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
</h6>
|
||||
{% elseif attachment_manager.isInternalFileExisting(attach) %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw {{ ext_to_fa_icon(attach.extension) }}"></i> {{ attach.filename }}
|
||||
</span>
|
||||
<br>
|
||||
<span class="badge bg-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attach) }}
|
||||
</span>
|
||||
</h6>
|
||||
|
||||
{% if attach.secure %}
|
||||
<h6>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue