mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 01:49:15 -04:00
It’s useful to get some kind of preview of the report before you download it. And if there’s only a few letters in there then you might not even need to download it at all. For teams with lots of letters we don’t want the page to load too slowly so let’s cap the number of displayed items to 50, same as previewing a spreadsheet.
58 lines
2.0 KiB
HTML
58 lines
2.0 KiB
HTML
{% from "components/table.html" import list_table, field %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
{% extends "withnav_template.html" %}
|
|
|
|
{% block service_page_title %}
|
|
Returned letters for {{ reported_at|format_date_normal }}
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
{{ page_header(
|
|
'Returned letters for {}'.format(reported_at|format_date_normal),
|
|
back_link=url_for('main.returned_letter_summary', service_id=current_service.id)
|
|
) }}
|
|
|
|
<p class="bottom-gutter">
|
|
<a download href="{{ url_for('.returned_letters_report', service_id=current_service.id, reported_at=reported_at) }}" class="heading-small">Download this report</a>
|
|
</p>
|
|
|
|
<div class="dashboard-table">
|
|
{% call(item, row_number) list_table(
|
|
returned_letters,
|
|
caption="Returned letters for {}".format(today),
|
|
caption_visible=False,
|
|
empty_message='If you have returned letter reports they will be listed here',
|
|
field_headings=['Template name', 'Originally sent'],
|
|
field_headings_visible=False
|
|
) %}
|
|
{% call field() %}
|
|
<span class="file-list-filename file-list-filename-unlinked">{{ item.template_name or item.uploaded_letter_file_name }}</span>
|
|
<span class="file-list-hint">
|
|
{% if item.client_reference %}
|
|
Reference {{ item.client_reference }}
|
|
{% elif item.original_file_name %}
|
|
Sent from {{ item.original_file_name }}
|
|
{% else %}
|
|
No reference provided
|
|
{% endif %}
|
|
</span>
|
|
{% endcall %}
|
|
{% call field(align='right') %}
|
|
<span class="align-with-message-body">
|
|
<span class="status-hint">
|
|
Originally sent {{ item.created_at|format_date_normal }}
|
|
</span>
|
|
</span>
|
|
{% endcall %}
|
|
{% endcall %}
|
|
{% if more_than_one_page %}
|
|
<p class="table-show-more-link">
|
|
Only showing the first {{ page_size }} of {{ count_of_returned_letters }} rows
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% endblock %}
|