mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 07:38:26 -04:00
Previously, the AJAX update for the dashboard was returning a big blob of JSON with one key. This commit splits it up to return: - one key for each section of the page - each containing a smaller chunk of HTML rendered from a partial The jobs page was already working this way (pretty much) but just needed a little tweaking to get it the same.
68 lines
2.0 KiB
HTML
68 lines
2.0 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/banner.html" import banner %}
|
||
{% from "components/sms-message.html" import sms_message %}
|
||
{% from "components/email-message.html" import email_message %}
|
||
|
||
{% block page_title %}
|
||
{{ uploaded_file_name }} – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<h1 class="heading-large">
|
||
{{ uploaded_file_name }}
|
||
</h1>
|
||
|
||
{% if 'sms' == template.template_type %}
|
||
<div class="grid-row">
|
||
<div class="column-two-thirds">
|
||
{{ sms_message(
|
||
template.formatted_as_markup,
|
||
)}}
|
||
</div>
|
||
</div>
|
||
{% elif 'email' == template.template_type %}
|
||
{{ email_message(
|
||
template.formatted_subject_as_markup,
|
||
template.formatted_as_markup
|
||
)}}
|
||
{% endif %}
|
||
|
||
<div
|
||
{% if not finished %}
|
||
data-module="update-content"
|
||
data-resource="{{url_for(".view_job_updates", service_id=current_service.id, job_id=job.id, status=status, help=request.args.get('help', 0))}}"
|
||
data-key="status"
|
||
aria-live="polite"
|
||
{% endif %}
|
||
>
|
||
{% include 'partials/jobs/status.html' %}
|
||
</div>
|
||
|
||
<div
|
||
{% if not finished %}
|
||
data-module="update-content"
|
||
data-resource="{{url_for(".view_job_updates", service_id=current_service.id, job_id=job.id, status=status, help=request.args.get('help', 0))}}"
|
||
data-key="counts"
|
||
aria-live="polite"
|
||
{% endif %}
|
||
>
|
||
{% include 'partials/jobs/count.html' %}
|
||
</div>
|
||
|
||
<div
|
||
{% if notifications %}
|
||
class='dashboard-table'
|
||
{% endif %}
|
||
{% if not finished %}
|
||
data-module="update-content"
|
||
data-resource="{{url_for(".view_job_updates", service_id=current_service.id, job_id=job.id, status=request.args.get('status'), help=request.args.get('help'))}}"
|
||
data-key="notifications"
|
||
aria-live="polite"
|
||
{% endif %}
|
||
>
|
||
{% include 'partials/jobs/notifications.html' %}
|
||
</div>
|
||
|
||
{% endblock %}
|