2016-06-03 14:48:21 +01:00
|
|
|
{% macro message_count_label(count, template_type, suffix='sent') -%}
|
2018-06-14 13:14:23 +01:00
|
|
|
{% if template_type == None %}
|
|
|
|
|
{%- if count == 1 -%}
|
|
|
|
|
message
|
|
|
|
|
{%- else -%}
|
|
|
|
|
messages
|
|
|
|
|
{%- endif -%}
|
|
|
|
|
{% endif %}
|
2016-05-13 09:58:07 +01:00
|
|
|
{%- if template_type == 'sms' -%}
|
|
|
|
|
{%- if count == 1 -%}
|
|
|
|
|
text message
|
|
|
|
|
{%- else -%}
|
|
|
|
|
text messages
|
|
|
|
|
{%- endif -%}
|
|
|
|
|
{%- elif template_type == 'email' -%}
|
|
|
|
|
{%- if count == 1 -%}
|
|
|
|
|
email
|
|
|
|
|
{%- else -%}
|
|
|
|
|
emails
|
2016-06-03 14:48:21 +01:00
|
|
|
{%- endif -%}
|
2016-11-08 13:12:07 +00:00
|
|
|
{%- elif template_type == 'letter' -%}
|
|
|
|
|
{%- if count == 1 -%}
|
|
|
|
|
letter
|
|
|
|
|
{%- else -%}
|
|
|
|
|
letters
|
|
|
|
|
{%- endif -%}
|
2016-06-03 14:48:21 +01:00
|
|
|
{%- endif %} {{ suffix }}
|
|
|
|
|
{%- endmacro %}
|
2018-07-18 09:48:19 +01:00
|
|
|
|
|
|
|
|
{% 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 %}
|
2018-11-12 14:43:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
{% macro folder_contents_count(number_of_folders, number_of_templates) %}
|
|
|
|
|
|
|
|
|
|
{% if number_of_folders == number_of_templates == 0 %}
|
|
|
|
|
Empty
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if number_of_templates == 1 %}
|
|
|
|
|
{{ number_of_templates }} template
|
|
|
|
|
{%- elif number_of_templates > 1 -%}
|
|
|
|
|
{{ number_of_templates }} templates
|
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
|
|
{%- if number_of_folders and number_of_templates %}, {% endif -%}
|
|
|
|
|
|
|
|
|
|
{%- if number_of_folders == 1 -%}
|
|
|
|
|
{{ number_of_folders }} folder
|
|
|
|
|
{%- elif number_of_folders > 1 -%}
|
|
|
|
|
{{ number_of_folders }} folders
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{%- endmacro %}
|