2016-03-16 16:57:10 +00:00
|
|
|
|
{% extends "withnav_template.html" %}
|
2016-04-12 15:05:27 +01:00
|
|
|
|
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading %}
|
2016-03-16 16:57:10 +00:00
|
|
|
|
{% from "components/previous-next-navigation.html" import previous_next_navigation %}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
|
|
|
|
{% from "components/pill.html" import pill %}
|
2016-03-16 16:57:10 +00:00
|
|
|
|
|
|
|
|
|
|
{% block page_title %}
|
2016-04-07 15:16:11 +01:00
|
|
|
|
Activity – GOV.UK Notify
|
2016-03-16 16:57:10 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
|
|
|
2016-04-13 12:50:28 +01:00
|
|
|
|
<h1 class="heading-large">
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- if (request_args.get('template_type', 'email,sms') == 'email,sms') and (request_args.get('status', 'delivered,failed') == 'delivered,failed') -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
|
|
|
|
|
|
Activity
|
|
|
|
|
|
|
|
|
|
|
|
{%- else -%}
|
|
|
|
|
|
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- if request_args.get('status') != 'delivered,failed' -%}
|
|
|
|
|
|
{%- for label, option, _ in status_filters -%}
|
|
|
|
|
|
{%- if request_args.get('status', 'delivered,failed') == option -%}{{label}} {% endif -%}
|
|
|
|
|
|
{%- endfor -%}
|
|
|
|
|
|
{%- endif -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- if request_args.get('template_type', 'email,sms') == 'email,sms' %} emails and text messages
|
|
|
|
|
|
{%- else -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- for template_label, template_option, _ in type_filters -%}
|
|
|
|
|
|
{%- if request_args.get('template_type') == template_option -%}
|
|
|
|
|
|
{%- if request_args.get('status', 'delivered,failed') == 'delivered,failed' -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
{{ template_label }}
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- else -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
{{ template_label | lower }}
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
{%- endfor -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
|
2016-04-29 15:24:48 +01:00
|
|
|
|
{%- endif -%}
|
2016-04-13 12:50:28 +01:00
|
|
|
|
|
|
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
|
|
|
|
</h1>
|
2016-04-28 15:50:05 +01:00
|
|
|
|
|
2016-04-13 12:50:28 +01:00
|
|
|
|
<div class='grid-row bottom-gutter'>
|
|
|
|
|
|
<div class='column-half'>
|
|
|
|
|
|
{{ pill(
|
2016-04-15 14:05:00 +01:00
|
|
|
|
'Status',
|
|
|
|
|
|
status_filters,
|
|
|
|
|
|
request_args.get('status', '')
|
2016-04-13 12:50:28 +01:00
|
|
|
|
) }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class='column-half'>
|
|
|
|
|
|
{{ pill(
|
2016-04-15 14:05:00 +01:00
|
|
|
|
'Type',
|
|
|
|
|
|
type_filters,
|
|
|
|
|
|
request_args.get('template_type', '')
|
2016-04-13 12:50:28 +01:00
|
|
|
|
) }}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2016-04-12 09:55:51 +01:00
|
|
|
|
|
2016-04-13 14:18:56 +01:00
|
|
|
|
{% if notifications %}
|
2016-05-03 08:57:19 +01:00
|
|
|
|
<p class="bottom-gutter">
|
|
|
|
|
|
<a href="{{ request.url }}&download=csv" download class="heading-small">Download as a CSV file</a>
|
2016-04-29 15:30:44 +01:00
|
|
|
|
 
|
|
|
|
|
|
Delivery information is available for 7 days
|
2016-04-13 14:18:56 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
2016-04-12 15:05:27 +01:00
|
|
|
|
{% call(item, row_number) list_table(
|
|
|
|
|
|
notifications,
|
|
|
|
|
|
caption="Recent activity",
|
|
|
|
|
|
caption_visible=False,
|
|
|
|
|
|
empty_message='No messages found',
|
|
|
|
|
|
field_headings=['Recipient', 'Status', 'Started'],
|
|
|
|
|
|
field_headings_visible=False
|
|
|
|
|
|
) %}
|
|
|
|
|
|
|
|
|
|
|
|
{% call field() %}
|
|
|
|
|
|
<p>
|
2016-03-16 16:57:10 +00:00
|
|
|
|
{{ item.to }}
|
2016-04-12 15:05:27 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
<p class="hint">
|
2016-04-12 09:55:51 +01:00
|
|
|
|
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template.id) }}">{{ item.template.name }}</a>
|
2016-04-12 15:05:27 +01:00
|
|
|
|
sent from
|
2016-03-16 16:57:10 +00:00
|
|
|
|
{% if item.job %}
|
2016-04-04 16:53:52 +01:00
|
|
|
|
<a href="{{ url_for(".view_job", service_id=current_service.id, job_id=item.job.id) }}">{{ item.job.original_file_name }}</a>
|
2016-04-12 15:05:27 +01:00
|
|
|
|
{% else %}
|
|
|
|
|
|
an API call
|
2016-03-16 16:57:10 +00:00
|
|
|
|
{% endif %}
|
2016-04-12 15:05:27 +01:00
|
|
|
|
</p>
|
2016-03-16 16:57:10 +00:00
|
|
|
|
{% endcall %}
|
2016-04-12 14:19:51 +01:00
|
|
|
|
|
2016-04-14 11:37:30 +01:00
|
|
|
|
{{ text_field(item.status|capitalize) }}
|
2016-04-12 15:05:27 +01:00
|
|
|
|
|
|
|
|
|
|
{% call field(align='right') %}
|
2016-04-14 13:35:56 +01:00
|
|
|
|
{{ item.created_at|format_datetime_short }}
|
2016-04-12 15:05:27 +01:00
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% endcall %}
|
2016-04-13 14:18:56 +01:00
|
|
|
|
|
2016-04-12 15:05:27 +01:00
|
|
|
|
{{ previous_next_navigation(prev_page, next_page) }}
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|