mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Make template usage on dashboard easier to scan
The dashboard looked a bit table-y. This commit makes four main changes: - show a bar chart (drawn in CSS) for template usage (only shown if you’ve used more than one template recently) - only break down template usage by template name, not template type (because that’s happening with the big numbers) - change the style of the ‘show more’ links under each section so that they are all consistent, and a little less busy (one less keyline) - remove the ‘recent templates‘ title so that the first two sections of the page group under ‘in the last 7 days’
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>
|
||||
|
||||
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