Skip to content

Commit

Permalink
Merge pull request #2408 from alphagov/account-nav-layout-header
Browse files Browse the repository at this point in the history
Replace hard coded account nav with layout header
  • Loading branch information
danacotoran authored Feb 17, 2021
2 parents 837593f + f9af57b commit 37bd9c4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
24 changes: 0 additions & 24 deletions app/views/root/_account_navigation.html.erb

This file was deleted.

34 changes: 30 additions & 4 deletions app/views/root/_base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,39 @@
} %>
</div>
</form>

<% unless hide_account_navigation %>
<%= render partial: 'account_navigation' %>
<% end %>
<% end %>

<% content_for :after_header do %>
<% unless hide_account_navigation %>
<%= render "govuk_publishing_components/components/layout_header", {
remove_bottom_border: true,
navigation_items: [
{
text: "Account",
href: Plek.new.find("account-manager"),
data: {
module: "explicit-cross-domain-links",
link_for: "accounts-signed-in",
},
},
{
text: "Sign out",
href: Plek.new.website_root + "/transition-check/logout",
data: {
module: "explicit-cross-domain-links",
link_for: "accounts-signed-in",
},
},
{
text: "Sign in",
href: Plek.new.website_root + "/transition-check/login",
data: {
module: "explicit-cross-domain-links",
link_for: "accounts-signed-out",
},
}],
} %>
<% end %>
<div id="user-satisfaction-survey-container"></div>
<% if @emergency_banner %>
<%= render "notifications/emergency_banner", banner: @emergency_banner %>
Expand Down

0 comments on commit 37bd9c4

Please sign in to comment.