Files
notifications-admin/app/templates/views/dashboard/_totals.html
Chris Hill-Scott 24b579418f Replace message count macros with formatters
We prefer formatters now. Removing uses of the aliasing macro lets
remove it entirely.
2021-01-07 14:53:12 +00:00

43 lines
2.0 KiB
HTML

{% from "components/big-number.html" import big_number_with_status %}
<div class="ajax-block-container">
<div class="govuk-grid-row">
<div id="total-email" class="govuk-grid-column-one-third">
{{ big_number_with_status(
statistics['email']['requested'],
statistics['email']['requested']|message_count_label('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=True,
) }}
</div>
<div id="total-sms" class="govuk-grid-column-one-third">
{{ big_number_with_status(
statistics['sms']['requested'],
statistics['sms']['requested']|message_count_label('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=True,
) }}
</div>
<div id="total-letters" class="govuk-grid-column-one-third">
{{ big_number_with_status(
statistics['letter']['requested'],
statistics['letter']['requested']|message_count_label('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=True,
) }}
</div>
</div>
</div>