diff --git a/Gemfile b/Gemfile index 8b5bea46a..d5c7d69fa 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ gem "rails", "6.1.4.1" gem "actionpack-page_caching" gem "gds-api-adapters" gem "govuk_app_config" +gem "govuk_personalisation" gem "govuk_publishing_components" gem "govuk_template" gem "nokogiri" diff --git a/Gemfile.lock b/Gemfile.lock index 78cc3dc9e..2591beae0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -130,6 +130,9 @@ GEM sentry-ruby (~> 4.5.0) statsd-ruby (~> 1.5.0) unicorn (>= 5.4, < 5.9) + govuk_personalisation (0.7.0) + plek (>= 1.9.0) + rails (~> 6) govuk_publishing_components (25.7.0) govuk_app_config kramdown @@ -366,6 +369,7 @@ DEPENDENCIES gds-api-adapters govuk-content-schema-test-helpers govuk_app_config + govuk_personalisation govuk_publishing_components govuk_template govuk_test diff --git a/app/views/root/_base.html.erb b/app/views/root/_base.html.erb index 0719d6442..d75db15f0 100644 --- a/app/views/root/_base.html.erb +++ b/app/views/root/_base.html.erb @@ -46,7 +46,7 @@ navigation_items: [ # Remember to update the links in _gem_base.html.erb as well. { text: "Account", - href: Plek.new.website_root + "/account/home", + href: GovukPersonalisation::Urls.your_account, data: { module: "explicit-cross-domain-links", link_for: "accounts-signed-in", @@ -54,7 +54,7 @@ }, { text: "Sign out", - href: Plek.new.website_root + "/sign-out", + href: GovukPersonalisation::Urls.sign_out, data: { module: "explicit-cross-domain-links", link_for: "accounts-signed-in", @@ -62,7 +62,7 @@ }, { text: "Sign in", - href: Plek.new.website_root + "/sign-in", + href: GovukPersonalisation::Urls.sign_in, data: { module: "explicit-cross-domain-links", link_for: "accounts-signed-out", diff --git a/app/views/root/_gem_base.html.erb b/app/views/root/_gem_base.html.erb index beb7695c6..1cfe5db4c 100644 --- a/app/views/root/_gem_base.html.erb +++ b/app/views/root/_gem_base.html.erb @@ -36,7 +36,7 @@ navigation_items: [ # Remember to update the links in _base.html.erb as well. { text: "Account", - href: Plek.new.website_root + "/account/home", + href: GovukPersonalisation::Urls.your_account, data: { module: "explicit-cross-domain-links", link_for: "accounts-signed-in", @@ -44,7 +44,7 @@ }, { text: "Sign out", - href: Plek.new.website_root + "/sign-out", + href: GovukPersonalisation::Urls.sign_out, data: { module: "explicit-cross-domain-links", link_for: "accounts-signed-in", @@ -52,7 +52,7 @@ }, { text: "Sign in", - href: Plek.new.website_root + "/sign-in", + href: GovukPersonalisation::Urls.sign_in, data: { module: "explicit-cross-domain-links", link_for: "accounts-signed-out", diff --git a/app/views/root/gem_layout_account.html.erb b/app/views/root/gem_layout_account.html.erb index 4d7b5854e..2331e0c9d 100644 --- a/app/views/root/gem_layout_account.html.erb +++ b/app/views/root/gem_layout_account.html.erb @@ -1,5 +1,5 @@ <%= render partial: "gem_base", locals: { product_name: "Account", - logo_link: Plek.new.website_root + "/account/home", + logo_link: GovukPersonalisation::Urls.your_account, omit_feedback_form: true, } %> diff --git a/app/views/root/gem_layout_account_manager.html.erb b/app/views/root/gem_layout_account_manager.html.erb index ea7cd1ebd..a9b8b5638 100644 --- a/app/views/root/gem_layout_account_manager.html.erb +++ b/app/views/root/gem_layout_account_manager.html.erb @@ -1,6 +1,6 @@ <%= render partial: "gem_base", locals: { product_name: "Account", - logo_link: Plek.new.website_root + "/account/home", + logo_link: GovukPersonalisation::Urls.your_account, omit_feedback_form: true, omit_global_banner: true, omit_user_satisfaction_survey: true,