mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
Removed as part of refactoring the code to generate the graphs of template usage on the dashboard: https://github.com/alphagov/notifications-admin/commit/4a226a7a29d83a4187ae2df089098bbdcebf2202#diff-cf78cb5c29a2d3c4d45b61d8617824b7L29 Didn’t realise that they were used by the functional tests. This commit puts them back while keeping the code reuse.
41 lines
1.3 KiB
HTML
41 lines
1.3 KiB
HTML
{% from "components/big-number.html" import big_number %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
{% 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 %}
|
|
|
|
<div class='dashboard-table'>
|
|
{% call(item, row_number) list_table(
|
|
template_statistics,
|
|
caption="Templates used",
|
|
caption_visible=False,
|
|
empty_message='',
|
|
field_headings=[
|
|
'Template',
|
|
'Messages sent'
|
|
],
|
|
field_headings_visible=True
|
|
) %}
|
|
|
|
{% call row_heading() %}
|
|
<span class="spark-bar-label">
|
|
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
|
|
<span class="file-list-hint">
|
|
{{ message_count_label(1, item.template_type, suffix='template')|capitalize }}
|
|
</span>
|
|
</span>
|
|
{% endcall %}
|
|
{% if template_statistics|length > 1 %}
|
|
{{ spark_bar_field(item.count, most_used_template_count, id=item.template_id) }}
|
|
{% else %}
|
|
{% call field() %}
|
|
<span id='{{item.template_id}}' class="heading-small">
|
|
{{ big_number(
|
|
item.count,
|
|
smallest=True
|
|
) }}
|
|
</span>
|
|
{% endcall %}
|
|
{% endif %}
|
|
{% endcall %}
|
|
</div>
|