Skip to content

Commit

Permalink
Merge pull request #4699 from sul-dlss/mobile-menu
Browse files Browse the repository at this point in the history
move mobile menu under title, switch order
  • Loading branch information
justinlittman authored Jan 17, 2025
2 parents 56afa27 + 213add8 commit 2b12dad
Showing 1 changed file with 16 additions and 49 deletions.
65 changes: 16 additions & 49 deletions app/components/top_navbar_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
<span class="navbar-toggler-icon"></span>
</button>

<div
class="collapse navbar-collapse justify-content-md-end"
id="user-util-collapse">
<div class="d-md-block d-none">
<ul class="navbar-nav">
<li class="nav-item">
<%= link_to 'Feedback', 'mailto:[email protected]', class: 'nav-link' %>
Expand All @@ -34,46 +32,6 @@
<p class='navbar-text'>Logged in as <%= current_user.to_s.html_safe %></p>
</li>
<% end %>
<hr>
<% if session[:groups].present? %>
<li class='dropdown nav-item d-md-none'>
<a href='#' class='dropdown-toggle impersonating link-warning nav-link' data-bs-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>
Impersonating: <%= session[:groups].join(' ') %>
<span class='caret'></span>
</a>
<ul class='dropdown-menu'>
<li>
<%= link_to 'Stop Impersonating', auth_forget_impersonated_groups_path %>
</li>
</ul>
</li>
<% elsif can? :impersonate, User %>
<li class="nav-item d-md-none">
<%= link_to 'Impersonate', auth_groups_path, class: 'nav-link' %>
</li>
<% end %>

<li class="nav-item d-md-none">
<%= link_to 'Bulk&nbsp;Action'.html_safe, bulk_actions_path, class: 'nav-link' %>
</li>

<li class="nav-item d-md-none">
<%= link_to 'All&nbsp;Workflows'.html_safe, report_workflow_grid_path, class: 'nav-link' %>
</li>

<li class='nav-item d-md-none dropdown'>
<a href='#' class='nav-link dropdown-toggle' id="registerDropdown" data-bs-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>
Register
<span class='caret'></span>
</a>
<div class="dropdown-menu" aria-labelledby="registerDropdown">
<%= link_to 'Register Items', registration_path, class: 'dropdown-item' %>
<% if can? :create, Cocina::Models::AdminPolicy %>
<%= link_to 'Register APO', new_apo_path, class: 'dropdown-item' %>
<% end %>
<%= link_to 'Agreement', new_agreement_path, class: 'dropdown-item' %>
</div>
</li>
</ul>
</div>
</div>
Expand All @@ -88,10 +46,10 @@
<%= link_to 'Argo', root_path, class: 'nav-link' %>
</div>
</div>
<div class="col-md-4 d-none d-md-block">
<div class="col-md-4">
<nav
class="navbar navbar-expand d-flex justify-content-end"
aria-label="browse">
class="navbar collapse navbar-collapse justify-content-md-end navbar-expand-md d-md-flex"
aria-label="browse" id="user-util-collapse">
<ul class="navbar-nav">
<% if session[:groups].present? %>
<li class='dropdown nav-item'>
Expand All @@ -111,15 +69,15 @@
</li>
<% end %>

<li class="nav-item ms-3">
<li class="nav-item ms-md-3">
<%= link_to 'Bulk&nbsp;Action'.html_safe, bulk_actions_path, class: 'nav-link' %>
</li>

<li class="nav-item ms-3">
<li class="nav-item ms-md-3">
<%= link_to 'All&nbsp;Workflows'.html_safe, report_workflow_grid_path, class: 'nav-link' %>
</li>

<li class='nav-item ms-3 dropdown'>
<li class='nav-item me-md-0 dropdown'>
<a href='#' class='nav-link dropdown-toggle' id="registerDropdown" data-bs-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>
Register
<span class='caret'></span>
Expand All @@ -132,6 +90,15 @@
<%= link_to 'Agreement', new_agreement_path, class: 'dropdown-item' %>
</div>
</li>
<hr class="d-md-none d-block">
<li class="nav-item d-md-none d-block">
<%= link_to 'Feedback', 'mailto:[email protected]', class: 'nav-link' %>
</li>
<% if current_user %>
<li class="nav-item d-md-none d-block">
<p class='navbar-text'>Logged in as <%= current_user.to_s.html_safe %></p>
</li>
<% end %>
</ul>
</nav>
</div>
Expand Down

0 comments on commit 2b12dad

Please sign in to comment.