Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-08-16 20:49:00 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
f33e0d0e94eb1826e7de1673feaacf4708a18f66
notifications-admin/app/templates/components/message-count-label.html

16 lines
376 B
HTML
Raw Normal View History

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-03 14:48:21 +01:00
{% macro message_count_label(count, template_type, suffix='sent') -%}
Add a message count component The logic to say ‘1 email sent’ vs ‘12 text messages sent’ is repeated all over the place. So this commit adds a component to put it in one place.
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
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-03 14:48:21 +01:00
{%- endif -%}
{%- endif %} {{ suffix }}
{%- endmacro %}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 1234ms Template: 52ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API