Improved margins with badges in attachment edit

This commit is contained in:
Jan Böhmer 2025-02-22 17:04:58 +01:00
parent fdc6383b83
commit ae5dfbfc52

View file

@ -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 %}