Make Jinja template generic

This will let us reuse the same code for displaying pages of previous
and rejected alerts.
This commit is contained in:
Chris Hill-Scott
2021-04-08 12:56:55 +01:00
parent 0bdd5cab2d
commit 9977028a83
2 changed files with 3 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ def broadcast_dashboard_previous(service_id):
'completed',
'rejected',
),
page_title='Previous alerts',
empty_message='You do not have any previous alerts',
view_broadcast_endpoint='.view_previous_broadcast',
)

View File

@@ -4,12 +4,12 @@
{% extends "withnav_template.html" %}
{% block service_page_title %}
Previous alerts
{{ page_title }}
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-medium">Previous alerts</h1>
<h1 class="heading-medium">{{ page_title }}</h1>
{% include('views/broadcast/partials/dashboard-table.html') %}