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-04-29 13:42:15 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
33b18cedebf8cf82bc0347db9de12e2c8e984e37
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: 525ms Template: 13ms
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