From b317bd7a0be688ebac18d3680d5e2c906229b737 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 22 Nov 2018 12:16:32 +0000 Subject: [PATCH 1/2] Put download PDF in footer This makes its positioning consistent with the previous page in the one-off sending journey. It gives us more space to put information about the status of the letter above the preview of the letter. --- .../stick-at-top-when-scrolling.scss | 1 + .../views/notifications/notification.html | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) 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 283c1aeec..34bb42526 100644 --- a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss +++ b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss @@ -48,6 +48,7 @@ .page-footer { margin-bottom: 0; + min-height: 50px; } .notification-status { diff --git a/app/templates/views/notifications/notification.html b/app/templates/views/notifications/notification.html index 7fc689cac..d0e8c9613 100644 --- a/app/templates/views/notifications/notification.html +++ b/app/templates/views/notifications/notification.html @@ -51,22 +51,24 @@

Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}

-

- Download as a PDF -

{% endif %} {% endif %} {{ template|string }} - {% if template.template_type != 'letter' %} - - {% if template.template_type == 'email' %}
{% endif %} - + {% if template.template_type == 'letter' %} +
+ +
+ {% elif template.template_type == 'email' %} +
+ {{ ajax_block(partials, updates_url, 'status', finished=finished) }} +
+ {% elif template.template_type == 'sms' %} {{ 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 %} From 741a8856fa1e2f74411555f97c5657a268d7550c Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 22 Nov 2018 12:17:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Remove=20the=20word=20=E2=80=98printable?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t think it’s necessary. Makes things consistent with the sent letter page, which only says ‘Download as a PDF’. This inconsistency would be more glaring now these pieces of text appear in the same place, in adjacent steps of a journey. --- app/templates/views/check/ok.html | 2 +- app/templates/views/notifications/check.html | 2 +- tests/app/main/views/test_send.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/templates/views/check/ok.html b/app/templates/views/check/ok.html index b35e6a040..52804960e 100644 --- a/app/templates/views/check/ok.html +++ b/app/templates/views/check/ok.html @@ -39,7 +39,7 @@ {% if template.template_type != 'letter' or not request.args.from_test %} {% else %} - Download as a printable PDF + Download as a PDF {% endif %} Back diff --git a/app/templates/views/notifications/check.html b/app/templates/views/notifications/check.html index 8ab9434cc..21854b4b7 100644 --- a/app/templates/views/notifications/check.html +++ b/app/templates/views/notifications/check.html @@ -65,7 +65,7 @@ {% endif %} Back {% if template.template_type == 'letter' %} - Download as a printable PDF + Download as a PDF {% endif %} diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 3325501c4..b8e9073f7 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -2803,7 +2803,7 @@ def test_one_off_letters_have_download_link( template_id=fake_uuid, filetype='pdf', ) - assert page.select_one('a[download]').text == 'Download as a printable PDF' + assert page.select_one('a[download]').text == 'Download as a PDF' def test_send_one_off_letter_errors_in_trial_mode( @@ -2848,7 +2848,7 @@ def test_send_one_off_letter_errors_in_trial_mode( assert not page.select('[type=submit]') assert page.select_one('.page-footer-back-link').text == 'Back' - assert page.select_one('a[download]').text == 'Download as a printable PDF' + assert page.select_one('a[download]').text == 'Download as a PDF' def test_check_messages_shows_over_max_row_error(