mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 05:30:21 -04:00
This commit changes the tables of notifications from 3 columns to two columns. This is so the text has more room, so it doesn’t start overlapping. It also makes sure that if the recipient gets really long that it will be cut off with an ellipsis, rather than overlapping… I hypothesize that if a notification fails you probably don’t care when it failed, just that it failed.
95 lines
2.9 KiB
HTML
95 lines
2.9 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading, row_heading, notification_status_field %}
|
||
{% from "components/previous-next-navigation.html" import previous_next_navigation %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/pill.html" import pill %}
|
||
{% from "components/message-count-label.html" import message_count_label, recipient_count_label %}
|
||
|
||
{% block page_title %}
|
||
{{ message_count_label(99, message_type, suffix='') | capitalize }} – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<h1 class="heading-large">
|
||
|
||
<span class="visually-hidden">
|
||
{%- if status != 'delivered,failed' -%}
|
||
{%- for label, option, _, _ in status_filters -%}
|
||
{%- if status == option -%}{{label}} {% endif -%}
|
||
{%- endfor -%}
|
||
{%- endif -%}
|
||
</span>
|
||
|
||
{{- message_count_label(99, message_type, suffix='') | capitalize }}
|
||
|
||
</h1>
|
||
|
||
<div class='bottom-gutter'>
|
||
{{ pill(
|
||
'Status',
|
||
status_filters,
|
||
status
|
||
) }}
|
||
</div>
|
||
|
||
{% if notifications %}
|
||
<p class="bottom-gutter">
|
||
<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>
|
||
 
|
||
Data available for 7 days
|
||
</p>
|
||
{% endif %}
|
||
|
||
|
||
{% if notifications %}
|
||
<div class='dashboard-table'>
|
||
{% endif %}
|
||
{% call(item, row_number) list_table(
|
||
notifications,
|
||
caption="Recent activity",
|
||
caption_visible=False,
|
||
empty_message='No messages found',
|
||
field_headings=['Recipient', 'Status'],
|
||
field_headings_visible=False
|
||
) %}
|
||
|
||
{% call row_heading() %}
|
||
<p>
|
||
{{ item.to }}
|
||
</p>
|
||
<p class="hint">
|
||
{% if item.job %}
|
||
From <a href="{{ url_for(".view_job", service_id=current_service.id, job_id=item.job.id) }}">{{ item.job.original_file_name }}</a>
|
||
{% else %}
|
||
<a href="{{ url_for('.view_template_version', service_id=current_service.id, template_id=item.template.id, version=item.template_version) }}">{{ item.template.name }}</a>
|
||
from an API call
|
||
{% endif %}
|
||
</p>
|
||
{% endcall %}
|
||
|
||
{% call field(
|
||
align='right',
|
||
status=item.status|format_notification_status_as_field_status
|
||
) %}
|
||
{% if item.status|format_notification_status_as_url %}
|
||
<a href="{{ item.status|format_notification_status_as_url }}">
|
||
{% endif %}
|
||
{{ item.status|format_notification_status_with_time(
|
||
item.template.template_type,
|
||
(item.updated_at or item.created_at)|format_datetime_short
|
||
) }}
|
||
{% if item.status|format_notification_status_as_url %}
|
||
</a>
|
||
{% endif %}
|
||
{% endcall %}
|
||
|
||
{% endcall %}
|
||
{% if notifications %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
{{ previous_next_navigation(prev_page, next_page) }}
|
||
|
||
{% endblock %}
|