mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-07 11:53:52 -05:00
Update content area blocks in descendent pages
GOV.UK Frontend's template wraps all content in a `<main>` tag and puts it in the main column. Some of Notify's pages need to reach out of the main column (product page). Some have several blocks of navigation before the main content area. This adjusts the blocks in all the templates where this is the case so those conditions can be met.
This commit is contained in:
@@ -121,10 +121,6 @@
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block fullwidth_content %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% set meta_items = [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block fullwidth_content %}
|
||||
<main role="main">
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
{% block main %}
|
||||
{% block beforeContent %}{% endblock %}
|
||||
<main class="govuk-main-wrapper {{ mainClasses }}" id="main-content" role="main">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
{% block org_page_title %}{% endblock %} – {{ current_org.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block fullwidth_content %}
|
||||
<div id="content">
|
||||
{% block main %}
|
||||
<div class="govuk-width-container">
|
||||
<div class="navigation-service">
|
||||
{% if current_user.platform_admin %}
|
||||
<a href="{{ url_for('.organisations') }}" class="navigation-organisation-link">All organisations</a>
|
||||
@@ -19,10 +19,15 @@
|
||||
<div class="column-one-quarter">
|
||||
{% include "org_nav.html" %}
|
||||
</div>
|
||||
<main role="main" class="column-three-quarters column-main">
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
</main>
|
||||
<div class="column-three-quarters">
|
||||
{% block beforeContent %}{% endblock %}
|
||||
<main class="govuk-main-wrapper column-main" id="main-content" role="main" >
|
||||
{% block content %}
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -9,29 +9,32 @@
|
||||
New organisation
|
||||
{% endblock %}
|
||||
|
||||
{% block fullwidth_content %}
|
||||
<div id="content">
|
||||
{% block main %}
|
||||
<div class="govuk-width-container">
|
||||
<div class="navigation-service">
|
||||
<a href="{{ url_for('.organisations') }}" class="navigation-service-back-to">All organisations</a>
|
||||
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
|
||||
</div>
|
||||
|
||||
<main role="main">
|
||||
<div class="grid-row">
|
||||
<div class="column-one-quarter">
|
||||
|
||||
</div>
|
||||
<div class="column-three-quarters">
|
||||
{{ page_header('New organisation') }}
|
||||
{% call form_wrapper() %}
|
||||
{{textbox(form.name)}}
|
||||
{{radios(form.organisation_type)}}
|
||||
{{radios(form.crown_status)}}
|
||||
{{ page_footer('Save') }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
<div class="grid-row">
|
||||
<div class="column-one-quarter">
|
||||
|
||||
</div>
|
||||
</main>
|
||||
<div class="column-three-quarters">
|
||||
<main class="govuk-main-wrapper column-main govuk-!-padding-top-0 govuk-!-padding-bottom-0" id="main-content" role="main" >
|
||||
{% block beforeContent %}{% endblock %}
|
||||
{% block content %}
|
||||
{{ page_header('New organisation') }}
|
||||
{% call form_wrapper() %}
|
||||
{{textbox(form.name)}}
|
||||
{{radios(form.organisation_type)}}
|
||||
{{radios(form.crown_status)}}
|
||||
{{ page_footer('Save') }}
|
||||
{% endcall %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
All organisations
|
||||
{% endblock %}
|
||||
|
||||
{% block fullwidth_content %}
|
||||
{% block beforeContent %}{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div id="content">
|
||||
<div class="navigation-service">
|
||||
<div class="navigation-service-name">
|
||||
|
||||
@@ -17,47 +18,45 @@
|
||||
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>
|
||||
</div>
|
||||
|
||||
<main role="main">
|
||||
<div class="grid-row top-gutter-2-3">
|
||||
<div class="grid-row top-gutter-2-3">
|
||||
<div class="column-one-quarter">
|
||||
<h1>
|
||||
All organisations
|
||||
</h1>
|
||||
</div>
|
||||
<div class="column-three-quarters">
|
||||
|
||||
{{ live_search(target_selector='.browse-list-item', show=True, form=search_form, label='Search by name') }}
|
||||
|
||||
<nav class="browse-list">
|
||||
<ul>
|
||||
{% for org in organisations %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ url_for('main.organisation_dashboard', org_id=org.id) }}" class="browse-list-link">{{ org.name }}</a>
|
||||
<p class="browse-list-hint">
|
||||
{{ org.count_of_live_services }}
|
||||
live service{% if org.count_of_live_services != 1 %}s{% endif %}
|
||||
</p>
|
||||
{% if not org.active %}
|
||||
<span class="table-field-status-default heading-medium">- archived</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
<div class="grid-row">
|
||||
<div class="column-one-quarter">
|
||||
<h1>
|
||||
All organisations
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
<div class="column-three-quarters">
|
||||
|
||||
{{ live_search(target_selector='.browse-list-item', show=True, form=search_form, label='Search by name') }}
|
||||
|
||||
<nav class="browse-list">
|
||||
<ul>
|
||||
{% for org in organisations %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ url_for('main.organisation_dashboard', org_id=org.id) }}" class="browse-list-link">{{ org.name }}</a>
|
||||
<p class="browse-list-hint">
|
||||
{{ org.count_of_live_services }}
|
||||
live service{% if org.count_of_live_services != 1 %}s{% endif %}
|
||||
</p>
|
||||
{% if not org.active %}
|
||||
<span class="table-field-status-default heading-medium">- archived</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<a href="{{ url_for('main.add_organisation') }}" class="button-secondary">New organisation</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
<div class="grid-row">
|
||||
<div class="column-one-quarter">
|
||||
|
||||
</div>
|
||||
<div class="column-three-quarters">
|
||||
<a href="{{ url_for('main.add_organisation') }}" class="button-secondary">New organisation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{% block content %}
|
||||
|
||||
<div class="product-page-intro">
|
||||
<div class="product-page-intro-wrapper override-elements-content" id="content">
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
{% block service_page_title %}{% endblock %} – {{ current_service.name }}
|
||||
{% endblock %}
|
||||
|
||||
{% block fullwidth_content %}
|
||||
<div id="content">
|
||||
{% block main %}
|
||||
<div class="govuk-width-container">
|
||||
<div class="navigation-service">
|
||||
{% if current_service.organisation_id %}
|
||||
{% if current_user.platform_admin or
|
||||
@@ -27,13 +27,18 @@
|
||||
{% include "main_nav.html" %}
|
||||
</div>
|
||||
{% if help %}
|
||||
<main role="main" class="column-two-thirds column-main">
|
||||
<div class="column-two-thirds column-main">
|
||||
{% else %}
|
||||
<main role="main" class="column-three-quarters column-main">
|
||||
<div class="column-three-quarters column-main">
|
||||
{% endif %}
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
</main>
|
||||
{% block beforeContent %}{% endblock %}
|
||||
<main class="govuk-main-wrapper column-main {{ mainClasses }}" id="main-content" role="main">
|
||||
{% block content %}
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block fullwidth_content %}
|
||||
<div id="content">
|
||||
{% block beforeContent %}
|
||||
{% if current_service and current_service.active and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %}
|
||||
<div class="navigation-service">
|
||||
<a href="{{ url_for('main.show_accounts_or_dashboard') }}" class="navigation-service-back-to">Back to {{ current_service.name }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<main role="main">
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user