Files
notifications-admin/app/templates/views/notifications.html
Chris Hill-Scott 3069858a9f 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.
2016-09-30 15:41:46 +01:00

28 lines
834 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "withnav_template.html" %}
{% from "components/ajax-block.html" import ajax_block %}
{% from "components/message-count-label.html" import message_count_label, recipient_count_label %}
{% block page_title %}
{{ message_count_label(99, message_type, suffix='') | capitalize }} GOV.UK Notify
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">
{{ message_count_label(99, message_type, suffix='') | capitalize }}
</h1>
{{ ajax_block(
partials,
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status),
'counts'
) }}
{{ ajax_block(
partials,
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status, page=page),
'notifications'
) }}
{% endblock %}