From 2a71cc5481f3ea05523f862c6a3e6b415dfd3f38 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 10 Feb 2020 12:13:24 +0000 Subject: [PATCH] Convert warning links to govuk-link--destructive Converts links in the following: - the page-footer component - the table component - the browse-list component - the notification status, when reporting failures - validation messaging in the whitelist page --- .../stylesheets/components/browse-list.scss | 13 -------- .../stylesheets/components/page-footer.scss | 17 ---------- app/assets/stylesheets/components/table.scss | 31 ++++--------------- app/templates/components/browse-list.html | 2 +- app/templates/components/table.html | 5 +-- .../partials/notifications/status.html | 10 +++--- app/templates/views/api/whitelist.html | 4 +-- .../views/find-users/user-information.html | 2 +- app/templates/views/jobs/job.html | 2 +- .../views/notifications/notification.html | 2 +- app/templates/views/service-settings.html | 6 ++-- app/templates/views/templates/template.html | 4 +-- 12 files changed, 26 insertions(+), 72 deletions(-) diff --git a/app/assets/stylesheets/components/browse-list.scss b/app/assets/stylesheets/components/browse-list.scss index b0d8255f7..1f377ef84 100644 --- a/app/assets/stylesheets/components/browse-list.scss +++ b/app/assets/stylesheets/components/browse-list.scss @@ -16,19 +16,6 @@ margin-bottom: $gutter-half; } - &-link-destructive { - color: $error-colour; - - &:visited, - &:link { - color: $error-colour; - } - - &:hover { - color: $mellow-red; - } - } - &-hint { @include core-19; margin: 5px 0 10px 0; diff --git a/app/assets/stylesheets/components/page-footer.scss b/app/assets/stylesheets/components/page-footer.scss index cdf95ff65..56611d425 100644 --- a/app/assets/stylesheets/components/page-footer.scss +++ b/app/assets/stylesheets/components/page-footer.scss @@ -8,26 +8,9 @@ line-height: 40px; padding: 1px 0 0 15px; - a { - - &:visited, - &:link { - color: $error-colour; - display: inline-block; - vertical-align: center; - } - - &:hover, - &:active { - color: $mellow-red; - } - - } - } &-delete-link-without-button { - @include core-19; padding: 0; display: inline-block; } diff --git a/app/assets/stylesheets/components/table.scss b/app/assets/stylesheets/components/table.scss index 61dba8ed5..3b4a4a49b 100644 --- a/app/assets/stylesheets/components/table.scss +++ b/app/assets/stylesheets/components/table.scss @@ -212,15 +212,6 @@ color: $error-colour; font-weight: bold; - a { - - &:link, - &:visited { - color: $error-colour; - } - - } - .status-hint { display: block; font-weight: normal; @@ -356,22 +347,12 @@ background: transparent; } - &:hover { - color: $link-hover-colour; - } - - &:active, - &:focus { - - color: $black; - - &:before { - border-color: $yellow; - border-style: solid; - border-width: 15px 3px 15px 15px; - right: -3px; - } - + &:active:before, + &:focus:before { + border-color: $yellow; + border-style: solid; + border-width: 15px 3px 15px 15px; + right: -3px; } } diff --git a/app/templates/components/browse-list.html b/app/templates/components/browse-list.html index 8d7b4aad6..b75d09218 100644 --- a/app/templates/components/browse-list.html +++ b/app/templates/components/browse-list.html @@ -5,7 +5,7 @@ {% for item in items %} {% if item.title and item.link %}
  • - {{ item.title }} + {{ item.title }} {% if item.hint %}
    {{ item.hint }} diff --git a/app/templates/components/table.html b/app/templates/components/table.html index 71be2b57f..4eba1c54e 100644 --- a/app/templates/components/table.html +++ b/app/templates/components/table.html @@ -149,13 +149,14 @@ {% 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=notification.status|format_notification_status_as_field_status(notification.notification_type), + status=status, align='right' ) %} {% if displayed_on_single_line %}{% endif %} {% if 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) %} diff --git a/app/templates/partials/notifications/status.html b/app/templates/partials/notifications/status.html index 85dd87b01..c8124b94b 100644 --- a/app/templates/partials/notifications/status.html +++ b/app/templates/partials/notifications/status.html @@ -1,12 +1,14 @@
    -

    - {% if notification.status|format_notification_status_as_url(notification.notification_type) %} - + {% set field_status = notification.status|format_notification_status_as_field_status(notification.notification_type) %} + {% set status_url = notification.status|format_notification_status_as_url(notification.notification_type) %} +

    + {% if status_url %} + {% endif %} {{ notification.status|format_notification_status( notification.template.template_type ) }} - {% if notification.status|format_notification_status_as_url(notification.notification_type) %} + {% if status_url %} {% endif %} {% if sent_with_test_key %} diff --git a/app/templates/views/api/whitelist.html b/app/templates/views/api/whitelist.html index 264397842..ad2750650 100644 --- a/app/templates/views/api/whitelist.html +++ b/app/templates/views/api/whitelist.html @@ -22,12 +22,12 @@

    diff --git a/app/templates/views/find-users/user-information.html b/app/templates/views/find-users/user-information.html index 43bb4c5c3..e45b948c5 100644 --- a/app/templates/views/find-users/user-information.html +++ b/app/templates/views/find-users/user-information.html @@ -62,7 +62,7 @@ {% endif %} {% if user.state == 'active' %} - + Archive user diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html index 2e06b56a4..e8cbf7f6c 100644 --- a/app/templates/views/jobs/job.html +++ b/app/templates/views/jobs/job.html @@ -25,7 +25,7 @@