{% extends "withnav_template.html" %} {% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading %} {% from "components/previous-next-navigation.html" import previous_next_navigation %} {% from "components/page-footer.html" import page_footer %} {% from "components/pill.html" import pill %} {% block page_title %} Activity – GOV.UK Notify {% endblock %} {% block maincolumn_content %}

{%- if (request_args.get('template_type', '') == '') and (request_args.get('status', 'delivered,failed') == 'delivered,failed') -%} Activity {%- else -%} {% if request_args.get('status') != 'delivered,failed' %} {% for label, option, _ in status_filters %} {% if request_args.get('status') == option %} {{ label }} {% endif %} {% endfor %} {% endif %} {% if request_args.get('template_type') == '' %} emails and text messages {% else %} {% 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' %} {{ template_label }} {% else %} {{ template_label | lower }} {% endif %} {% endif %} {% endfor %} {% endif %} {%- endif -%}

{{ pill( 'Status', status_filters, request_args.get('status', '') ) }}
{{ pill( 'Type', type_filters, request_args.get('template_type', '') ) }}
{% if notifications %}

Download as a CSV file

{% endif %} {% 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() %}

{{ item.to }}

{{ item.template.name }} sent from {% if item.job %} {{ item.job.original_file_name }} {% else %} an API call {% endif %}

{% endcall %} {{ text_field(item.status|capitalize) }} {% call field(align='right') %} {{ item.created_at|format_datetime_short }} {% endcall %} {% endcall %} {{ previous_next_navigation(prev_page, next_page) }} {% endblock %}