+ {% if current_user.platform_admin %}
+ All organisations
+ {% endif %}
- {% if current_user.platform_admin %}
- Organisations
-
- {% endif %}
{{ current_org.name }}
Switch service
diff --git a/app/templates/views/organisations/add-organisation.html b/app/templates/views/organisations/add-organisation.html
index 1f72072b6..8d2a28077 100644
--- a/app/templates/views/organisations/add-organisation.html
+++ b/app/templates/views/organisations/add-organisation.html
@@ -12,9 +12,7 @@
{% block fullwidth_content %}
diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html
index b3af8dbe0..523a17a08 100644
--- a/app/templates/withnav_template.html
+++ b/app/templates/withnav_template.html
@@ -10,8 +10,7 @@
{% if current_service.organisation_id %}
{% if current_user.platform_admin or
(current_user.belongs_to_organisation(current_service.organisation_id) and current_service.live) %}
- {{ current_service.organisation.name }}
-
+ {{ current_service.organisation.name }}
{% endif %}
{% endif %}
diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py
index 6b3b4b649..cee7165fd 100644
--- a/tests/app/main/views/test_dashboard.py
+++ b/tests/app/main/views/test_dashboard.py
@@ -1346,7 +1346,7 @@ def test_org_breadcrumbs_do_not_show_if_service_has_no_org(
):
page = client_request.get('main.service_dashboard', service_id=SERVICE_ONE_ID)
- assert not page.select('.navigation-breadcrumb')
+ assert not page.select('.navigation-organisation-link')
def test_org_breadcrumbs_do_not_show_if_user_is_not_an_org_member(
@@ -1369,7 +1369,7 @@ def test_org_breadcrumbs_do_not_show_if_user_is_not_an_org_member(
client_request.login(active_caseworking_user, service=service_one_json)
page = client_request.get('main.service_dashboard', service_id=SERVICE_ONE_ID, _follow_redirects=True)
- assert not page.select('.navigation-breadcrumb')
+ assert not page.select('.navigation-organisation-link')
def test_org_breadcrumbs_show_if_user_is_a_member_of_the_services_org(
@@ -1391,8 +1391,10 @@ def test_org_breadcrumbs_show_if_user_is_a_member_of_the_services_org(
mocker.patch('app.models.service.Organisation')
page = client_request.get('main.service_dashboard', service_id=SERVICE_ONE_ID)
-
- assert page.select('.navigation-breadcrumb')
+ assert page.select_one('.navigation-organisation-link')['href'] == url_for(
+ 'main.organisation_dashboard',
+ org_id=ORGANISATION_ID,
+ )
def test_org_breadcrumbs_do_not_show_if_user_is_a_member_of_the_services_org_but_service_is_in_trial_mode(
@@ -1435,4 +1437,7 @@ def test_org_breadcrumbs_show_if_user_is_platform_admin(
response = logged_in_platform_admin_client.get(url_for('main.service_dashboard', service_id=SERVICE_ONE_ID))
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
- assert page.select('.navigation-breadcrumb')
+ assert page.select_one('.navigation-organisation-link')['href'] == url_for(
+ 'main.organisation_dashboard',
+ org_id=ORGANISATION_ID,
+ )