Files
notifications-admin/app/templates/views/dashboard/template-statistics.html
Chris Hill-Scott 24b579418f Replace message count macros with formatters
We prefer formatters now. Removing uses of the aliasing macro lets
remove it entirely.
2021-01-07 14:53:12 +00:00

47 lines
1.7 KiB
HTML

{% from "components/big-number.html" import big_number %}
{% from "components/big-number.html" import big_number %}
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, spark_bar_field %}
{% from "components/show-more.html" import show_more %}
<div class="ajax-block-container">
{% if template_statistics|length > 1 %}
<div class='template-statistics-table'>
{% call(item, row_number) list_table(
template_statistics,
caption="By template",
caption_visible=True,
empty_message='',
field_headings=[
'Template',
'Messages sent'
],
field_headings_visible=False
) %}
{% call row_heading() %}
{% if item.is_precompiled_letter %}
<span class="template-statistics-table-template-name">
Provided as PDF
</span>
<span class="template-statistics-table-hint">
Letter
</span>
{% else %}
<a class="govuk-link govuk-link--no-visited-state template-statistics-table-template-name" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
<span class="template-statistics-table-hint">
{{ 1|message_count_label(item.template_type, suffix='template')|capitalize }}
</span>
{% endif %}
{% endcall %}
{{ spark_bar_field(item.count, most_used_template_count, id=item.template_id) }}
{% endcall %}
{{ show_more(
url_for('.template_usage', service_id=current_service.id),
'See templates used by month',
with_border=False
) }}
</div>
{% endif %}
</div>