Merge pull request #3437 from alphagov/group-uploaded-letters

Group uploaded letters by printing date
This commit is contained in:
Chris Hill-Scott
2020-05-19 09:49:04 +01:00
committed by GitHub
15 changed files with 524 additions and 55 deletions

View File

@@ -19,7 +19,7 @@
{% if item.status in ('pending-virus-check', 'virus-scan-failed') %}
<span class="file-list-filename loading-indicator">Checking</span>
{% else %}
<a class="govuk-link govuk-link--no-visited-state file-list-filename" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id) }}">{{ item.to.splitlines()[0].lstrip().rstrip(' ,') if item.to else '' }}</a>
<a class="govuk-link govuk-link--no-visited-state file-list-filename" href="{{ single_notification_url(notification_id=item.id) }}">{{ item.to.splitlines()[0].lstrip().rstrip(' ,') if item.to else '' }}</a>
{% endif %}
<p class="file-list-hint">
{{ item.preview_of_content }}

View File

@@ -18,7 +18,9 @@
) %}
{% call row_heading() %}
<div class="file-list">
{% if item.upload_type == 'letter' %}
{% if item.upload_type == 'letter_day' %}
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.uploaded_letters', service_id=current_service.id, letter_print_day=item.created_at|format_date_numeric) }}">{{ item.original_file_name }}</a>
{% elif item.upload_type == 'letter' %}
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.view_notification', service_id=current_service.id, notification_id=item.id) }}">{{ item.original_file_name }}</a>
{% elif item.upload_type == 'contact_list' %}
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.contact_list', service_id=current_service.id, contact_list_id=item.id) }}">{{ item.original_file_name }}</a>
@@ -37,6 +39,10 @@
item.created_at|format_datetime_relative
}}
</span>
{% elif item.upload_type == 'letter_day' %}
<span class="file-list-hint-large">
{{ item.letter_printing_statement }}
</span>
{% else %}
<span class="file-list-hint-large">
Sent {{

View File

@@ -0,0 +1,37 @@
{% extends "withnav_template.html" %}
{% from 'components/big-number.html' import big_number %}
{% from 'components/message-count-label.html' import message_count_label %}
{% from "components/page-header.html" import page_header %}
{% block service_page_title %}
Uploaded letters
{% endblock %}
{% block maincolumn_content %}
{{ page_header(
'Uploaded letters',
back_link=url_for('main.uploads', service_id=current_service.id)
) }}
{% if notifications %}
<p class='govuk-body'>
{{ total|format_thousands}} {{ message_count_label(total, 'letter', suffix='') }}
</p>
<p class='govuk-body'>
{{ letter_printing_statement }}
</p>
{% else %}
<p class='table-empty-message'>
No letters printing {{ letter_print_day }}
</p>
{% endif %}
{% include 'views/activity/notifications.html' %}
{% endblock %}