Files
notifications-admin/app/templates/views/organisations/organisation/index.html
T

122 lines
3.7 KiB
HTML
Raw Normal View History

{% from "components/page-header.html" import page_header %}
2020-02-27 15:20:48 +00:00
{% from "components/big-number.html" import big_number %}
2020-02-28 16:14:28 +00:00
{% from "components/live-search.html" import live_search %}
2020-02-28 12:32:47 +00:00
{% from "components/pill.html" import pill %}
2018-02-13 14:49:03 +00:00
{% extends "org_template.html" %}
2018-02-14 16:13:11 +00:00
{% block org_page_title %}
2019-06-20 10:59:54 +01:00
Usage
2018-02-13 14:49:03 +00:00
{% endblock %}
{% block maincolumn_content %}
{{ page_header('Usage', size='medium') }}
2020-02-25 17:49:55 +00:00
2020-02-28 15:41:59 +00:00
<div class="bottom-gutter">
2020-02-28 12:32:47 +00:00
{{ pill(years, selected_year, big_number_args={'smallest': True}) }}
2020-02-27 15:21:08 +00:00
</div>
2020-02-28 13:40:07 +00:00
<div class="govuk-grid-row bottom-gutter">
<div class="govuk-grid-column-one-third">
2020-02-28 15:41:59 +00:00
<h2 class="heading-small">Emails</h2>
2020-02-28 12:32:47 +00:00
<div class="keyline-block">
{{ big_number(
total_emails_sent,
2020-02-28 15:41:59 +00:00
label='sent',
2020-02-28 12:32:47 +00:00
smaller=True
) }}
</div>
</div>
2020-02-28 13:40:07 +00:00
<div class="govuk-grid-column-one-third">
2020-02-28 15:41:59 +00:00
<h2 class="heading-small">Text messages</h2>
2020-02-28 12:32:47 +00:00
<div class="keyline-block">
{{ big_number(
total_sms_cost,
2020-02-28 15:41:59 +00:00
'spent',
2020-02-28 12:32:47 +00:00
currency="£",
smaller=True
) }}
</div>
</div>
2020-02-28 13:40:07 +00:00
<div class="govuk-grid-column-one-third">
2020-02-28 15:41:59 +00:00
<h2 class="heading-small">Letters</h2>
2020-02-28 12:32:47 +00:00
<div class="keyline-block">
{{ big_number(
total_letter_cost,
2020-02-28 15:41:59 +00:00
'spent',
2020-02-28 12:32:47 +00:00
currency="£",
smaller=True
) }}
</div>
</div>
</div>
2020-02-28 16:14:28 +00:00
{% if search_form %}
<div class="govuk-!-margin-bottom-5">
{{ live_search(
target_selector='.organisation-service',
show=True,
form=search_form,
label='Search by service'
) }}
</div>
{% endif %}
<h2 class="heading-small {% if search_form %}visually-hidden{% endif %}">By service</h2>
2020-02-27 15:21:08 +00:00
{% for service in services %}
2020-02-28 16:14:28 +00:00
<div class="keyline-block govuk-!-margin-top-2 organisation-service">
<h3 class="govuk-!-font-weight-bold govuk-!-font-size-24 govuk-!-margin-bottom-3 govuk-!-margin-top-1 live-search-relevant">
2020-02-27 15:29:51 +00:00
<a href="{{ url_for('main.usage', service_id=service.service_id) }}" class="govuk-link govuk-link--no-visited-state browse-list-link">{{ service.service_name }}</a>
2020-02-28 15:41:59 +00:00
</h3>
2020-02-28 13:40:07 +00:00
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-third">
2020-02-27 15:20:48 +00:00
{{ big_number(
2020-02-27 15:29:51 +00:00
service.emails_sent,
label=service.emails_sent|message_count_label('email'),
2020-02-27 15:29:51 +00:00
smallest=True
) }}
</div>
2020-02-28 13:40:07 +00:00
<div class="govuk-grid-column-one-third">
2020-02-27 15:29:51 +00:00
{% if service.sms_cost %}
{{ big_number(
service.sms_cost,
'spent on text messages',
currency="£",
smallest=True
) }}
{% else %}
{{ big_number(
service.sms_billable_units,
'free {}'.format(service.sms_billable_units|message_count_label('sms')),
2020-02-27 15:29:51 +00:00
smallest=True
) }}
{% endif %}
</div>
2020-02-28 13:40:07 +00:00
<div class="govuk-grid-column-one-third">
2020-02-27 15:29:51 +00:00
{{ big_number(
service.letter_cost,
'spent on letters',
2020-02-27 15:20:48 +00:00
currency="£",
smallest=True
) }}
2020-02-27 15:29:51 +00:00
</div>
2020-02-27 15:20:48 +00:00
</div>
2020-02-25 17:49:55 +00:00
</div>
2020-02-28 13:43:17 +00:00
{% endfor %}
<div class="keyline-block govuk-!-margin-top-2"></div>
{% if not services %}
<p class="govuk-body govuk-hint">
{{ current_org.name }} has no live services on GOV.UK Notify
</p>
<div class="keyline-block govuk-!-margin-top-2"></div>
{% else %}
<div class="js-stick-at-bottom-when-scrolling">
<p class="govuk-!-margin-bottom-1">
<a href="{{ download_link }}" download="download" class="govuk-link govuk-link--no-visited-state govuk-!-font-weight-bold">Download this report</a>
</p>
</div>
{% endif %}
2018-02-13 14:49:03 +00:00
{% endblock %}