mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 17:19:34 +00:00
Improved margins with badges in attachment edit
This commit is contained in:
parent
fdc6383b83
commit
ae5dfbfc52
1 changed files with 14 additions and 17 deletions
|
|
@ -155,30 +155,28 @@
|
|||
|
||||
{% if attach is not null %}
|
||||
{% if not attach.hasInternal() %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<div class="mt-2">
|
||||
<span class="badge bg-primary">
|
||||
<i class="fas fa-fw fa-globe"></i> {% trans %}attachment.external_only{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
</div>
|
||||
{% elseif attachment_manager.isInternalFileExisting(attach) %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<span class="badge bg-primary" title="{{ attach.filename }}">
|
||||
<i class="fas fa-fw {{ ext_to_fa_icon(attach.extension) }}"></i> {{ attach.filename|u.truncate(25, ' ...') }}
|
||||
</span>
|
||||
<div class="mt-2">
|
||||
<div class="badge bg-primary mt-2" title="{{ attach.filename }}">
|
||||
<i class="fas fa-fw {{ ext_to_fa_icon(attach.extension) }}"></i> {{ attach.filename|u.truncate(25, ' ...') }}
|
||||
</div>
|
||||
<br>
|
||||
<span class="badge bg-secondary">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attach) }}
|
||||
</span>
|
||||
</h6>
|
||||
<div class="badge bg-secondary mt-1">
|
||||
<i class="fas fa-hdd fa-fw"></i> {{ attachment_manager.humanFileSize(attach) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if attach.secure %}
|
||||
<h6>
|
||||
<div>
|
||||
<span class="badge bg-success">
|
||||
<i class="fas fa-fw fa-shield-alt"></i> {% trans %}attachment.secure{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if attach.secure and not is_granted('show_private', attach) %}
|
||||
|
|
@ -191,12 +189,11 @@
|
|||
<a href="{{ entity_url(attach, 'file_view') }}" rel="noopener" target="_blank" data-turbo="false" class="link-external">{% trans %}attachment.view_local{% endtrans %}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<br><br>
|
||||
<h6>
|
||||
<div class="mt-2">
|
||||
<span class="badge bg-warning">
|
||||
<i class="fas fa-exclamation-circle fa-fw"></i> {% trans %}attachment.file_not_found{% endtrans %}
|
||||
</span>
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue