2016-03-17 11:45:48 +00:00
|
|
|
|
{% extends "withnav_template.html" %}
|
|
|
|
|
|
|
2016-06-28 08:59:08 +01:00
|
|
|
|
{% 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 %}
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% from "components/ajax-block.html" import ajax_block %}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
|
2016-03-17 11:45:48 +00:00
|
|
|
|
{% block page_title %}
|
2016-04-04 16:53:52 +01:00
|
|
|
|
{{ current_service.name }} – GOV.UK Notify
|
2016-03-17 11:45:48 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block maincolumn_content %}
|
2016-04-05 11:40:13 +01:00
|
|
|
|
|
2016-04-20 15:37:17 +01:00
|
|
|
|
<div class="dashboard">
|
|
|
|
|
|
|
2016-05-11 15:05:40 +01:00
|
|
|
|
<h1 class="visuallyhidden">Dashboard</h1>
|
|
|
|
|
|
|
2016-05-26 17:05:16 +01:00
|
|
|
|
{% if current_user.has_permissions([
|
2016-04-07 15:30:52 +01:00
|
|
|
|
'manage_templates', 'manage_api_keys', 'manage_users', 'manage_settings
|
|
|
|
|
|
'], any_=True, admin_override=True) %}
|
|
|
|
|
|
{% if current_service.restricted %}
|
2016-04-01 10:54:55 +01:00
|
|
|
|
{% include 'views/dashboard/trial-mode-banner.html' %}
|
2016-04-07 15:30:52 +01:00
|
|
|
|
{% endif %}
|
2016-05-09 10:55:02 +01:00
|
|
|
|
{% elif not current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], any_=True) %}
|
2016-04-07 15:30:52 +01:00
|
|
|
|
{% include 'views/dashboard/no-permissions-banner.html' %}
|
2016-04-01 10:54:55 +01:00
|
|
|
|
{% endif %}
|
2016-03-17 11:45:48 +00:00
|
|
|
|
|
2016-05-11 15:05:40 +01:00
|
|
|
|
<h2 class="heading-medium">
|
2016-05-03 13:25:22 +01:00
|
|
|
|
In the last 7 days
|
2016-05-11 15:05:40 +01:00
|
|
|
|
</h2>
|
2016-06-28 08:59:08 +01:00
|
|
|
|
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% call ajax_block(updates_url, 'totals') %}
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{% include 'views/dashboard/_totals.html' %}
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% endcall %}
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{{ show_more(
|
|
|
|
|
|
url_for('.weekly', service_id=current_service.id),
|
|
|
|
|
|
'Compare to previous weeks'
|
|
|
|
|
|
) }}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{% if template_statistics|length %}
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% call ajax_block(updates_url, 'template-statistics') %}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
{% include 'views/dashboard/template-statistics.html' %}
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% endcall %}
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{{ show_more(
|
|
|
|
|
|
url_for('.template_history', service_id=current_service.id),
|
|
|
|
|
|
'See all templates used this year'
|
|
|
|
|
|
) }}
|
|
|
|
|
|
{% endif %}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{% if jobs %}
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% call ajax_block(updates_url, 'jobs') %}
|
|
|
|
|
|
{% include 'views/dashboard/_jobs.html' %}
|
|
|
|
|
|
{% endcall %}
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{{ show_more(
|
|
|
|
|
|
url_for('.view_jobs', service_id=current_service.id),
|
|
|
|
|
|
'See all uploaded files'
|
|
|
|
|
|
) }}
|
|
|
|
|
|
{% endif %}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{% if current_user.has_permissions(['manage_settings'], admin_override=True) %}
|
|
|
|
|
|
<h2 class='heading-medium'>This year</h2>
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% call ajax_block(updates_url, 'usage') %}
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{% include 'views/dashboard/_usage.html' %}
|
2016-06-28 09:21:46 +01:00
|
|
|
|
{% endcall %}
|
2016-06-28 09:07:04 +01:00
|
|
|
|
{{ show_more(
|
|
|
|
|
|
url_for(".usage", service_id=current_service['id']),
|
|
|
|
|
|
'See usage breakdown'
|
|
|
|
|
|
) }}
|
|
|
|
|
|
{% endif %}
|
2016-03-17 11:45:48 +00:00
|
|
|
|
|
2016-04-20 15:37:17 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2016-03-17 11:45:48 +00:00
|
|
|
|
{% endblock %}
|