mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Add a message count component
The logic to say ‘1 email sent’ vs ‘12 text messages sent’ is repeated all over the place. So this commit adds a component to put it in one place.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% from "components/table.html" import list_table, field, hidden_field_heading, right_aligned_field_heading %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
|
||||
<dl>
|
||||
{% for item in template_statistics %}
|
||||
@@ -13,8 +13,7 @@
|
||||
<dd class="column-half">
|
||||
<span class="spark-bar">
|
||||
<span style="width: {{ item.usage_count / most_used_template_count * 100 }}%"></span>
|
||||
{{ item.usage_count }} {{ 'text messages' if item.template.template_type == 'sms' else 'emails' }} sent
|
||||
|
||||
{{ item.usage_count }} {{ message_count_label(item.usage_count, item.template.template_type) }}
|
||||
</span>
|
||||
</dd>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user