From c7118a80e2aba3822c78b00a0d452ea89ab19336 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 20 Nov 2018 13:57:48 +0000 Subject: [PATCH] Stick email status to bottom of screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We’ve moved away from using the expand/collapse pattern on the page where you click ‘send’. Instead we’re putting the send button in the sticky footer. So it’s a bit jarring to still have the expand/collapse on the page you see after you’ve sent an email. This commit replaces it with the sticky footer as well. This is only relevant for emails because: 1. Text messages are generally short enough to fit on the screen 2. We don’t show the status of letters because they don’t really change --- .../stylesheets/components/stick-at-top-when-scrolling.scss | 4 ++++ app/main/views/notifications.py | 1 + app/templates/views/notifications/notification.html | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss index ec75473d3..283c1aeec 100644 --- a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss +++ b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss @@ -50,6 +50,10 @@ margin-bottom: 0; } + .notification-status { + margin: 0; + } + } .content-fixed, diff --git a/app/main/views/notifications.py b/app/main/views/notifications.py index 03187cb24..d9ff30463 100644 --- a/app/main/views/notifications.py +++ b/app/main/views/notifications.py @@ -65,6 +65,7 @@ def view_notification(service_id, notification_id): notification_id=notification_id, filetype='png', ), + expand_emails=True, page_count=page_count, show_recipient=True, redact_missing_personalisation=True, diff --git a/app/templates/views/notifications/notification.html b/app/templates/views/notifications/notification.html index 15fbc194a..7fc689cac 100644 --- a/app/templates/views/notifications/notification.html +++ b/app/templates/views/notifications/notification.html @@ -60,7 +60,13 @@ {{ template|string }} {% if template.template_type != 'letter' %} + + {% if template.template_type == 'email' %}
{% endif %} + {{ ajax_block(partials, updates_url, 'status', finished=finished) }} + + {% if template.template_type == 'email' %}
{% endif %} + {% endif %} {% if current_user.has_permissions('send_messages') and current_user.has_permissions('view_activity') and template.template_type == 'sms' and can_receive_inbound %}