Skip to content

Commit

Permalink
Merge pull request #2627 from alphagov/account-layout-template-no-nav
Browse files Browse the repository at this point in the history
Add account "no nav" layout template variation
  • Loading branch information
danacotoran authored Oct 27, 2021
2 parents 4cac753 + 3edb096 commit 91999ee
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
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_no_nav
gem_layout_explore_header
gem_layout_full_width
gem_layout_full_width_explore_header
Expand Down
13 changes: 13 additions & 0 deletions app/views/root/_account.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<% omit_account_navigation ||= nil %>

<%= render partial: "gem_base", locals: {
account_nav_location: "your-account",
logo_link: GovukPersonalisation::Urls.your_account,
omit_feedback_form: true,
omit_global_banner: true,
omit_user_satisfaction_survey: true,
product_name: "Account",
show_account_layout: true,
show_explore_header: false,
omit_account_navigation: omit_account_navigation,
} %>
2 changes: 2 additions & 0 deletions app/views/root/_gem_base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
omit_footer_navigation ||= nil
omit_global_banner ||= nil
omit_user_satisfaction_survey ||= nil
omit_account_navigation ||= nil
product_name ||= nil
show_explore_header = show_explore_header === false ? false : true
show_account_layout ||= false
Expand Down Expand Up @@ -64,6 +65,7 @@
],
omit_feedback_form: omit_feedback_form,
omit_footer_navigation: omit_footer_navigation,
omit_account_navigation: omit_account_navigation,
product_name: product_name,
show_account_layout: show_account_layout,
show_explore_header: show_explore_header,
Expand Down
11 changes: 1 addition & 10 deletions app/views/root/gem_layout_account_manager.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
<%= render partial: "gem_base", locals: {
account_nav_location: "your-account",
logo_link: GovukPersonalisation::Urls.your_account,
omit_feedback_form: true,
omit_global_banner: true,
omit_user_satisfaction_survey: true,
product_name: "Account",
show_account_layout: true,
show_explore_header: false,
} %>
<%= render partial: "account" %>
3 changes: 3 additions & 0 deletions app/views/root/gem_layout_account_manager_no_nav.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<%= render partial: "account", locals: {
omit_account_navigation: true,
} %>
5 changes: 5 additions & 0 deletions docs/slimmer_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ This layout omits the default feedback component for GOVUK as the account pages
This also includes the Account product name in the layout header and changes the logo link to the account homepage link.


## `gem_layout_account_manager_no_nav`

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


## `core_layout` (default)

This template contains styles for the black header bar, the footer and core layout classes. By default it will centre your content to the same width as the GOV.UK header. It provides classes for grid layouts using the column mixins from the frontend toolkit.
Expand Down

0 comments on commit 91999ee

Please sign in to comment.