mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 13:08:24 -04:00
Refactor dashboard templates
Previously the structure was ``` dashboard.html |_ today.html |_ some random html |_ a few things split into partials ``` This commit simplifies the structure to just be: ``` dashboard.html |_ partial |_ partial |_ … ```
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
||||
{% from "components/show-more.html" import show_more %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
{% from "components/table.html" import list_table, field, right_aligned_field_heading, hidden_field_heading %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ current_service.name }} – GOV.UK Notify
|
||||
{% endblock %}
|
||||
@@ -23,7 +28,51 @@
|
||||
<h2 class="heading-medium">
|
||||
In the last 7 days
|
||||
</h2>
|
||||
{% include 'views/dashboard/today.html' %}
|
||||
|
||||
<div
|
||||
data-module="update-content"
|
||||
data-resource="{{url_for(".service_dashboard_updates", service_id=current_service.id)}}"
|
||||
data-key="today"
|
||||
data-interval-seconds="2"
|
||||
aria-live="polite"
|
||||
>
|
||||
<div class="grid-row">
|
||||
{% include 'views/dashboard/_totals.html' %}
|
||||
<div class="column-whole">
|
||||
{{ show_more(
|
||||
url_for('.weekly', service_id=current_service.id),
|
||||
'Compare to previous weeks'
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if template_statistics|length %}
|
||||
{% include 'views/dashboard/template-statistics.html' %}
|
||||
{{ show_more(
|
||||
url_for('.template_history', service_id=current_service.id),
|
||||
'See all templates used this year'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% if jobs %}
|
||||
{% include 'views/dashboard/_jobs.html' %}
|
||||
{{ show_more(
|
||||
url_for('.view_jobs', service_id=current_service.id),
|
||||
'See all uploaded files'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.has_permissions(['manage_settings'], admin_override=True) %}
|
||||
<h2 class='heading-medium'>This year</h2>
|
||||
{% include 'views/dashboard/_jobs.html' %}
|
||||
{{ show_more(
|
||||
url_for(".usage", service_id=current_service['id']),
|
||||
'See usage breakdown'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user