mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 18:09:13 -04:00
Includes: - in gulpfile.js: - add details macro to list of those copied from GOVUK Frontend - remove existing details polyfill - convert all, but one, <details> tags to use GOVUK Frontend details component - add jinja boolean filter to help setting 'open' attribute of <details> tags Notes on the `<details>` not included in this: The `<details>` used for notifications items on the API integration page is not possible to reproduce with the GOV.UK Frontend macro so I'm splitting the resulting work out into it's own commit.
67 lines
2.0 KiB
HTML
67 lines
2.0 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
{% from "components/textbox.html" import textbox %}
|
|
{% from "components/big-number.html" import big_number_simple %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
{% from "components/status-box.html" import status_box %}
|
|
{% from "components/form.html" import form_wrapper %}
|
|
{% from "components/details/macro.njk" import govukDetails %}
|
|
|
|
{% block per_page_title %}
|
|
Platform admin
|
|
{% endblock %}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
<h1 class="heading-large">
|
|
Summary
|
|
</h1>
|
|
|
|
{% set details_content %}
|
|
{% call form_wrapper(method="get") %}
|
|
{{ textbox(form.start_date, hint="Enter start date in format YYYY-MM-DD") }}
|
|
{{ textbox(form.end_date, hint="Enter end date in format YYYY-MM-DD") }}
|
|
</br>
|
|
<button type="submit" class="button">Filter</button>
|
|
{% endcall %}
|
|
{% endset %}
|
|
|
|
{{ govukDetails({
|
|
"summaryText": "Help with nationality",
|
|
"html": details_content,
|
|
"open": form.errors | convert_to_boolean
|
|
}) }}
|
|
|
|
<div class="grid-row bottom-gutter">
|
|
{% for noti_type in global_stats %}
|
|
<div class="column-third">
|
|
{{ big_number_simple(
|
|
noti_type.black_box.number,
|
|
message_count_label(noti_type.black_box.number, noti_type.black_box.notification_type)
|
|
) }}
|
|
|
|
{% for item in noti_type.other_data %}
|
|
{{ status_box(
|
|
number=item.number,
|
|
label=item.label,
|
|
failing=item.failing,
|
|
percentage=item.percentage,
|
|
url=item.url)
|
|
}}
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="grid-row bottom-gutter">
|
|
{% for noti_type in global_stats %}
|
|
<div class="column-third">
|
|
<div class="bordered-text-box">
|
|
<span class="big-number-number">{{ "{:,}".format(noti_type.test_data.number) }}</span>
|
|
{{ noti_type.test_data.label }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endblock %}
|