mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-04 13:41:38 -04:00
These numbers don’t look very clickable white-on-black. Blue is the colour of links, so lets see if they are more clickable in blue. The same clicking-a-big-number thing is also happening on the activity page, so this commit also changes the activity page to look the same.
91 lines
3.2 KiB
HTML
91 lines
3.2 KiB
HTML
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
|
{% from "components/show-more.html" import show_more %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
{% from "components/table.html" import list_table, field, right_aligned_field_heading, hidden_field_heading %}
|
|
|
|
<div
|
|
data-module="update-content"
|
|
data-resource="{{url_for(".service_dashboard_updates", service_id=current_service.id)}}"
|
|
data-key="today"
|
|
data-interval-seconds="2"
|
|
aria-live="polite"
|
|
>
|
|
<div class="grid-row">
|
|
<div class="column-half">
|
|
{{ big_number_with_status(
|
|
statistics.emails_requested,
|
|
message_count_label(statistics.emails_requested, 'email', suffix=''),
|
|
statistics.emails_failed,
|
|
statistics.get('emails_failure_rate', 0.0),
|
|
statistics.get('emails_failure_rate', 0)|float > 3,
|
|
failure_link=url_for(".view_notifications", service_id=current_service.id, message_type='email', status='failed'),
|
|
link=url_for(".view_notifications", service_id=current_service.id, message_type='email', status='sending,delivered,failed')
|
|
) }}
|
|
</div>
|
|
<div class="column-half">
|
|
{{ big_number_with_status(
|
|
statistics.sms_requested,
|
|
message_count_label(statistics.sms_requested, 'sms', suffix=''),
|
|
statistics.sms_failed,
|
|
statistics.get('sms_failure_rate', 0.0),
|
|
statistics.get('sms_failure_rate', 0)|float > 3,
|
|
failure_link=url_for(".view_notifications", service_id=current_service.id, message_type='sms', status='failed'),
|
|
link=url_for(".view_notifications", service_id=current_service.id, message_type='sms', status='sending,delivered,failed')
|
|
) }}
|
|
</div>
|
|
<div class="column-whole">
|
|
{{ show_more(
|
|
url_for('.weekly', service_id=current_service.id),
|
|
'Compare to previous weeks'
|
|
) }}
|
|
</div>
|
|
</div>
|
|
|
|
{% if template_statistics|length %}
|
|
{% include 'views/dashboard/template-statistics.html' %}
|
|
{{ show_more(
|
|
url_for('.template_history', service_id=current_service.id),
|
|
'See all templates sent this year'
|
|
) }}
|
|
{% endif %}
|
|
|
|
{% if jobs %}
|
|
{% include 'views/dashboard/_jobs.html' %}
|
|
{{ show_more(
|
|
url_for('.view_jobs', service_id=current_service.id),
|
|
'See all uploaded files'
|
|
) }}
|
|
{% endif %}
|
|
|
|
{% if current_user.has_permissions(['manage_settings'], admin_override=True) %}
|
|
<h2 class='heading-medium'>This year</h2>
|
|
|
|
<div class='grid-row'>
|
|
<div class='column-half'>
|
|
<div class="keyline-block">
|
|
{{ big_number("Unlimited", 'free email allowance', smaller=True) }}
|
|
</div>
|
|
</div>
|
|
<div class='column-half'>
|
|
<div class="keyline-block">
|
|
{% if sms_chargeable %}
|
|
{{ big_number(
|
|
(sms_chargeable * sms_rate),
|
|
'spent on text messages',
|
|
currency="£",
|
|
smaller=True
|
|
) }}
|
|
{% else %}
|
|
{{ big_number(sms_allowance_remaining, 'free text messages left', smaller=True) }}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ show_more(
|
|
url_for(".usage", service_id=current_service['id']),
|
|
'See usage breakdown'
|
|
) }}
|
|
{% endif %}
|
|
|
|
</div>
|