From 0d0d95a75a1291be5bf8281fffcba553f622f519 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 10 Oct 2018 09:50:14 +0100 Subject: [PATCH] =?UTF-8?q?Format=20=E2=80=98pending=E2=80=99=20messages?= =?UTF-8?q?=20the=20same=20as=20=E2=80=98sending=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For reasons I don’t understand some of our text messages get marked as `pending`. Since we don’t account for this in the front end they don’t get displayed quite right (the vertical position of the text is too high). This commit adds the pending `state` to the `if` statement so the text is properly aligned. --- app/templates/components/table.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/templates/components/table.html b/app/templates/components/table.html index d787c0010..9ab0124a3 100644 --- a/app/templates/components/table.html +++ b/app/templates/components/table.html @@ -143,6 +143,9 @@ {% macro notification_status_field(notification) %} + + {% set displayed_on_single_line = notification.status in ['created', 'pending', 'sending', 'delivered'] %} + {% if not notification %} {% call field(align='right') %}{% endcall %} {% else %} @@ -150,7 +153,7 @@ status=notification.status|format_notification_status_as_field_status(notification.notification_type), align='right' ) %} - {% if notification.status in ['created', 'sending', 'delivered'] %}{% endif %} + {% if displayed_on_single_line %}{% endif %} {% if notification.status|format_notification_status_as_url %} {% endif %} @@ -172,7 +175,7 @@ ) }} {% endif %} - {% if notification.status in ['created', 'sending', 'delivered'] %}{% endif %} + {% if displayed_on_single_line %}{% endif %} {% endcall %} {% endif %} {% endmacro %}