Show organisation breadcrumbs

Added a breadcrumb link to a service's organisation to the
withnav_template. This will only show if a service has an organisation
and the current user is also a member of that org, or the current user
is a platform admin user.

Also removed a couple of unused fixtures from the client_request
fixture.
This commit is contained in:
Katie Smith
2019-06-20 09:53:21 +01:00
parent e3e461f340
commit 5f2c869a1c
3 changed files with 85 additions and 2 deletions

View File

@@ -8,6 +8,12 @@
<div id="content">
<div class="navigation-service">
<div class="navigation-service-name">
{% if current_service.organisation_id %}
{% if current_user.platform_admin or current_user.belongs_to_organisation(current_service.organisation_id) %}
<a href="{{ url_for('.organisation_dashboard', org_id=current_service.organisation.id) }}">{{ current_service.organisation.name }}</a>
<span class="navigation-breadcrumb"></span>
{% endif %}
{% endif %}
{{ current_service.name }}
</div>
<a href="{{ url_for('main.choose_account') }}" class="navigation-service-switch">Switch service</a>