Files
notifications-admin/app/templates/service_navigation.html
Chris Hill-Scott bd19806ebf Remove ‘(all networks)’ from settings label
I don’t think we need to say (all networks) in the header. The real
benefit of this change is forcing the platform admin person making the
change to explicitly give their choice of network.

And by not putting it in the label we don’t have future users from other
organisations wondering if there’s some option other than ‘all networks’
they need to think about.
2021-06-01 17:55:17 +01:00

43 lines
1.9 KiB
HTML

{% macro navigation_service_name(service) %}
<div class="navigation-service-name govuk-!-font-weight-bold">
{{ service.name }}
{% if not service.active %}
<span class="navigation-service-type navigation-service-type--suspended">Suspended</span>
{% elif service.has_permission('broadcast') %}
{{ broadcast_service_name_tag(
service.trial_mode,
service.broadcast_channel,
service.allowed_broadcast_provider,
) }}
{% endif %}
</div>
{% endmacro %}
{% macro broadcast_service_name_tag(trial_mode, broadcast_channel, allowed_broadcast_provider, left_margin=True) %}
{% set margin_class = "" if left_margin else "govuk-!-margin-left-0" %}
{% if trial_mode %}
<span class="navigation-service-type navigation-service-type--training {{margin_class}}">Training
{% else %}
{% if broadcast_channel == "severe" %}
<span class="navigation-service-type navigation-service-type--live {{margin_class}}">Live
{% else %}
<span class="navigation-service-type navigation-service-type--{{broadcast_channel}} {{margin_class}}">{{ broadcast_channel|title }}
{% endif %}
{% if allowed_broadcast_provider != "all" %}
({{ allowed_broadcast_provider|format_mobile_network }})
{% endif %}
{% endif %}
</span>
{% endmacro %}
<div class="navigation-service">
{% if current_service.organisation_id %}
{% if current_user.platform_admin or
(current_user.belongs_to_organisation(current_service.organisation_id) and current_service.live) %}
<a href="{{ url_for('.organisation_dashboard', org_id=current_service.organisation_id) }}" class="govuk-link govuk-link--no-visited-state navigation-organisation-link">{{ current_service.organisation_name }}</a>
{% endif %}
{% endif %}
{{ navigation_service_name(current_service) }}
<a href="{{ url_for('main.choose_account') }}" class="govuk-link govuk-link--no-visited-state navigation-service-switch">Switch service</a>
</div>