Move back link above main content for straightforward cases

This moves the back link to be above the `<main>` tag by making use of
the new `backLink` block. This doesn't change the pages which are using
a back link as part of the `page_header` macro yet.
This commit is contained in:
Katie Smith
2021-07-30 14:42:54 +01:00
parent 0b9f1053b3
commit 1860b2b690
16 changed files with 64 additions and 33 deletions

View File

@@ -8,9 +8,11 @@
New alert
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.broadcast_dashboard', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
{% call form_wrapper(class="govuk-!-margin-top-3") %}
{{ form.content(

View File

@@ -37,9 +37,11 @@
{% endif %}
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": back_link }) }}
{% endblock %}
{% block maincolumn_content %}
{% if broadcast_message.status == 'pending-approval' %}
{% if broadcast_message.created_by and broadcast_message.created_by == current_user

View File

@@ -9,9 +9,11 @@
Error
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": back_link }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="bottom-gutter-1-2">
{% call banner_wrapper(type='dangerous') %}

View File

@@ -9,9 +9,11 @@
Error
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": back_link }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="bottom-gutter-1-2">
{% call banner_wrapper(type='dangerous') %}

View File

@@ -7,12 +7,14 @@
Received text message
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for("main.inbox", service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="dashboard">
{{ govukBackLink({ "href": url_for("main.inbox", service_id=current_service.id) }) }}
<div class="bottom-gutter js-stick-at-top-when-scrolling">
<h1 class="heading-large govuk-!-margin-top-0">
{{ user_number }}

View File

@@ -7,14 +7,14 @@
Emergency alerts settings
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.service_settings', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-five-sixths">
{{ govukBackLink({
"text": "Back",
"href": url_for('.service_settings', service_id=current_service.id)
}) }}
{% call form_wrapper() %}
{{ form.channel(param_extensions={
'fieldset': {

View File

@@ -7,14 +7,14 @@
{{ title }}
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.service_settings', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-five-sixths">
{{ govukBackLink({
"text": "Back",
"href": url_for('.service_settings', service_id=current_service.id)
}) }}
{% call form_wrapper() %}
{{ form.enabled(param_extensions={
"fieldset": {

View File

@@ -7,9 +7,11 @@
{{ sender_context.title }}
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.view_template', service_id=current_service.id, template_id=template_id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row govuk-!-margin-top-3">
{% call form_wrapper() %}

View File

@@ -9,9 +9,11 @@
{{ page_title }}
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.view_template', service_id=current_service.id, template_id=template_id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row govuk-!-margin-top-3">
{% call form_wrapper() %}

View File

@@ -15,9 +15,12 @@
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
{% endblock %}
{% block maincolumn_content %}
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
<div class="govuk-grid-row">
<div class="govuk-grid-column-one-half">
{{ page_header(page_title) }}

View File

@@ -9,9 +9,11 @@
Error
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('main.upload_contact_list', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="bottom-gutter-1-2">
{% call banner_wrapper(type='dangerous') %}

View File

@@ -9,9 +9,11 @@
Error
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('main.upload_contact_list', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="bottom-gutter-1-2">
{% call banner_wrapper(type='dangerous') %}

View File

@@ -9,9 +9,11 @@
Error
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('main.upload_contact_list', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="bottom-gutter-1-2">
{% call banner_wrapper(type='dangerous') %}

View File

@@ -9,8 +9,11 @@
{{ original_filename }}
{% endblock %}
{% block maincolumn_content %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('main.upload_letter', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
{% if status == 'invalid' and message %}
{% include "partials/check/letter-validation-failed-banner.html" %}

View File

@@ -9,11 +9,14 @@
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-five-sixths">
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
{% call form_wrapper(class="govuk-!-margin-top-3") %}
{{ form.enabled(param_extensions={

View File

@@ -17,6 +17,10 @@
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
{% endblock %}
{% block maincolumn_content %}
{% set webauthn_button %}
@@ -41,8 +45,6 @@
}) }}
{% endset %}
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
<div class="govuk-grid-row">
{% if credentials %}
<div class="govuk-grid-column-five-sixths">