mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-06 08:58:44 -04:00
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:
@@ -98,6 +98,7 @@ class HeaderNavigation(Navigation):
|
||||
'notifications_sent_by_service',
|
||||
'performance_platform_xlsx',
|
||||
'usage_for_all_services',
|
||||
'organisations',
|
||||
'platform_admin',
|
||||
'platform_admin_list_complaints',
|
||||
'platform_admin_reports',
|
||||
@@ -235,7 +236,6 @@ class HeaderNavigation(Navigation):
|
||||
'organisation_settings',
|
||||
'organisation_preview_email_branding',
|
||||
'organisation_preview_letter_branding',
|
||||
'organisations',
|
||||
'privacy',
|
||||
'public_agreement',
|
||||
'public_download_agreement',
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="govuk-width-container">
|
||||
<div class="navigation-service">
|
||||
{% if current_user.platform_admin %}
|
||||
<a href="{{ url_for('.organisations') }}" class="govuk-link govuk-link--no-visited-state navigation-organisation-link">All organisations</a>
|
||||
<a href="{{ url_for('.organisations') }}" class="govuk-link govuk-link--no-visited-state navigation-organisation-link">Organisations</a>
|
||||
{% endif %}
|
||||
<div class="navigation-service-name govuk-!-font-weight-bold">
|
||||
{{ current_org.name }}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
{{ page_header('Email branding') }}
|
||||
<h1 class="heading-medium">Email branding</h1>
|
||||
{{ live_search(target_selector='.email-brand', show=True, form=search_form) }}
|
||||
<nav>
|
||||
{% for brand in email_brandings %}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
Find services by name
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
Find users by email
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -20,15 +20,9 @@ Inbound Numbers
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<div class="govuk-grid-row bottom-gutter">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
<h1 class="heading-large">
|
||||
Inbound SMS
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h1 class="heading-medium">
|
||||
Inbound SMS
|
||||
</h1>
|
||||
|
||||
<table class="inbound">
|
||||
<col style="width:8%">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
{{ page_header('Letter branding') }}
|
||||
<h1 class="heading-medium">Letter branding</h1>
|
||||
{{ live_search(target_selector='.letter-brand', show=True, form=search_form) }}
|
||||
<nav>
|
||||
{% for brand in letter_brandings %}
|
||||
|
||||
@@ -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">
|
||||
|
||||
</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">
|
||||
|
||||
</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 %}
|
||||
|
||||
@@ -3,18 +3,25 @@
|
||||
{% from "components/checkbox.html" import checkbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{% block beforeContent %}
|
||||
<div class="navigation-service">
|
||||
<div class="navigation-service-name govuk-!-font-weight-bold">
|
||||
Platform admin
|
||||
</div>
|
||||
<a href="{{ url_for('main.choose_account') }}" class="govuk-link govuk-link--no-visited-state navigation-service-switch">Switch service</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-quarter">
|
||||
<p class="heading-medium">
|
||||
Platform admin
|
||||
</p>
|
||||
<nav class="navigation">
|
||||
{% for link_text, url in [
|
||||
('Summary', url_for('main.platform_admin')),
|
||||
('Live services', url_for('main.live_services')),
|
||||
('Trial mode services', url_for('main.trial_services')),
|
||||
('Organisations', url_for('main.organisations')),
|
||||
('Providers', url_for('main.view_providers')),
|
||||
('Reports', url_for('main.platform_admin_reports')),
|
||||
('Email branding', url_for('main.email_branding')),
|
||||
@@ -22,7 +29,7 @@
|
||||
('Inbound SMS numbers', url_for('main.inbound_sms_admin')),
|
||||
('Find services by name', url_for('main.find_services_by_name')),
|
||||
('Find users by email', url_for('main.find_users_by_email')),
|
||||
('Email Complaints', url_for('main.platform_admin_list_complaints')),
|
||||
('Email complaints', url_for('main.platform_admin_list_complaints')),
|
||||
('Returned letters', url_for('main.platform_admin_returned_letters')),
|
||||
('Clear cache', url_for('main.clear_cache')),
|
||||
] %}
|
||||
@@ -34,7 +41,8 @@
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</div>
|
||||
<div class="govuk-grid-column-three-quarters">
|
||||
<div class="govuk-grid-column-three-quarters column-main">
|
||||
{% include 'flash_messages.html' %}
|
||||
{% block platform_admin_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Clear Cache
|
||||
Clear cache
|
||||
{% endblock %}
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
Clear Cache
|
||||
<h1 class="heading-medium">
|
||||
Clear cache
|
||||
</h1>
|
||||
|
||||
{% call form_wrapper() %}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
Email complaints
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
Summary
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
Reports
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "views/platform-admin/_base_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/page-footer.html" import sticky_page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% block per_page_title %}
|
||||
@@ -9,14 +9,10 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
<h1 class="heading-large">Submit returned letters</h1>
|
||||
{% call form_wrapper() %}
|
||||
{{ textbox(form.references, width='1-1', rows=8, autosize=True) }}
|
||||
{{ page_footer("Submit") }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="heading-medium">Submit returned letters</h1>
|
||||
{% call form_wrapper() %}
|
||||
{{ textbox(form.references, width='1-1', rows=8, autosize=True) }}
|
||||
{{ sticky_page_footer("Submit") }}
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
{{ page_title|capitalize }}
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">
|
||||
<h1 class="heading-medium">
|
||||
Summary
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Providers
|
||||
|
||||
{% block platform_admin_content %}
|
||||
|
||||
<h1 class="heading-large">Providers</h1>
|
||||
<h1 class="heading-medium">Providers</h1>
|
||||
|
||||
<h2 class="heading-medium">SMS</h2>
|
||||
|
||||
@@ -70,7 +70,7 @@ Providers
|
||||
|
||||
{% endcall %}
|
||||
|
||||
<h1 class="heading-large">International SMS Providers</h1>
|
||||
<h1 class="heading-medium">International SMS Providers</h1>
|
||||
|
||||
{% call(item, row_number) list_table(
|
||||
intl_sms_providers,
|
||||
|
||||
@@ -39,7 +39,7 @@ def test_organisation_page_shows_all_organisations(
|
||||
|
||||
assert normalize_spaces(
|
||||
page.select_one('h1').text
|
||||
) == "All organisations"
|
||||
) == "Organisations"
|
||||
|
||||
expected_hints = ('0 live services', '1 live service', '2 live services')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user