From 11d45eaf5926e6aa1f6657e6fbefc30604f3d9d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 13 Oct 2019 13:34:26 +0200 Subject: [PATCH] Show a hint if an attachment is secure. --- templates/AdminPages/_attachments.html.twig | 20 +++++++++++++++----- templates/Parts/edit/_attachments.html.twig | 8 ++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/templates/AdminPages/_attachments.html.twig b/templates/AdminPages/_attachments.html.twig index 86a756e4..9213d5ca 100644 --- a/templates/AdminPages/_attachments.html.twig +++ b/templates/AdminPages/_attachments.html.twig @@ -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 %}

- - {{ attach.filename }} - + + {{ attach.filename }} +
- {{ attachment_helper.humanFileSize(attach) }} - + {{ attachment_helper.humanFileSize(attach) }} +
{% else %}

@@ -55,6 +57,14 @@ {% endif %} + + {% if attach.secure %} +
+ + {% trans %}attachment.secure{% endtrans %} + +
+ {% endif %} diff --git a/templates/Parts/edit/_attachments.html.twig b/templates/Parts/edit/_attachments.html.twig index 9c949aa4..c6fbfeee 100644 --- a/templates/Parts/edit/_attachments.html.twig +++ b/templates/Parts/edit/_attachments.html.twig @@ -56,6 +56,14 @@ {% endif %} + {% if attach.secure %} +
+ + {% trans %}attachment.secure{% endtrans %} + +
+ {% endif %} + {% endfor %}