Files
notifications-admin/app/templates/main_nav.html
Chris Hill-Scott a35931a33a Swap order of usage and team members for org users
Org users, when looking at the page for their org, see:
> Usage
> Team members

When they click into a service it switches to:
> Team members
> Usage

This is jarring. It should stay consistent. I think it that _Usage_ then
_Team members_ is the natural way of ordering the navigation at the
organisation level, so let’s follow that through to the service level.

This does mean that if someone is a member of both an organisation and a
service that the nav will jump (because it’ll switch to the existing,
service-level order of _Team members_ then _Usage_) but it’s going to
jump anyway because you get all the extra navigation items when you’re a
member of a service.
2020-02-03 11:39:58 +00:00

38 lines
2.5 KiB
HTML

{% if help %}
{% include 'partials/tour.html' %}
{% else %}
<nav class="navigation">
<ul>
{% if current_user.has_permissions() %}
{% if current_user.has_permissions('view_activity') %}
<li><a href="{{ url_for('.service_dashboard', service_id=current_service.id) }}" {{ main_navigation.is_selected('dashboard') }}>Dashboard</a></li>
{% endif %}
<li><a href="{{ url_for('.choose_template', service_id=current_service.id) }}" {{ main_navigation.is_selected('templates') }}>Templates</a></li>
{% if current_user.has_permissions('view_activity') %}
{% if current_service.can_upload_letters %}
<li><a href="{{ url_for('main.uploads', service_id=current_service.id) }}" {{ main_navigation.is_selected('uploads') }}>Uploads</a></li>
{% endif %}
{% else %}
<li><a href="{{ url_for('.view_notifications', service_id=current_service.id, status='sending,delivered,failed') }}" {{ casework_navigation.is_selected('sent-messages') }}>Sent messages</a></li>
{% if current_service.has_jobs or current_service.can_upload_letters %}
<li><a href="{{ url_for('main.uploads', service_id=current_service.id) }}" {{ casework_navigation.is_selected('uploads') }}>Uploads</a></li>
{% endif %}
{% endif %}
<li><a href="{{ url_for('.manage_users', service_id=current_service.id) }}" {{ main_navigation.is_selected('team-members') }}>Team members</a></li>
{% if current_user.has_permissions('manage_service', allow_org_user=True) %}
<li><a href="{{ url_for('.usage', service_id=current_service.id) }}" {{ main_navigation.is_selected('usage') }}>Usage</a></li>
{% endif %}
{% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
<li><a href="{{ url_for('.service_settings', service_id=current_service.id) }}" {{ main_navigation.is_selected('settings') }}>Settings</a></li>
{% endif %}
{% if current_user.has_permissions('manage_api_keys') %}
<li><a href="{{ url_for('.api_integration', service_id=current_service.id) }}" {{ main_navigation.is_selected('api-integration') }}>API integration</a></li>
{% endif %}
{% elif current_user.has_permissions(allow_org_user=True) %}
<li><a href="{{ url_for('.usage', service_id=current_service.id) }}" {{ main_navigation.is_selected('usage') }}>Usage</a></li>
<li><a href="{{ url_for('.manage_users', service_id=current_service.id) }}" {{ main_navigation.is_selected('team-members') }}>Team members</a></li>
{% endif %}
</ul>
</nav>
{% endif %}