Skip to content

Commit

Permalink
Merge pull request #2585 from alphagov/msw/account-urls
Browse files Browse the repository at this point in the history
Use govuk_personalisation to generate account URLs
  • Loading branch information
barrucadu authored Sep 1, 2021
2 parents f9ad7d0 + 9a4cf9e commit 173fcab
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/views/root/_base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@
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",
},
},
{
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",
},
},
{
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",
Expand Down
6 changes: 3 additions & 3 deletions app/views/root/_gem_base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@
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",
},
},
{
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",
},
},
{
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",
Expand Down
2 changes: 1 addition & 1 deletion app/views/root/gem_layout_account.html.erb
Original file line number Diff line number Diff line change
@@ -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,
} %>
2 changes: 1 addition & 1 deletion app/views/root/gem_layout_account_manager.html.erb
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 173fcab

Please sign in to comment.