mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-10 03:14:58 -04:00
This follows on from: - https://github.com/alphagov/notifications-admin/pull/1094 - https://github.com/alphagov/notifications-admin/pull/1109 It depends on: - [ ] https://github.com/alphagov/notifications-api/pull/829 A year is too long. Month-by-month is a better timeframe for making decisions or seeing patterns in your usage.
59 lines
1.8 KiB
HTML
59 lines
1.8 KiB
HTML
{% from "components/message-count-label.html" import message_count_label %}
|
|
{% from "components/pill.html" import pill %}
|
|
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, spark_bar_field %}
|
|
|
|
{% extends "withnav_template.html" %}
|
|
|
|
{% block service_page_title %}
|
|
Templates used
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
<h1 class="heading-large">Templates used</h1>
|
|
|
|
<div class="bottom-gutter-3-2">
|
|
{{ pill(
|
|
items=years,
|
|
current_value=selected_year,
|
|
big_number_args={'smallest': True},
|
|
) }}
|
|
</div>
|
|
|
|
<div class="dashboard">
|
|
{% for month in months %}
|
|
<h2>{{ month.name }}</h2>
|
|
{% if not month.templates_used %}
|
|
<p class="table-no-data">
|
|
No messages sent
|
|
</p>
|
|
{% else %}
|
|
<div class='dashboard-table template-usage-table'>
|
|
{% call(item, row_number) list_table(
|
|
month.templates_used,
|
|
caption=month.name,
|
|
caption_visible=False,
|
|
empty_message='',
|
|
field_headings=[
|
|
'Template',
|
|
'Messages sent'
|
|
],
|
|
field_headings_visible=False
|
|
) %}
|
|
{% call row_heading() %}
|
|
<span class="spark-bar-label">
|
|
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.id) }}">{{ item.name }}</a>
|
|
<span class="file-list-hint">
|
|
{{ message_count_label(1, item.type, suffix='template')|capitalize }}
|
|
</span>
|
|
</span>
|
|
{% endcall %}
|
|
{{ spark_bar_field(item.requested_count, most_used_template_count) }}
|
|
{% endcall %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endblock %}
|