Show a hint if an attachment is secure.

This commit is contained in:
Jan Böhmer 2019-10-13 13:34:26 +02:00
parent d2a8055384
commit 11d45eaf59
2 changed files with 23 additions and 5 deletions

View file

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

View file

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