Files
notifications-admin/app/templates/components/message-count-label.html
Chris Hill-Scott 3bd62c2aef Offer link to upload
‘Upload recipients’ and ‘Send to one recipient’ have always been
slightly clunky phrases.

Now that basic view jumps straight into the ‘Send to one recipient’
flow there’s no way for users to get to the ‘Upload recipients’ flow.

By adding a link to it from the ‘Send to one recipient’ flow it’s
possible for users of basic view to access it.

But we don’t want to introduce too much inconsistency between basic view
and admin view because users will be migrating from one to another. They
might also be talking to their manager, who wouldn’t be able to tell
them where to click if they were looking at two completely different
interfaces.

This also means that we can keep the left-hand navigation in basic view
nice and simple with the two options (‘Templates’ and ‘Sent messages’),
rather than trying to introduce something like ‘Send one message’ and
‘Send lots of messages’ later on.
2018-08-09 11:56:13 +01:00

58 lines
1.3 KiB
HTML

{% macro message_count_label(count, template_type, suffix='sent') -%}
{% if template_type == None %}
{%- if count == 1 -%}
message
{%- else -%}
messages
{%- endif -%}
{% endif %}
{%- if template_type == 'sms' -%}
{%- if count == 1 -%}
text message
{%- else -%}
text messages
{%- endif -%}
{%- elif template_type == 'email' -%}
{%- if count == 1 -%}
email
{%- else -%}
emails
{%- endif -%}
{%- elif template_type == 'letter' -%}
{%- if count == 1 -%}
letter
{%- else -%}
letters
{%- endif -%}
{%- endif %} {{ suffix }}
{%- endmacro %}
{% macro recipient_count_label(count, template_type) -%}
{% if template_type == None %}
{%- if count == 1 -%}
recipient
{%- else -%}
recipients
{%- endif -%}
{% endif %}
{%- if template_type == 'sms' -%}
{%- if count == 1 -%}
phone number
{%- else -%}
phone numbers
{%- endif -%}
{%- elif template_type == 'email' -%}
{%- if count == 1 -%}
email address
{%- else -%}
email addresses
{%- endif -%}
{%- elif template_type == 'letter' -%}
{%- if count == 1 -%}
address
{%- else -%}
addresses
{%- endif -%}
{%- endif %}
{%- endmacro %}