Revert "Revert "Restyle template statistics and received text messages""

This commit is contained in:
Chris Hill-Scott
2020-02-18 16:16:51 +00:00
committed by GitHub
parent a8ca8c1835
commit 3bbd5381c6
15 changed files with 186 additions and 114 deletions

View File

@@ -6,39 +6,41 @@
<div class="ajax-block-container">
{% if template_statistics|length > 1 %}
<div class='dashboard-table'>
<div class='template-statistics-table'>
{% call(item, row_number) list_table(
template_statistics,
caption="Templates used",
caption_visible=False,
caption="By template",
caption_visible=True,
empty_message='',
field_headings=[
'Template',
'Messages sent'
],
field_headings_visible=True
field_headings_visible=False
) %}
{% call row_heading() %}
{% if item.is_precompiled_letter %}
<span class="file-list-filename">
<span class="template-statistics-table-template-name">
Provided as PDF
</span>
<span class="file-list-hint">
<span class="template-statistics-table-hint">
Letter
</span>
{% else %}
<a class="file-list-filename" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
<span class="file-list-hint">
<a class="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">
{{ message_count_label(1, 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'
'See templates used by month',
with_border=False
) }}
</div>
{% endif %}