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.
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
<header>
|
|
<% if display_remote_translation_info?(@remote_translations, I18n.locale) %>
|
|
<%= render "shared/remote_translations_button", remote_translations: @remote_translations %>
|
|
<% end %>
|
|
|
|
<div class="top-links">
|
|
<%= render "shared/locale_switcher" %>
|
|
<div class="hide-for-small-only">
|
|
<%= render "shared/top_links" %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="top-bar">
|
|
<h1>
|
|
<%= link_to root_path, accesskey: "0" do %>
|
|
<%= image_tag(image_path_for("logo_header.png"), alt: setting["org_name"]) %>
|
|
<% end %>
|
|
</h1>
|
|
|
|
<%= render Layout::ResponsiveMenuComponent.new do %>
|
|
<%= render Layout::AccountMenuComponent.new(current_user) %>
|
|
|
|
<div class="show-for-small-only">
|
|
<div class="subnavigation subnavigation-with-top-links">
|
|
<%= render Layout::SubnavigationComponent.new %>
|
|
<%= render "shared/top_links" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div id="navigation_bar" class="subnavigation">
|
|
<div class="hide-for-small-only">
|
|
<%= render Layout::SubnavigationComponent.new %>
|
|
</div>
|
|
|
|
<%= yield :header_addon %>
|
|
</div>
|
|
</header>
|