mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-14 02:09:44 -04:00
Make job counters smaller
With sending, delivered and failed all on one line there’s not much space. When these numbers get relatively big (in the 000s) they can start mushing into each other. This commit makes them smaller so that they remain separate.
This commit is contained in:
@@ -26,6 +26,16 @@
|
||||
|
||||
}
|
||||
|
||||
.big-number-smallest {
|
||||
|
||||
@extend %big-number;
|
||||
|
||||
.big-number-number {
|
||||
@include bold-24();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.big-number-with-status {
|
||||
|
||||
@extend %big-number;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{% macro big_number(number, label, label_link=None, currency='', smaller=False) %}
|
||||
<div class="big-number{% if smaller %}-smaller{% endif %}">
|
||||
{% macro big_number(number, label, label_link=None, currency='', smaller=False, smallest=False) %}
|
||||
<div class="big-number{% if smaller %}-smaller{% endif %}{% if smallest %}-smallest{% endif %}">
|
||||
<div class="big-number-number">
|
||||
{% if number is number %}
|
||||
{% if currency %}
|
||||
{{ "{}{:,.2f}".format(currency, number) }}
|
||||
{% else %}
|
||||
{{ "{}{:,}".format(currency, number) }}
|
||||
{{ "{:,}".format(number) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ number }}
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
{% call field() %}
|
||||
{{ big_number(
|
||||
item.get('notifications_sent', 0) - item.get('notifications_delivered', 0) - item.get('notifications_failed', 0),
|
||||
smaller=True
|
||||
smallest=True
|
||||
) }}
|
||||
{% endcall %}
|
||||
{% call field() %}
|
||||
{{ big_number(item.get('notifications_delivered', 0), smaller=True) }}
|
||||
{{ big_number(item.get('notifications_delivered', 0), smallest=True) }}
|
||||
{% endcall %}
|
||||
{% call field(status='error' if 0 else '') %}
|
||||
{{ big_number(item.get('notifications_failed', 0), smaller=True) }}
|
||||
{{ big_number(item.get('notifications_failed', 0), smallest=True) }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user