mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
Fix links to current service pages from guidance
This wasn’t working because: - macros don’t have access to `current_service` from within their scope - there were no tests for this behaviour
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% macro current_service_link(endpoint, link_text) %}
|
||||
{% if current_service %}
|
||||
<a class="govuk-link" href="{{ url_for(endpoint, service_id=current_service.id) }}">{{ link_text }}</a>
|
||||
{% macro service_link(service, endpoint, link_text) %}
|
||||
{% if service %}
|
||||
<a class="govuk-link" href="{{ url_for(endpoint, service_id=service.id) }}">{{ link_text }}</a>
|
||||
{% else %}
|
||||
<b class="govuk-!-font-weight-bold">{{ link_text|capitalize }}</b>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user