From 8655e519aab441d141b889bb8381918bc97ac052 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 7 May 2020 09:50:03 +0100 Subject: [PATCH] Change logic around to be clearer Think this is a clearer expression of what the intent it. --- app/main/views/jobs.py | 2 +- app/templates/views/activity/notifications.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index 8dd95d582..e95c3d61f 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -285,7 +285,7 @@ def get_notifications(service_id, message_type, status_override=None): limit_days=service_data_retention_days, prev_page=prev_page, next_page=next_page, - more_than_can_be_shown=(next_page and search_term), + show_pagination=(not search_term), status=request.args.get('status'), message_type=message_type, download_link=download_link, diff --git a/app/templates/views/activity/notifications.html b/app/templates/views/activity/notifications.html index a39d99f6a..c38d3cee5 100644 --- a/app/templates/views/activity/notifications.html +++ b/app/templates/views/activity/notifications.html @@ -33,12 +33,12 @@ {% endif %} - {% if more_than_can_be_shown %} + {% if show_pagination %} + {{ previous_next_navigation(prev_page, next_page) }} + {% elif next_page %} - {% else %} - {{ previous_next_navigation(prev_page, next_page) }} {% endif %}