diff --git a/app/templates/components/message-count-label.html b/app/templates/components/message-count-label.html new file mode 100644 index 000000000..532a711d5 --- /dev/null +++ b/app/templates/components/message-count-label.html @@ -0,0 +1,15 @@ +{% macro message_count_label(count, template_type) -%} + {%- 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 %} sent +{%- endmacro %} \ No newline at end of file diff --git a/app/templates/views/dashboard/template-statistics.html b/app/templates/views/dashboard/template-statistics.html index 0af34f4ba..1d3f8e2ac 100644 --- a/app/templates/views/dashboard/template-statistics.html +++ b/app/templates/views/dashboard/template-statistics.html @@ -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 %}