+
+ {% call card({
+ classes: "app-filters",
+ feature: true,
+ heading: __("download.search.label"),
+ headingLevel: 3
+ }) %}
+ {{ radios({
+ classes: "nhsuk-radios--small",
+ fieldset: {
+ legend: {
+ classes: "nhsuk-fieldset__legend--s",
+ text: __("download.type.label")
+ }
+ },
+ items: radioFilterItems(DownloadType),
+ decorate: "type"
+ }) }}
+
+ {{ appButtonGroup({
+ buttons: [{
+ classes: "nhsuk-button--secondary nhsuk-button--small",
+ text: __("search.confirm"),
+ attributes: {
+ formaction: params.formaction,
+ formmethod: "post",
+ role: "search"
+ }
+ }, {
+ classes: "nhsuk-button--secondary nhsuk-button--small",
+ text: __("search.clear"),
+ href: "/downloads"
+ } if data.type]
+ }) }}
+ {% endcall %}
+
+
+
+ {% if data.type and data.type != "none" %}
+ {% set title = data.type | replace("records", "record exports") %}
+ {% else %}
+ {% set title = "All exports" %}
+ {% endif %}
+
+ {{ appHeading({
+ level: 3,
+ size: "m",
+ title: title,
+ summary: __mf("download.results", {
+ from: results.from,
+ to: results.to,
+ count: results.count
+ }) | safe
+ }) }}
+
+ {% for download in results.page %}
+ {{ summaryList({
+ card: {
+ classes: "app-card--compact",
+ heading: download.name,
+ headingSize: "s",
+ headingLevel: 4,
+ href: download.uri + "/download" if download.status == DownloadStatus.Ready,
+ clickable: true if download.status == DownloadStatus.Ready
+ },
+ rows: summaryRows(download, {
+ createdAt: {},
+ createdBy: {},
+ type: {},
+ status: {}
+ })
+ }) }}
+ {% endfor %}
+
+ {{ pagination(pages) }}
+
+
+{% endblock %}
diff --git a/app/views/interchange/_navigation.njk b/app/views/interchange/_navigation.njk
new file mode 100644
index 000000000..adf7575c8
--- /dev/null
+++ b/app/views/interchange/_navigation.njk
@@ -0,0 +1,27 @@
+{% from "_macros/heading.njk" import appHeading %}
+{% from "_macros/secondary-navigation.njk" import appSecondaryNavigation %}
+
+{% macro interchangeNavigation(params) %}
+ {{ appHeading({
+ title: __("interchange.list.title")
+ }) }}
+
+ {{ appSecondaryNavigation({
+ items: [
+ {
+ text: __("upload.list.label"),
+ href: "/uploads",
+ current: params.view == "uploads"
+ },
+ {
+ text: __("download.list.label"),
+ href: "/downloads",
+ current: params.view == "downloads"
+ }
+ ]
+ }) }}
+
+