Tidy up the platform admin pages

This commit does two things:
- brings the ‘All organisations’ page back within the platform admin
  part of the site (because it’s hard to find otherwise)
- makes the layouts of all the pages within platform admin a bit closer
  to the service-specific pages in terms of heading sizes, spacing, etc
  so that moving between them doesn’t feel so jumpy
This commit is contained in:
Chris Hill-Scott
2020-04-23 11:08:43 +01:00
parent f91aba212d
commit ae8dd8e8cd
18 changed files with 68 additions and 95 deletions

View File

@@ -1,66 +1,41 @@
{% extends "withoutnav_template.html" %}
{% extends "views/platform-admin/_base_template.html" %}
{% from "components/live-search.html" import live_search %}
{% from "components/button/macro.njk" import govukButton %}
{% block per_page_title %}
All organisations
Organisations
{% endblock %}
{% block beforeContent %}{% endblock %}
{% block platform_admin_content %}
{% block maincolumn_content %}
<h1 class="heading-medium">Organisations</h1>
<div class="navigation-service">
<div class="navigation-service-name govuk-!-font-weight-bold">
&nbsp;
</div>
<a href="{{ url_for('main.choose_account') }}" class="govuk-link govuk-link--no-visited-state navigation-service-switch">Switch service</a>
</div>
{{ live_search(target_selector='.browse-list-item', show=True, form=search_form, label='Search by name') }}
<div class="govuk-grid-row top-gutter-2-3">
<div class="govuk-grid-column-one-quarter">
<h1>
All organisations
</h1>
</div>
<div class="govuk-grid-column-three-quarters">
<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="govuk-link govuk-link--no-visited-state">{{ 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>
{{ 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="govuk-link govuk-link--no-visited-state">{{ 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="govuk-grid-row">
<div class="govuk-grid-column-one-quarter">
&nbsp;
</div>
<div class="govuk-grid-column-three-quarters">
{{ govukButton({
"element": "a",
"text": "New organisation",
"href": url_for('main.add_organisation'),
"classes": "govuk-button--secondary"
}) }}
</div>
</div>
</div>
<div class="js-stick-at-bottom-when-scrolling">
{{ govukButton({
"element": "a",
"text": "New organisation",
"href": url_for('main.add_organisation'),
"classes": "govuk-button--secondary"
}) }}
</div>
{% endblock %}