Files
notifications-admin/app/templates/views/dashboard/_totals.html
Chris Hill-Scott 8c8f321a11 Make sure partials always have a wrapping <div>
The diffDOM Javascript sometimes throws an error if it can’t calculate
a diff between the original content of the page and the updated HTML
delivered via AJAX. The problem seems to be when there’s not one,
consistent top-level element for it to base its calculations on.

This commit:
- makes sure that all AJAX-delivered partials have a wrapping `<div>`
- that this `<div>` has a consistent class name to make it clear why
  it’s there
2016-09-01 11:22:22 +01:00

28 lines
1.3 KiB
HTML

{% from "components/big-number.html" import big_number_with_status %}
{% from "components/message-count-label.html" import message_count_label %}
<div class="grid-row ajax-block-container">
<div class="column-half">
{{ big_number_with_status(
statistics['email']['requested'],
message_count_label(statistics['email']['requested'], 'email', suffix=''),
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')
) }}
</div>
<div class="column-half">
{{ big_number_with_status(
statistics['sms']['requested'],
message_count_label(statistics['sms']['requested'], 'sms', suffix=''),
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')
) }}
</div>
</div>