mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 15:58:25 -04:00
Merge pull request #734 from alphagov/refactor-dashboard-extensive
Refactor markup behind the AJAX bits of the page
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
{% 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 %}
|
||||
{% from "components/ajax-block.html" import ajax_block %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ current_service.name }} – GOV.UK Notify
|
||||
{% endblock %}
|
||||
@@ -21,7 +27,37 @@
|
||||
<h2 class="heading-medium">
|
||||
In the last 7 days
|
||||
</h2>
|
||||
{% include 'views/dashboard/today.html' %}
|
||||
|
||||
{{ ajax_block(partials, updates_url, 'totals') }}
|
||||
{{ show_more(
|
||||
url_for('.weekly', service_id=current_service.id),
|
||||
'Compare to previous weeks'
|
||||
) }}
|
||||
|
||||
{% if partials['has_template_statistics'] %}
|
||||
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
||||
{{ show_more(
|
||||
url_for('.template_history', service_id=current_service.id),
|
||||
'See all templates used this year'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
{% if partials['has_jobs'] %}
|
||||
{{ ajax_block(partials, updates_url, 'jobs') }}
|
||||
{{ 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>
|
||||
{{ ajax_block(partials, updates_url, 'usage') }}
|
||||
{{ show_more(
|
||||
url_for(".usage", service_id=current_service['id']),
|
||||
'See usage breakdown'
|
||||
) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user