From 3902d0a05c1b080afdac4a8a82962ef67d22bf80 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 10 Jul 2018 17:06:06 +0100 Subject: [PATCH] =?UTF-8?q?Hide=20=E2=80=987=20days=E2=80=99=20paragraph?= =?UTF-8?q?=20from=20basic=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It looks too prominent as a paragraph on the page. This commit moves the info about how long we keep data for into the ‘empty’ message we show when there are no results (ie the message people will see if they search for something that was sent more than 7 days ago). --- app/templates/views/activity/notifications.html | 2 +- app/templates/views/notifications.html | 10 +++++----- tests/app/main/views/test_activity.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/templates/views/activity/notifications.html b/app/templates/views/activity/notifications.html index 0002ac632..a4bc2a3c8 100644 --- a/app/templates/views/activity/notifications.html +++ b/app/templates/views/activity/notifications.html @@ -11,7 +11,7 @@ notifications, caption="Recent activity", caption_visible=False, - empty_message='No messages found', + empty_message='No messages found  (messages are kept for 7 days)'|safe, field_headings=['Recipient', 'Status'], field_headings_visible=False ) %} diff --git a/app/templates/views/notifications.html b/app/templates/views/notifications.html index de232e385..be9dc9b60 100644 --- a/app/templates/views/notifications.html +++ b/app/templates/views/notifications.html @@ -52,13 +52,13 @@ {% endif %} -

- {% if current_user.has_permissions('view_activity') %} + {% if current_user.has_permissions('view_activity') %} +

Download this report   - {% endif %} - Data available for 7 days -

+ Data available for 7 days +

+ {% endif %} {{ ajax_block( partials, diff --git a/tests/app/main/views/test_activity.py b/tests/app/main/views/test_activity.py index cf9929be3..a128445cd 100644 --- a/tests/app/main/views/test_activity.py +++ b/tests/app/main/views/test_activity.py @@ -289,7 +289,7 @@ def test_shows_message_when_no_notifications( ) assert normalize_spaces(page.select('tbody tr')[0].text) == ( - 'No messages found' + 'No messages found (messages are kept for 7 days)' )