Files
notifications-admin/app/templates/views/job.html
Chris Hill-Scott 856296df5d Updates to display of jobs
This commit:
- adds the template to the jobs page (and puts it at the top of the send SMS
  page) so that it consistently appears in the same place throughout the
  journey
- put the real data about a job on the jobs page and on the dashboard
2016-02-04 10:59:03 +00:00

75 lines
2.0 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 %}
{% from "components/sms-message.html" import sms_message %}
{% block page_title %}
GOV.UK Notify | Notifications activity
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">
Sent text messages
</h1>
{{ sms_message(
template['content'],
)}}
<p class='heading-small'>
Started {{ uploaded_file_time|format_datetime }}
</p>
<ul class="grid-row job-totals">
<li class="column-one-quarter">
{{ big_number(
counts.total, 'queued'
)}}
</li>
<li class="column-one-quarter">
{{ big_number(
counts.total,
'text message' if 1 == counts.total else 'text messages'
)}}
</li>
<li class="column-one-third">
{{ big_number(
counts.failed,
'failed'
)}}
</li>
<li class="column-one-third">
{{ big_number(
cost, 'total cost'
)}}
</li>
</ul>
{% call(item) list_table(
messages,
caption=uploaded_file_name,
empty_message="Messages go here",
field_headings=[
'To',
'Message',
right_aligned_field_heading('Delivery status')
]
) %}
{% call field() %}
<a href="{{ url_for('.view_notification', service_id=service_id, job_id=456, notification_id=item.id) }}">{{item.phone}}</a>
{% endcall %}
{% call field() %}
<a href="{{ url_for('.view_notification', service_id=service_id, job_id=456, notification_id=item.id) }}">{{item.message[:50]}}…</a>
{% endcall %}
{% call field(
align='right',
status='error' if item.status == 'Failed' else 'default'
) %}
{{ item.status }}&emsp;{{ item.time }}
{% endcall %}
{% endcall %}
{% endblock %}