mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 09:58:43 -04:00
Message status was almost identical to banner, visually and semantically. This consolidates the two into one component. This means adding an extra parameter which controls whether or not the banner has a tick (with and without a tick are the only two variations currently).
69 lines
1.8 KiB
HTML
69 lines
1.8 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/table.html" import list_table, field, right_aligned_field_heading %}
|
|
{% from "components/big-number.html" import big_number %}
|
|
{% from "components/banner.html" import banner %}
|
|
|
|
{% block page_title %}
|
|
GOV.UK Notify | Notifications activity
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
<h1 class="heading-large">
|
|
{{ uploaded_file_name }}
|
|
</h1>
|
|
|
|
<p>
|
|
{{ banner(flash_message, with_tick=True) }}
|
|
</p>
|
|
|
|
<ul class="grid-row job-totals">
|
|
<li class="column-one-third">
|
|
{{ big_number(
|
|
counts.total,
|
|
'text message' if 1 == counts.total else 'text messages'
|
|
)}}
|
|
</li>
|
|
<li class="column-one-third">
|
|
{{ big_number(
|
|
counts.failed,
|
|
'failed delivery' if 1 == counts.failed else 'failed deliveries'
|
|
)}}
|
|
</li>
|
|
<li class="column-one-third">
|
|
{{ big_number(
|
|
cost, 'total cost'
|
|
)}}
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
Sent with template <a href="{{ url_for('.edit_template') }}">{{ template_used }}</a> at {{ uploaded_file_time }}
|
|
</p>
|
|
|
|
{% call(item) list_table(
|
|
messages,
|
|
caption='Messages',
|
|
caption_visible=False,
|
|
field_headings=[
|
|
'To',
|
|
'Message',
|
|
right_aligned_field_heading('Delivery status')
|
|
]
|
|
) %}
|
|
{% call field() %}
|
|
<a href="{{ url_for('.shownotification', notification_id=item.id) }}">{{item.phone}}</a>
|
|
{% endcall %}
|
|
{% call field() %}
|
|
<a href="{{ url_for('.shownotification', notification_id=item.id) }}">{{item.message[:50]}}…</a>
|
|
{% endcall %}
|
|
{% call field(
|
|
align='right',
|
|
status='error' if item.status == 'Failed' else 'default'
|
|
) %}
|
|
{{ item.status }} {{ item.time }}
|
|
{% endcall %}
|
|
{% endcall %}
|
|
|
|
{% endblock %}
|