Files
notifications-admin/app/templates/views/dashboard/_inbox.html
Chris Hill-Scott 74e70ed8bc Refactor summaries into model
This lets us encapsulate some of the logic that’s currently cluttering
up the view/template layer.
2020-02-20 11:58:57 +00:00

21 lines
983 B
HTML

{% from "components/big-number.html" import big_number, big_number_with_status %}
{% from "components/message-count-label.html" import message_count_label %}
<div class="ajax-block">
{% if current_service.inbound_sms_summary != None %}
<a id="total-received" class="govuk-link govuk-link--no-visited-state banner-dashboard" class="banner-dashboard" href="{{ url_for('.inbox', service_id=current_service.id) }}">
<span class="banner-dashboard-count">
{{ current_service.inbound_sms_summary.count|format_thousands }}
</span>
<span class="banner-dashboard-count-label">
{{ message_count_label(current_service.inbound_sms_summary.count, 'sms', suffix='received') }}
</span>
{% if current_service.inbound_sms_summary.most_recent %}
<span class="banner-dashboard-meta">
latest message {{ current_service.inbound_sms_summary.most_recent | format_delta }}
</span>
{% endif %}
</a>
{% endif %}
</div>