Files
notifications-admin/app/templates/components/service-link.html
Chris Hill-Scott 75927a8d05 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
2020-02-20 15:13:12 +00:00

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 %}