Files
notifications-admin/app/templates/components/message-count-label.html
Chris Hill-Scott 4ac1a03a89 Use message_count_label component
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.
2016-06-05 18:41:19 +01:00

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 %}