mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Merge pull request #558 from alphagov/template-stats-2
Make template usage on dashboard easier to scan
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
{% macro big_number(number, label, label_link=None, currency='', smaller=False) %}
|
||||
<div class="big-number{% if smaller %}-smaller{% endif %}">
|
||||
{% if number is number %}
|
||||
{% if currency %}
|
||||
{{ "{}{:,.2f}".format(currency, number) }}
|
||||
<div class="big-number-number">
|
||||
{% if number is number %}
|
||||
{% if currency %}
|
||||
{{ "{}{:,.2f}".format(currency, number) }}
|
||||
{% else %}
|
||||
{{ "{}{:,}".format(currency, number) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ "{}{:,}".format(currency, number) }}
|
||||
{{ number }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ number }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if label_link %}
|
||||
<a class="big-number-label" href="{{ label_link }}">{{ label }}</a>
|
||||
<a class="big-number-overlay-link" href="{{ label_link }}" aria-hidden="true"></a>
|
||||
|
||||
15
app/templates/components/message-count-label.html
Normal file
15
app/templates/components/message-count-label.html
Normal file
@@ -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 %}
|
||||
3
app/templates/components/show-more.html
Normal file
3
app/templates/components/show-more.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% macro show_more(url, label) %}
|
||||
<a href="{{ url }}" class="show-more"><span>{{ label }}</span></a>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user