We were using the same code for the button in both the public and admin headers, so we're removing the duplication. Since the menu and the button must go together, and the contents of the menu are different for different layouts, we're passing these contents using a block. Note the ID of the menu was `responsive-menu` in the public section but `responsive_menu` in the admin section. Since we usually use underscores for IDs and dashes for classes, we're keeping the one with the underscore.
27 lines
692 B
Plaintext
27 lines
692 B
Plaintext
<header class="header">
|
|
<div class="top-links">
|
|
<%= render "shared/locale_switcher" %>
|
|
|
|
<%= link_to root_path do %>
|
|
<%= t("admin.dashboard.index.back", org: setting["org_name"]) %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="expanded row admin-top-bar">
|
|
<div class="top-bar">
|
|
<h1>
|
|
<%= link_to namespace_path do %>
|
|
<%= setting["org_name"] %>
|
|
<br><small><%= namespaced_header_title %></small>
|
|
<% end %>
|
|
</h1>
|
|
|
|
<% if show_account_menu? %>
|
|
<%= render Layout::ResponsiveMenuComponent.new do %>
|
|
<%= render Layout::AccountMenuComponent.new(user) %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</header>
|