2016-09-09 15:41:32 +01:00
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, notification_status_field %}
2016-09-01 15:40:49 +01:00
{% from "components/page-footer.html" import page_footer %}
2018-09-19 12:39:36 +01:00
{% from "components/form.html" import form_wrapper %}
2016-03-02 17:36:20 +00:00
2020-09-10 23:12:29 +01:00
< div class = "ajax-block-container" aria-labelledby = 'pill-selected-item' role = "region" >
2020-01-08 12:23:09 +00:00
{% if job.scheduled %}
2016-06-28 09:21:46 +01:00
2020-05-29 17:11:01 +01:00
< p class = "govuk-body" >
2017-06-24 17:12:45 +01:00
Sending
2019-12-06 07:53:46 +00:00
< a class = "govuk-link govuk-link--no-visited-state" href = "{{ url_for('.view_template_version', service_id=current_service.id, template_id=job.template.id, version=job.template_version) }}" > {{ job.template.name }}< / a >
2017-06-24 17:12:45 +01:00
{{ job.scheduled_for|format_datetime_relative }}
2016-09-01 11:06:52 +01:00
< / p >
2016-09-01 15:40:49 +01:00
< div class = "page-footer" >
2018-09-19 12:39:36 +01:00
{% call form_wrapper() %}
2016-09-01 15:40:49 +01:00
{{ page_footer(
button_text="Cancel sending",
destructive=True
) }}
2018-09-19 12:39:36 +01:00
{% endcall %}
2016-09-01 15:40:49 +01:00
< / div >
2016-08-25 16:49:31 +01:00
2016-09-01 11:06:52 +01:00
{% else %}
2016-08-25 16:49:31 +01:00
2016-09-01 11:06:52 +01:00
{% if notifications %}
2017-03-22 10:55:15 +00:00
< div class = "dashboard-table bottom-gutter-3-2" >
2016-09-01 11:06:52 +01:00
{% endif %}
2016-06-13 14:13:23 +01:00
2020-02-27 10:13:10 +00:00
{% if job.template_type == 'letter' %}
2018-03-06 10:24:01 +00:00
< div class = "keyline-block bottom-gutter-1-2" >
{% endif %}
2020-01-08 16:23:43 +00:00
{% if job.still_processing %}
2020-02-27 10:13:10 +00:00
< p class = "{% if job.template_type != 'letter' %}bottom-gutter{% endif %} hint" >
2020-01-08 12:23:09 +00:00
Report is {{ "{:.0f}%".format(job.percentage_complete * 0.99) }} complete…
2017-07-13 09:57:15 +01:00
< / p >
{% elif notifications %}
2020-02-27 10:13:10 +00:00
< p class = "{% if job.template_type != 'letter' %}bottom-gutter{% endif %}" >
2019-12-06 07:53:46 +00:00
< a href = "{{ download_link }}" download class = "govuk-link govuk-link--no-visited-state heading-small" > Download this report< / a >
2017-07-13 09:57:15 +01:00
 
< span id = "time-left" > {{ time_left }}< / span >
< / p >
{% endif %}
2020-02-27 10:13:10 +00:00
{% if job.template_type == 'letter' %}
2018-03-06 10:24:01 +00:00
< / div >
2016-07-11 13:53:55 +01:00
{% endif %}
2016-08-25 16:49:31 +01:00
2016-09-01 11:06:52 +01:00
{% call(item, row_number) list_table(
notifications,
caption=uploaded_file_name,
caption_visible=False,
2020-01-21 14:07:23 +00:00
empty_message='No messages to show yet…' if job.awaiting_processing_or_recently_processed else 'These messages have been deleted because they were sent more than {} days ago'.format(service_data_retention_days),
2016-09-01 11:06:52 +01:00
field_headings=[
'Recipient',
'Status'
],
field_headings_visible=False
2016-08-25 16:49:31 +01:00
) %}
2016-09-01 11:06:52 +01:00
{% call row_heading() %}
2019-12-06 07:53:46 +00:00
< a class = "govuk-link govuk-link--no-visited-state file-list-filename" href = "{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id, from_job=job.id) }}" > {{ item.to }}< / a >
2017-06-24 17:12:45 +01:00
< p class = "file-list-hint" >
{{ item.preview_of_content }}
< / p >
2016-09-01 11:06:52 +01:00
{% endcall %}
2017-10-02 12:34:10 +01:00
{{ notification_status_field(item) }}
2016-08-25 16:49:31 +01:00
{% endcall %}
2016-06-28 09:21:46 +01:00
2016-09-01 11:06:52 +01:00
{% if more_than_one_page %}
< p class = "table-show-more-link" >
Only showing the first 50 rows
< / p >
{% endif %}
{% if notifications %}
< / div >
2016-08-25 16:49:31 +01:00
{% endif %}
2016-08-02 10:34:27 +01:00
{% endif %}
2020-09-10 17:34:05 +01:00
< / div >