Skip to content

Commit

Permalink
Merge pull request #2662 from alphagov/account-template-manage-accoun…
Browse files Browse the repository at this point in the history
…t-active

Add support for "Manage your account" active in the account nav
  • Loading branch information
danacotoran authored Nov 30, 2021
2 parents c06beb0 + 3e5bfce commit 2b45615
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/root_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class RootController < ApplicationController
campaign
gem_layout
gem_layout_account_manager
gem_layout_account_manager_manage_your_account_active
gem_layout_account_manager_no_nav
gem_layout_explore_header
gem_layout_full_width
Expand Down
3 changes: 2 additions & 1 deletion app/views/root/_account.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<%
omit_account_navigation ||= nil
account_nav_location ||= "your-account"
di_location = "https://signin.account.gov.uk"
%>

<%= render partial: "gem_base", locals: {
account_nav_location: "your-account",
account_nav_location: account_nav_location,
omit_feedback_form: true,
omit_footer_border: true,
omit_global_banner: true,
Expand Down
1 change: 1 addition & 0 deletions app/views/root/_gem_base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
module: "explicit-cross-domain-links",
link_for: "accounts-signed-in",
},
active: show_account_layout,
},
{
text: "Sign out",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<%= render partial: "account", locals: {
account_nav_location: "manage",
} %>
3 changes: 3 additions & 0 deletions docs/slimmer_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ This layout omits the default feedback component for GOVUK as the account pages

Same as the `gem_layout_account_manager`, but displays without the account nav component.

## `gem_layout_account_manager_manage_your_account_active`

Same as the `gem_layout_account_manager`, but displays "Manage your account" as active in the [account navigation element](https://components.publishing.service.gov.uk/component-guide/layout_for_public/with_current_account_navigation/preview).

## `core_layout` (default)

Expand Down

0 comments on commit 2b45615

Please sign in to comment.