mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-27 05:41:00 -05:00
For the button on the check page, we need to be able to say ‘1 text message’ or ‘55 emails’. We already have the logic to do this on the dashboard (101 text messages sent), and it’s already in a component. So this commit makes the check page use the same component.
16 lines
376 B
HTML
16 lines
376 B
HTML
{% macro message_count_label(count, template_type, suffix='sent') -%}
|
|
{%- if template_type == 'sms' -%}
|
|
{%- if count == 1 -%}
|
|
text message
|
|
{%- else -%}
|
|
text messages
|
|
{%- endif -%}
|
|
{%- elif template_type == 'email' -%}
|
|
{%- if count == 1 -%}
|
|
email
|
|
{%- else -%}
|
|
emails
|
|
{%- endif -%}
|
|
{%- endif %} {{ suffix }}
|
|
{%- endmacro %}
|