-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transition main navigation to design system.
This commit includes below changes: -Duplicated existing header partial view to legacy. -Created new header partial with design system logic for main navigation. -Added new method in base controller to handle toggle between legacy and new header views. -Updated admin and design_system views with new header partial view render.
- Loading branch information
Showing
5 changed files
with
139 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<% environment_style = GovukAdminTemplate.environment_style %> | ||
<% environment_label = GovukAdminTemplate.environment_label %> | ||
<% environment = GovukPublishingComponents::AppHelpers::Environment.current_acceptance_environment %> | ||
<% admin_template ||= false %> | ||
|
||
<header class=" | ||
masthead | ||
navbar | ||
navbar-default | ||
navbar-inverse | ||
navbar-static-top | ||
<% if !t('admin.whats_new.show_banner') && admin_template %>add-bottom-margin<% end %> | ||
<% if environment_style %>environment-indicator<% end %>" role="banner"> | ||
<div class="navbar-container container-fluid"> | ||
<div class="navbar-header"> | ||
<%# Bootstrap toggle for collapsed navbar content, used at smaller widths %> | ||
<a class="navbar-toggle" data-toggle="collapse" data-target="header .navbar-collapse"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</a> | ||
<%= link_to "GOV.UK Whitehall", admin_root_path, :class => "navbar-brand" %> | ||
<% if environment_label %> | ||
<div class="environment-label"> | ||
<%= environment_label %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<nav role="navigation" class="collapse navbar-collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li><%= link_to "Dashboard", admin_root_path %></li> | ||
<li><%= link_to "View website", Whitehall.public_root, class: "open_website" %></li> | ||
</ul> | ||
<div class="navbar-text pull-right remove-bottom-margin"> | ||
<ul class="list-inline"> | ||
<li> | ||
<%= signon_link %> | ||
</li> | ||
<% if user_signed_in? %> | ||
<li> | ||
<%= link_to current_user.name, admin_user_path(current_user), id: "#user_settings" %> | ||
</li> | ||
<li> | ||
<%= link_to "Logout", "/auth/gds/sign_out" %> | ||
</li> | ||
<% end %> | ||
<%= admin_users_header_link %> | ||
</ul> | ||
</div> | ||
</nav> | ||
</div> | ||
|
||
<div class="container-fluid"> | ||
<ul id="global-nav" class="masthead-tabs list-unstyled"> | ||
<li class="masthead-tab-item js-create-new create-new" data-module="navbar-toggle"> | ||
<a href="#new-document-menu" class="toggler js-navbar-toggle__toggler" id="new-document-label">New document</a> | ||
<%= document_creation_dropdown %> | ||
</li> | ||
<%= admin_documents_header_link %> | ||
<%= admin_statistics_announcements_link %> | ||
<%= admin_featured_header_link %> | ||
<%= admin_user_organisation_header_link %> | ||
<li class="js-more-nav masthead-tab-item" data-module="navbar-toggle"> | ||
<a href="#more-links-menu" id="more-links-label" class="toggler js-navbar-toggle__toggler">More</a> | ||
<ul id="more-links-menu" class="masthead-menu masthead-menu-right js-hidden unstyled js-navbar-toggle__menu hide-before-js-module-init" role="menu" aria-labelledby="more-links-label"> | ||
<%= admin_organisations_header_menu_link %> | ||
<%= admin_policy_groups_header_menu_link %> | ||
<%= admin_roles_header_menu_link %> | ||
<%= admin_people_header_menu_link %> | ||
<%= admin_topical_events_header_menu_link %> | ||
<%= admin_worldwide_organisations_header_menu_link %> | ||
<%= admin_world_location_news_header_menu_link %> | ||
<%= admin_fields_of_operation_header_menu_link %> | ||
<%= admin_cabinet_ministers_header_menu_link %> | ||
<%= admin_get_involved_header_menu_link %> | ||
<%= admin_sitewide_settings_header_menu_link %> | ||
<%= admin_governments_header_menu_link %> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
<% if admin_template %> | ||
<section class="notices"> | ||
<%= render partial: "shared/notices" %> | ||
</section> | ||
<% end %> | ||
</header> |