mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-16 19:30:13 -04:00
Numbers over a billion overflow the two column layout. Numbers over one hundred thousand overflow the three column layout. This commit makes the type size smaller in these cases, so that the numbers still fit in the boxes.
46 lines
2.2 KiB
HTML
46 lines
2.2 KiB
HTML
{% from "components/big-number.html" import big_number_with_status %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
|
|
<div class="ajax-block-container">
|
|
<div class="grid-row">
|
|
<div id="total-email" class="{{column_width}}">
|
|
{{ big_number_with_status(
|
|
statistics['email']['requested'],
|
|
message_count_label(statistics['email']['requested'], 'email', suffix='sent'),
|
|
statistics['email']['failed'],
|
|
statistics['email']['failed_percentage'],
|
|
statistics['email']['show_warning'],
|
|
failure_link=url_for(".view_notifications", service_id=service_id, message_type='email', status='failed'),
|
|
link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed'),
|
|
smaller=smaller_font_size
|
|
) }}
|
|
</div>
|
|
<div id="total-sms" class="{{column_width}}">
|
|
{{ big_number_with_status(
|
|
statistics['sms']['requested'],
|
|
message_count_label(statistics['sms']['requested'], 'sms', suffix='sent'),
|
|
statistics['sms']['failed'],
|
|
statistics['sms']['failed_percentage'],
|
|
statistics['sms']['show_warning'],
|
|
failure_link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='failed'),
|
|
link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='sending,delivered,failed'),
|
|
smaller=smaller_font_size
|
|
) }}
|
|
</div>
|
|
{% if 'letter' in current_service['permissions'] %}
|
|
<div id="total-letters" class="{{column_width}}">
|
|
{{ big_number_with_status(
|
|
statistics['letter']['requested'],
|
|
message_count_label(statistics['letter']['requested'], 'letter', suffix='sent'),
|
|
statistics['letter']['failed'],
|
|
statistics['letter']['failed_percentage'],
|
|
statistics['letter']['show_warning'],
|
|
failure_link=url_for(".view_notifications", service_id=service_id, message_type='letter', status='failed'),
|
|
link=url_for(".view_notifications", service_id=service_id, message_type='letter', status=''),
|
|
smaller=smaller_font_size
|
|
) }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|