Only show back to service link if you have service

It doesn’t make sense to show the back to service link if, for example,
you are in the onboarding flow and haven’t created a service yet.
This commit is contained in:
Chris Hill-Scott
2017-03-15 13:44:46 +00:00
parent c53e714db6
commit f2d0f75fce
2 changed files with 29 additions and 2 deletions

View File

@@ -2,9 +2,9 @@
{% block fullwidth_content %}
<div id="content">
{% if current_user.is_authenticated %}
{% if current_service %}
<div class="navigation-service">
<a href="{{ url_for('main.show_all_services_or_dashboard') }}">Back to service</a>
<a href="{{ url_for('main.show_all_services_or_dashboard') }}">Back to {{ current_service.name }}</a>
</div>
{% endif %}
<main role="main">