From 271a84b0cfcd7ff099f877ad756ea9806fb7c69c Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Fri, 13 Dec 2024 12:20:16 +0000 Subject: [PATCH 1/3] Update navItem variable --- app/views/funding/index.njk | 2 +- app/views/funding/payment-schedule.njk | 2 +- app/views/funding/trainee-summary.njk | 2 +- app/views/organisations/organisation.njk | 2 +- app/views/organisations/token-details.njk | 2 +- app/views/organisations/token-generated.njk | 2 +- app/views/organisations/token-manage.njk | 2 +- app/views/support/organisations/view.njk | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/funding/index.njk b/app/views/funding/index.njk index dbbb1090a..a4f36e096 100644 --- a/app/views/funding/index.njk +++ b/app/views/funding/index.njk @@ -1,5 +1,5 @@ {% extends "_templates/_page.njk" %} -{% set navActive = "Funding" %} +{% set navActive = "funding" %} {% set pageHeading = "Select an academic year to view its funding" %} {% set backLink = "/" %} diff --git a/app/views/funding/payment-schedule.njk b/app/views/funding/payment-schedule.njk index efb7ccc9b..35cba4050 100644 --- a/app/views/funding/payment-schedule.njk +++ b/app/views/funding/payment-schedule.njk @@ -1,5 +1,5 @@ {% extends "_templates/_page.njk" %} -{% set navActive = "Funding" %} +{% set navActive = "funding" %} {% set pageHeading = navActive %} {% set tabName = "Payment schedule " + fundingYear %} diff --git a/app/views/funding/trainee-summary.njk b/app/views/funding/trainee-summary.njk index 930988f99..04148bc15 100644 --- a/app/views/funding/trainee-summary.njk +++ b/app/views/funding/trainee-summary.njk @@ -1,5 +1,5 @@ {% extends "_templates/_page.njk" %} -{% set navActive = "Funding" %} +{% set navActive = "funding" %} {% set pageHeading = navActive %} {% set tabName = "Trainee summary " + fundingYear %} diff --git a/app/views/organisations/organisation.njk b/app/views/organisations/organisation.njk index 97100a772..d2892b086 100644 --- a/app/views/organisations/organisation.njk +++ b/app/views/organisations/organisation.njk @@ -4,7 +4,7 @@ Organisation – {{ provider.name }} {% endset %} -{# {% set navActive = "provider" %} #} +{% set navActive = "provider" %} {% set backText = "Home" %} {% set backLink = '/home' %} diff --git a/app/views/organisations/token-details.njk b/app/views/organisations/token-details.njk index b1c16d9a5..45ad376b9 100644 --- a/app/views/organisations/token-details.njk +++ b/app/views/organisations/token-details.njk @@ -4,7 +4,7 @@ Organisation – {{ provider.name }} {% endset %} -{# {% set navActive = "provider" %} #} +{% set navActive = "provider" %} {% set backText = "Back" %} {% set backLink = 'token-manage' %} diff --git a/app/views/organisations/token-generated.njk b/app/views/organisations/token-generated.njk index f6b4c9843..607f9e9d2 100644 --- a/app/views/organisations/token-generated.njk +++ b/app/views/organisations/token-generated.njk @@ -4,7 +4,7 @@ Organisation – {{ provider.name }} {% endset %} -{# {% set navActive = "provider" %} #} +{% set navActive = "provider" %} {% set backText = "Back" %} {% set backLink = 'token-details' %} diff --git a/app/views/organisations/token-manage.njk b/app/views/organisations/token-manage.njk index b2fabd2e0..b4f285293 100644 --- a/app/views/organisations/token-manage.njk +++ b/app/views/organisations/token-manage.njk @@ -4,7 +4,7 @@ Organisation – {{ provider.name }} {% endset %} -{# {% set navActive = "provider" %} #} +{% set navActive = "provider" %} {% set backText = "Back" %} {% set backLink = 'organisation' %} diff --git a/app/views/support/organisations/view.njk b/app/views/support/organisations/view.njk index 6b01c35b8..2e5c4040c 100644 --- a/app/views/support/organisations/view.njk +++ b/app/views/support/organisations/view.njk @@ -4,7 +4,7 @@ Organisation – {{ provider.name }} {% endset %} -{# {% set navActive = "provider" %} #} +{% set navActive = "provider" %} {% set backText = "Back" %} {# {% set backLink = '/home' %} #} From ca40fb4f530f5075f5cc1dac954abffbccbf796b Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Fri, 13 Dec 2024 12:21:37 +0000 Subject: [PATCH 2/3] Replace mojPrimaryNavigation with govukServiceNavigation --- app/assets/sass/application.scss | 1 - .../overrides/_moj-primary-navigation.scss | 23 -------- app/views/layout.njk | 54 +++++-------------- 3 files changed, 14 insertions(+), 64 deletions(-) delete mode 100644 app/assets/sass/overrides/_moj-primary-navigation.scss diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index aa6e61834..6b40ea274 100755 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -62,7 +62,6 @@ $govuk-assets-path: "/dist/govuk/assets/"; @import "overrides/moj-button-menu"; @import "overrides/moj-filter"; @import "overrides/moj-pagination"; -@import "overrides/moj-primary-navigation"; @import "overrides/status-grid"; @import "overrides/summary-card"; @import "overrides/tabs"; diff --git a/app/assets/sass/overrides/_moj-primary-navigation.scss b/app/assets/sass/overrides/_moj-primary-navigation.scss deleted file mode 100644 index b5f045007..000000000 --- a/app/assets/sass/overrides/_moj-primary-navigation.scss +++ /dev/null @@ -1,23 +0,0 @@ -//// -/// @group helpers/moj-primary-navigation -//// - -.moj-primary-navigation.app-primary-navigation--support-ui { - background: govuk-tint(govuk-colour("purple"), 90); - - & *:link, *:visited { - color: govuk-colour("purple"); - } - - & *:hover { - color: govuk-tint(govuk-colour("purple"), 15); - } - - .moj-primary-navigation__link[aria-current]:before { - background-color: govuk-colour("purple"); - } - - .moj-primary-navigation { - background: govuk-tint(govuk-colour("purple"), 90); - } -} diff --git a/app/views/layout.njk b/app/views/layout.njk index 8dcb16c0a..20e79503c 100755 --- a/app/views/layout.njk +++ b/app/views/layout.njk @@ -22,6 +22,7 @@ {% from "govuk/components/phase-banner/macro.njk" import govukPhaseBanner %} {% from "govuk/components/radios/macro.njk" import govukRadios %} {% from "govuk/components/select/macro.njk" import govukSelect %} +{% from "govuk/components/service-navigation/macro.njk" import govukServiceNavigation %} {% from "govuk/components/skip-link/macro.njk" import govukSkipLink %} {% from "govuk/components/summary-list/macro.njk" import govukSummaryList %} {% from "govuk/components/table/macro.njk" import govukTable %} @@ -53,7 +54,6 @@ {%- from "moj/components/filter/macro.njk" import mojFilter -%} {%- from "moj/components/button-menu/macro.njk" import mojButtonMenu -%} {%- from "moj/components/pagination/macro.njk" import mojPagination -%} -{%- from "moj/components/primary-navigation/macro.njk" import mojPrimaryNavigation -%} {% block head %} {% include "_includes/head.njk" %} @@ -84,13 +84,9 @@ containerClasses: "govuk-width-container", navigation: [ { - href: "#1", + href: "#", text: "Your account" - } if false, - { - href: "/select-organisation", - text: "Change organisation" - } if shouldShowOrganisationSwitchLink and false, + }, { href: "/start-page", text: "Sign out" @@ -102,27 +98,6 @@ {% include "_includes/organisation-switcher.njk" %} {% endif %} - {% set rightHandSideNavHtml %} - - {% if not data.isAdmin and not data.isImpersonating | falsify and not isSupportUi %} - {% set providerName = data.settings.userActiveProvider %} - - - {% endif %} - - {% endset %} - {% set navItemsUser = [ { text: 'Home', @@ -167,8 +142,13 @@ { text: 'Funding', href: '/funding/' + data.years.currentAcademicYearSimple + '/payment-schedule', - active: true if navActive == 'Funding' - } if data.settings.showFundingInPrimaryNav + active: true if navActive == 'funding' + } if data.settings.showFundingInPrimaryNav, + { + text: 'Organisation details', + href: '/organisations/' + activeProvider.id, + active: true if navActive == 'provider' + } if not data.isAdmin and not data.isImpersonating | falsify and not isSupportUi ] | removeEmpty %} {% set navItemsSupport = [ @@ -233,17 +213,13 @@ {% if not hidePrimaryNav %} - {{ mojPrimaryNavigation({ - label: 'Primary navigation', - items: navItems, - containerClasses: "app-primary-navigation--support-ui" if isSupportUi, - searchHtml: rightHandSideNavHtml + {{ govukServiceNavigation({ + ariaLabel: "Primary navigation", + navigation: navItems }) }} {% endif %} - - {% endblock %} {% block beforeContent %} @@ -253,7 +229,7 @@ "role": "status" }, tag: { - text: "prototype" + text: "Prototype" }, classes: 'govuk-!-margin-top-1', html: 'This is a prototype of a new service – your feedback will help us improve it' @@ -286,9 +262,7 @@

Give feedback

-

Give feedback to help us improve Register trainee teachers

- {% endset %} From 3dc0f240bb8f8e8ca813b42c61d52bcf278b40f8 Mon Sep 17 00:00:00 2001 From: Simon Whatley Date: Thu, 19 Dec 2024 14:08:52 +0000 Subject: [PATCH 3/3] Remove incorrect pagination code --- app/assets/sass/application.scss | 1 - app/views/layout.njk | 1 - 2 files changed, 2 deletions(-) diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index 85626b755..90cacccb9 100755 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -58,7 +58,6 @@ $govuk-assets-path: "/dist/govuk/assets/"; @import "overrides/govuk-tag"; @import "overrides/moj-button-menu"; @import "overrides/moj-filter"; -@import "overrides/moj-pagination"; @import "overrides/status-grid"; @import "overrides/tabs"; diff --git a/app/views/layout.njk b/app/views/layout.njk index 54b3cef5b..5f0214677 100755 --- a/app/views/layout.njk +++ b/app/views/layout.njk @@ -53,7 +53,6 @@ {# moj components #} {%- from "moj/components/filter/macro.njk" import mojFilter -%} {%- from "moj/components/button-menu/macro.njk" import mojButtonMenu -%} -{%- from "moj/components/pagination/macro.njk" import mojPagination -%} {% block head %} {% include "_includes/head.njk" %}