reverting changes

This commit is contained in:
Beverly Nguyen
2024-08-29 14:56:12 -07:00
parent 7fea566201
commit 5beb9fcce1

View File

@@ -1,47 +1,34 @@
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, spark_bar_field %}
<div class="ajax-block-container"> <div class="ajax-block-container">
{% if template_statistics|length > 1 %} {% if template_statistics|length > 1 %}
<div class="template-statistics-table table-overflow-x-auto"> <div class='template-statistics-table table-overflow-x-auto'>
<table class="usa-table width-full"> {% call(item, row_number) list_table(
<caption class="font-body-lg table-heading usa-sr-only"> template_statistics,
Messages sent by template caption="Messages sent by template",
</caption> caption_visible=False,
<thead class="table-field-headings"> border_visible=True,
<tr> empty_message='',
<th class="table-field-heading-first" width=""> field_headings=[
<span>Template name</span> 'Template',
</th> 'Messages sent'
<th class="table-field-heading" width=""> ],
<span>Folder</span> field_headings_visible=False
</th> ) %}
<th class="table-field-heading" width="">
<span>Last used</span> {% call row_heading() %}
</th>
<th class="table-field-heading" width="">
<span>Created by</span>
</th>
<th class="table-field-heading" width="">
<span># Times used</span>
</th>
</tr>
</thead>
<tbody>
{% for item in template_statistics[:8] %}
<tr class="table-row">
<td>
<a class="usa-link template-statistics-table-template-name" href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a> <a class="usa-link 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"> <span class="template-statistics-table-hint">
{{ 1|message_count_label(item.template_type, suffix='template')|capitalize }} {{ 1|message_count_label(item.template_type, suffix='template')|capitalize }}
</span> </span>
</td> {% endcall %}
<td><p>{{ item.template_folder }}</p></td>
<td><p>{{ item.last_used|format_datetime_table}}</p></td> {{ spark_bar_field(item.count, most_used_template_count, id=item.template_id) }}
<td><p>{{ item.created_by }}</p></td> {% endcall %}
<td><p>{{ item.count }}</p></td> <a
</tr> href="{{ url_for('.template_usage', service_id=current_service.id) }}"
{% endfor %} class="usa-link show-more-no-border"
</tbody> ><span>See templates used by month</span></a>
</table>
<a href="/services/78409625-0c0a-485e-b82c-b19c8f4b1bdb/template-usage" class="usa-link show-more-no-border"><span>See templates by month</span></a>
</div> </div>
{% endif %} {% endif %}
</div> </div>