Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-06-09 07:51:21 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
e6f49825e5fdfd798ca2f2622f12342dfd15dbf8
notifications-admin/app/templates/components/service-link.html

8 lines
316 B
HTML
Raw Normal View History

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:11:10 +00:00
{% macro service_link(service, endpoint, link_text) %}
{% if service %}
Add Design System class to remove visited state from links Co-Authored-By: Tom Byers <tombaromba@gmail.com>
2020-02-21 09:29:37 +00:00
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for(endpoint, service_id=service.id) }}">{{ link_text }}</a>
Add a macro for generating current service links This is a convenient way of being able to link into pages of the the app from guidance. It handles the case where the current service is not known, either because the user hasn’t chosen one, or because they’re not signed in. This commit also cleans up some unused Jinja imports.
2020-02-19 08:20:38 +00:00
{% else %}
<b class="govuk-!-font-weight-bold">{{ link_text|capitalize }}</b>
{% endif %}
{% endmacro %}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 6698ms Template: 76ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API