Fix pagination on activity page

The activity page was AJAXified in
https://github.com/alphagov/notifications-admin/pull/952 but this
didn’t take pagination into account.

So if you visited page 2, the contents of the page would be replaced by
Javascript with the contents of page 1. So you’d never be able to see
anything beyond page 1, expect for a brief fraction of a second when the
page loaded.

This commit makes sure the AJAX request uses whatever page parameter is
in the URL of the original page.
This commit is contained in:
Chris Hill-Scott
2016-09-30 15:17:17 +01:00
parent 2eb7360468
commit 3069858a9f
3 changed files with 24 additions and 5 deletions

View File

@@ -173,7 +173,8 @@ def view_notifications(service_id, message_type):
'views/notifications.html',
partials=get_notifications(service_id, message_type),
message_type=message_type,
status=request.args.get('status')
status=request.args.get('status'),
page=request.args.get('page', 1)
)