Merge pull request #832 from alphagov/make-numbers-less-confusing

Make numbers on a job less confusing
This commit is contained in:
Chris Hill-Scott
2016-08-05 12:14:29 +01:00
committed by GitHub
8 changed files with 130 additions and 64 deletions

View File

@@ -4,12 +4,18 @@
<div class="dashboard-table">
{% endif %}
{% if notifications and not help %}
<p class="bottom-gutter">
<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>
&emsp;
<span id="time-left">{{ time_left }}</span>
</p>
{% if not help %}
{% if percentage_complete < 100 %}
<p class="bottom-gutter-1-2 hint">
Report is {{ "{:.0f}%".format(percentage_complete) }} complete…
</p>
{% elif notifications %}
<p class="bottom-gutter-1-2">
<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>
&emsp;
<span id="time-left">{{ time_left }}</span>
</p>
{% endif %}
{% endif %}
{% call(item, row_number) list_table(
@@ -44,6 +50,12 @@
{% endcall %}
{% endcall %}
{% if more_than_one_page %}
<p class="table-show-more-link">
Only showing the first 50 rows
</p>
{% endif %}
{% if notifications %}
</div>
{% endif %}

View File

@@ -23,7 +23,7 @@
{% endcall %}
{% call field() %}
{{ big_number(
item.get('notifications_sent', 0) - item.get('notifications_delivered', 0) - item.get('notifications_failed', 0),
item.get('notification_count', 0) - item.get('notifications_delivered', 0) - item.get('notifications_failed', 0),
smallest=True
) }}
{% endcall %}

View File

@@ -14,9 +14,9 @@
<h1 class="heading-large">
<span class="visually-hidden">
{%- if request_args.get('status') != 'delivered,failed' -%}
{%- if status != 'delivered,failed' -%}
{%- for label, option, _, _ in status_filters -%}
{%- if request_args.get('status', 'delivered,failed') == option -%}{{label}} {% endif -%}
{%- if status == option -%}{{label}} {% endif -%}
{%- endfor -%}
{%- endif -%}
</span>
@@ -29,15 +29,15 @@
{{ pill(
'Status',
status_filters,
request_args.get('status', '')
status
) }}
</div>
{% if notifications %}
<p class="bottom-gutter">
<a href="{{ download_link }}" download="download" class="heading-small">Download as a CSV file</a>
<p class="bottom-gutter-1-2">
<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>
&emsp;
Delivery information is available for 7 days
Data available for 7 days
</p>
{% endif %}