Files
notifications-admin/app/templates/views/returned-letter-summary.html
Katie Smith 0f0b8b8ae4 Move back link outside of main where it was used in the page header
The page_header macro includes an optional back link. Since the
page_header is always used inside `<main>`, where the back link should
not be, this stops setting the back link in the page header and instead
sets it in the new `backLink` block.
2021-08-03 11:28:15 +01:00

47 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "withnav_template.html" %}
{% from "components/table.html" import list_table, row_heading %}
{% from "components/page-header.html" import page_header %}
{% from "components/back-link/macro.njk" import govukBackLink %}
{% block service_page_title %}
Returned letters
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('main.service_dashboard', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-five-sixths">
{{ page_header('Returned letters') }}
<p class="govuk-body">
Reports are published once a month.
</p>
<p class="govuk-body">
Youll only get a report if one or more of your letters is returned.
</p>
</div>
</div>
<div class="dashboard-table">
{% call(item, row_number) list_table(
data,
caption="Returned letters report",
caption_visible=False,
empty_message='If you have returned letter reports they will be listed here',
field_headings=['Report'],
field_headings_visible=False
) %}
{% call row_heading() %}
<a class="govuk-link govuk-link--no-visited-state file-list-filename"
href="{{url_for('.returned_letters', service_id=current_service.id, reported_at=item.reported_at)}}">{{ item.reported_at | format_date_normal }}</a>
<p class="file-list-hint">
{{ item.returned_letter_count}} {{ item.returned_letter_count|message_count_label('letter', suffix='')}}
</p>
{% endcall %}
{% endcall %}
</div>
{% endblock %}