Add context to service settings links

This commit is contained in:
Tom Byers
2020-08-25 20:01:31 +01:00
parent aa0b21b8f6
commit e42adecd07
2 changed files with 54 additions and 36 deletions

View File

@@ -121,10 +121,13 @@
{% endcall %}
{%- endmacro %}
{% macro edit_field(text, link, permissions=[]) -%}
{% macro edit_field(text, link, permissions=[], suffix=None) -%}
{% call field(align='right') %}
{% if not permissions or current_user.has_permissions(*permissions) %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">{{ text }}</a>
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">
{{ text }}
{%- if suffix %}<span class="govuk-visually-hidden"> {{ suffix }}</span>{% endif -%}
</a>
{% endif %}
{% endcall %}
{%- endmacro %}