Files
notifications-admin/app/templates/views/dashboard/dashboard.html

75 lines
2.4 KiB
HTML
Raw Normal View History

{% 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 %}
{% block maincolumn_content %}
<div class="dashboard">
<h1 class="visuallyhidden">Dashboard</h1>
{% if current_user.has_permissions([
'manage_templates', 'manage_api_keys', 'manage_users', 'manage_settings
'], any_=True, admin_override=True) %}
{% if current_service.restricted %}
{% include 'views/dashboard/trial-mode-banner.html' %}
{% endif %}
{% elif not current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], any_=True) %}
{% include 'views/dashboard/no-permissions-banner.html' %}
{% endif %}
<h2 class="heading-medium">
In the last 7 days
</h2>
{% call ajax_block(updates_url, 'totals') %}
{% include 'views/dashboard/_totals.html' %}
{% endcall %}
{{ show_more(
url_for('.weekly', service_id=current_service.id),
'Compare to previous weeks'
) }}
{% if template_statistics|length %}
{% call ajax_block(updates_url, 'template-statistics') %}
{% include 'views/dashboard/template-statistics.html' %}
{% endcall %}
{{ show_more(
url_for('.template_history', service_id=current_service.id),
'See all templates used this year'
) }}
{% endif %}
{% if jobs %}
{% call ajax_block(updates_url, 'jobs') %}
{% include 'views/dashboard/_jobs.html' %}
{% endcall %}
{{ 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>
{% call ajax_block(updates_url, 'usage') %}
{% include 'views/dashboard/_usage.html' %}
{% endcall %}
{{ show_more(
url_for(".usage", service_id=current_service['id']),
'See usage breakdown'
) }}
{% endif %}
</div>
{% endblock %}