Files
notifications-admin/app/templates/views/dashboard/most-used-templates.html
Beverly Nguyen dd7d32e51c remove extra code
2025-03-11 12:45:29 -07:00

47 lines
1.8 KiB
HTML

<div class="ajax-block-container">
{% if template_statistics|length > 1 %}
<h2 class="margin-top-4 margin-bottom-1">Most Used Templates</h2>
<div class="template-statistics-table table-overflow-x-auto">
<table class="usa-table width-full">
<caption class="font-body-lg table-heading usa-sr-only">
Messages sent by template
</caption>
<thead class="table-field-headings">
<tr>
<th class="table-field-heading-first" width="">
<span>Template name</span>
</th>
<th class="table-field-heading" width="">
<span>Folder</span>
</th>
<th class="table-field-heading" width="">
<span>Last used</span>
</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>
</td>
<td><p>{{ item.template_folder }}</p></td>
<td><p>{{ item.last_used|format_datetime_table}}</p></td>
<td><p>{{ item.created_by }}</p></td>
<td><p>{{ '{:,.0f}'.format(item.count) }}</p></td>
</tr>
{% endfor %}
</tbody>
</table>
<a
href="{{ url_for('.template_usage', service_id=current_service.id) }}" class="usa-link show-more-no-border"><span>See templates by month</span></a>
</div>
{% endif %}
</div>