Files
notifications-admin/app/templates/partials/jobs/notifications.html
T

78 lines
2.7 KiB
HTML
Raw Normal View History

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
2017-02-14 14:21:36 +00:00
<div class="ajax-block-container" aria-labelledby='pill-selected-item'>
2020-01-08 12:23:09 +00:00
{% if job.scheduled %}
2016-06-28 09:21:46 +01:00
<p>
Sending
2020-01-08 12:23:09 +00:00
<a href="{{ url_for('.view_template_version', service_id=current_service.id, template_id=job.template.id, version=job.template_version) }}">{{ job.template.name }}</a>
{{ job.scheduled_for|format_datetime_relative }}
</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>
{% else %}
{% if notifications %}
2017-03-22 10:55:15 +00:00
<div class="dashboard-table bottom-gutter-3-2">
{% endif %}
2018-03-06 10:24:01 +00:00
{% if template.template_type == 'letter' %}
<div class="keyline-block bottom-gutter-1-2">
{% endif %}
2020-01-08 16:23:43 +00:00
{% if job.still_processing %}
2020-01-08 12:23:09 +00:00
<p class="{% if job.template.template_type != 'letter' %}bottom-gutter{% endif %} hint">
Report is {{ "{:.0f}%".format(job.percentage_complete * 0.99) }} complete…
2017-07-13 09:57:15 +01:00
</p>
{% elif notifications %}
2020-01-08 12:23:09 +00:00
<p class="{% if job.template.template_type != 'letter' %}bottom-gutter{% endif %}">
2018-01-02 14:38:14 +00:00
<a href="{{ download_link }}" download class="heading-small">Download this report</a>
2017-07-13 09:57:15 +01:00
&emsp;
<span id="time-left">{{ time_left }}</span>
</p>
{% endif %}
2018-03-06 10:24:01 +00:00
{% if template.template_type == 'letter' %}
</div>
{% endif %}
{% call(item, row_number) list_table(
notifications,
caption=uploaded_file_name,
caption_visible=False,
2020-01-20 16:47:09 +00:00
empty_message='These messages have been deleted because they were sent more than {} days ago'.format(service_data_retention_days) if job.status == 'finished' else 'No messages to show yet…',
field_headings=[
'Recipient',
'Status'
],
field_headings_visible=False
) %}
{% call row_heading() %}
<a class="file-list-filename" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id, from_job=job.id) }}">{{ item.to }}</a>
<p class="file-list-hint">
{{ item.preview_of_content }}
</p>
{% endcall %}
{{ notification_status_field(item) }}
{% endcall %}
{% if more_than_one_page %}
<p class="table-show-more-link">
Only showing the first 50 rows
</p>
{% endif %}
{% if notifications %}
</div>
{% endif %}
{% endif %}
</div>