mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
This wasn’t working because: - macros don’t have access to `current_service` from within their scope - there were no tests for this behaviour
8 lines
287 B
HTML
8 lines
287 B
HTML
{% 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 %}
|
|
{% endmacro %}
|