Revert "Convert all links to govuk frontend"

This commit is contained in:
Tom Byers
2020-02-24 11:56:38 +00:00
committed by GitHub
parent ae1b2d4c63
commit 5b306dde4d
163 changed files with 548 additions and 521 deletions

View File

@@ -1,6 +1,6 @@
{% macro big_number(number, label, link=None, currency='', smaller=False, smallest=False) %}
{% if link %}
<a class="govuk-link govuk-link--no-visited-state big-number-link" href="{{ link }}">
<a class="big-number-link" href="{{ link }}">
{% endif %}
<div class="big-number{% if smaller %}-smaller{% endif %}{% if smallest %}-smallest{% endif %}">
<div class="big-number-number">
@@ -42,7 +42,7 @@
<div class="big-number-status{% if danger_zone %}-failing{% endif %}">
{% if failures %}
{% if failure_link %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ failure_link }}">
<a href="{{ failure_link }}">
{{ "{:,}".format(failures) }}
failed {{ failure_percentage }}%
</a>

View File

@@ -5,7 +5,7 @@
{% for item in items %}
{% if item.title and item.link %}
<li class="browse-list-item">
<a href="{{ item.link }}" class="govuk-link govuk-link--{% if item.destructive %}--destructive{% else %}--no-visited-state{% endif %}">{{ item.title }}</a>
<a href="{{ item.link }}" class="browse-list-link{% if item.destructive %}-destructive{% endif %}">{{ item.title }}</a>
{% if item.hint %}
<div class="browse-list-hint">
{{ item.hint }}

View File

@@ -32,7 +32,7 @@
</label>
{% if alternate_link and alternate_link_text %}
<span class="file-upload-alternate-link">
or <a class="govuk-link govuk-link--no-visited-state" href="{{ alternate_link }}">{{ alternate_link_text }}</a>
or <a href="{{ alternate_link }}">{{ alternate_link_text }}</a>
</span>
{% endif %}
<label class="file-upload-filename" for="{{ field.name }}"></label>

View File

@@ -17,12 +17,12 @@
{% else %}
{% if folder.id %}
{% if current_user.has_template_folder_permission(folder) %}
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type, template_folder_id=folder.id) }}" class="govuk-link govuk-link--no-visited-state folder-heading-folder {% if loop.index < (loop.length - 1) %}folder-heading-folder-truncated{% endif %}" title="{{ folder.name }}">{{ folder.name }}</a>
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type, template_folder_id=folder.id) }}" class="folder-heading-folder {% if loop.index < (loop.length - 1) %}folder-heading-folder-truncated{% endif %}" title="{{ folder.name }}">{{ folder.name }}</a>
{% else %}
<span class="folder-heading-folder">{{ folder.name }}</span>
{% endif %}
{% else %}
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}" title="Templates" class="govuk-link govuk-link--no-visited-state {% if loop.length > 2 %}folder-heading-folder-root-truncated{% endif %}">Templates</a>
<a href="{{ url_for('.choose_template', service_id=service_id, template_type=template_type) }}" title="Templates" class="{% if loop.length > 2 %}folder-heading-folder-root-truncated{% endif %}">Templates</a>
{% endif %}
{% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% endif %}
@@ -40,7 +40,7 @@
{% if folder_path %}
<h2 class="heading-medium folder-heading">
{% if folder_path|length == 1 %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_template_to_copy', service_id=current_service_id) }}">Services</a>
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id) }}">Services</a>
{{ folder_path_separator() }}
{% endif %}
{% for folder in folder_path %}
@@ -51,15 +51,15 @@
{% else %}
{% if folder.id %}
{% if current_user.has_template_folder_permission(folder) %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="govuk-link govuk-link--no-visited-state folder-heading-folder">{{ folder.name }}</a>
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="folder-heading-folder">{{ folder.name }}</a>
{% else %}
<span class="folder-heading-folder">{{ folder.name }}</span>
{% endif %}
{% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% elif folder.parent_id == None %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="govuk-link govuk-link--no-visited-state folder-heading-folder">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id, from_folder=folder.id) }}" class="folder-heading-folder">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% else %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id) }}">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
<a href="{{ url_for('.choose_template_to_copy', service_id=current_service_id, from_service=from_service.id) }}">{{ from_service.name }}</a> {% if not loop.last %}{{ folder_path_separator() }}{% endif %}
{% endif %}
{% endif %}
{% endfor %}

View File

