mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-19 01:44:45 -05:00
57 lines
1.7 KiB
HTML
57 lines
1.7 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() %}
|
|
<a class="file-list-filename" 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>
|
|
{% endcall %}
|
|
{{ spark_bar_field(item.requested_count, most_used_template_count) }}
|
|
{% endcall %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endblock %}
|