Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "Manage your account" active in the account nav #2662

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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