@@ -26,11 +26,11 @@
{% endif %}
{% if delete_link %}
<span class="page-footer-delete-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
<a class="govuk-link govuk-link--destructive" href="{{ delete_link }}">{{ delete_link_text }}</a>
<a href="{{ delete_link }}">{{ delete_link_text }}</a>
</span>
{% endif %}
{% if secondary_link and secondary_link_text %}
<a class="govuk-link govuk-link--no-visited-state page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
<a class="page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
{% endif %}
</div>
{% endmacro %}

View File

@@ -13,7 +13,7 @@
<div class='pill-selected-item{% if not show_count %} pill-centered-item{% endif %}' tabindex='0'>
{% else %}
<li aria-selected='false' role='tab'>
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">
<a href="{{ link }}">
{% endif %}
{% if show_count %}
{{ big_number(count, **big_number_args) }}

View File

@@ -4,7 +4,7 @@
<ul class="group">
{% if previous_page %}
<li class="previous-page">
<a class="govuk-link govuk-link--no-visited-state" href="{{previous_page['url']}}" rel="previous" >
<a href="{{previous_page['url']}}" rel="previous" >
<span class="pagination-part-title">
<svg class="pagination-icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17" viewBox="0 0 17 13">
<path fill="currentColor" d="m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z"/>
@@ -17,7 +17,7 @@
{% endif %}
{% if next_page %}
<li class="next-page">
<a class="govuk-link govuk-link--no-visited-state" href="{{next_page['url']}}" rel="next">
<a href="{{next_page['url']}}" rel="next">
<span class="pagination-part-title">
{{next_page['title']}}
<svg class="pagination-icon" xmlns="http://www.w3.org/2000/svg" height="13" width="17" viewBox="0 0 17 13">

View File

@@ -1,6 +1,6 @@
{% macro show_more(url, label, with_border=True) %}
<a
href="{{ url }}"
class="govuk-link govuk-link--no-visited-state show-more{% if not with_border %}-no-border{% endif %}"
class="show-more{% if not with_border %}-no-border{% endif %}"
><span>{{ label }}</span></a>
{% endmacro %}

View File

@@ -2,7 +2,7 @@
<div class="big-number-with-status">
<div class="big-number-status{% if failing %}-failing{% endif %}">
{% if url %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ url }}">{{ number }} {{ label }}</a>
<a href="{{ url }}">{{ number }} {{ label }}</a>
{% else %}
{{ number }} {{ label }}
{% endif %}

View File

@@ -4,7 +4,7 @@
itemscope
itemtype="http://schema.org/ListItem"
>
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for(item['link']) }}" itemprop="item">
<a href="{{ url_for(item['link']) }}" itemprop="item">
<span itemprop="name">{{item['name']}}</span>
</a>
</li>

View File

@@ -117,14 +117,14 @@
{% macro link_field(text, link) -%}
{% call field() %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">{{ text }}</a>
<a href="{{ link }}">{{ text }}</a>
{% endcall %}
{%- endmacro %}
{% macro edit_field(text, link, permissions=[]) -%}
{% 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 href="{{ link }}">{{ text }}</a>
{% endif %}
{% endcall %}
{%- endmacro %}
@@ -149,14 +149,13 @@
{% if not notification %}
{% call field(align='right') %}{% endcall %}
{% else %}
{% set status = notification.status|format_notification_status_as_field_status(notification.notification_type) %}
{% call field(
status=status,
status=notification.status|format_notification_status_as_field_status(notification.notification_type),
align='right'
) %}
{% if displayed_on_single_line %}<span class="align-with-message-body">{% endif %}
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}
<a class="govuk-link govuk-link--{% if status == 'error' %}destructive{% else %}no-visited-state{% endif %}" href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
<a href="{{ notification.status|format_notification_status_as_url(notification.notification_type) }}">
{% endif %}
{{ notification.status|format_notification_status(notification.template.template_type) }}
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}

View File

@@ -1,6 +1,6 @@
{% macro task_list_item(completed, label, link) %}
<li class="task-list-item">
<span aria-describedby="{{ label|id_safe }}"><a class="govuk-link govuk-link--no-visited-state" href="{{ link }}">{{ label }}</a></span>
<span aria-describedby="{{ label|id_safe }}"><a href="{{ link }}">{{ label }}</a></span>
{% if completed %}
<strong class="task-list-indicator-completed" id="{{ label|id_safe }}">Completed</strong>
{% else %}

View File

@@ -58,7 +58,7 @@
{% endif %}
{% if help_link and help_link_text %}
<p class="textbox-help-link">
<a class="govuk-link govuk-link--no-visited-state" href='{{ help_link }}'>{{ help_link_text }}</a>
<a href='{{ help_link }}'>{{ help_link_text }}</a>
</p>
{% endif %}
</div>