From 1b2800626745f6ad808b2ce94ee34bd9ee0e1361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Fri, 4 Oct 2019 18:11:16 +0200 Subject: [PATCH] Show attachment preview also in part edit page. --- assets/css/app.css | 3 ++- templates/AdminPages/_attachments.html.twig | 2 +- templates/Parts/edit/_attachments.html.twig | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index a783b960..67f131b8 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -356,8 +356,9 @@ btn-xs box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); } + .thumbnail-sm { - height: 100px; + max-height: 100px; } img.img-attachement { diff --git a/templates/AdminPages/_attachments.html.twig b/templates/AdminPages/_attachments.html.twig index 7be983dd..d4e3c648 100644 --- a/templates/AdminPages/_attachments.html.twig +++ b/templates/AdminPages/_attachments.html.twig @@ -42,7 +42,7 @@ {% endif %} {% if attach.picture %} - {% trans %}attachment.preview.alt{% endtrans %} + {% trans %}attachment.preview.alt{% endtrans %} {% else %} {% trans %}attachment.view{% endtrans %} diff --git a/templates/Parts/edit/_attachments.html.twig b/templates/Parts/edit/_attachments.html.twig index 42f274c0..7496c25e 100644 --- a/templates/Parts/edit/_attachments.html.twig +++ b/templates/Parts/edit/_attachments.html.twig @@ -39,6 +39,14 @@ {% endif %} + + {% if attach.picture %} + + {% trans %}attachment.preview.alt{% endtrans %} + + {% else %} + {% trans %}attachment.view{% endtrans %} + {% endif %} {% else %}