Files
nairobi/app/views/layouts/_admin_header.html.erb
Javi Martín 519a34b1f8 Use the admin header in the management section
Now that we also have the "go back to CONSUL" link, the layouts are so
similar that it isn't worth it maintaining both of them separately.

With this change, people using small screens also get the "menu" button
in the management section, just like they do everywhere else.

We're adding the `namespace != "management"` condition so the menu still
shows up in the officing namespace.
2021-12-15 13:53:56 +01:00

51 lines
1.7 KiB
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="title-bar" data-responsive-toggle="responsive_menu" data-hide-for="medium">
<button class="menu-button" type="button" data-toggle="responsive_menu">
<span class="menu-icon"></span>
<span class="title-bar-title"><%= t("application.menu") %></span>
</button>
</div>
<div class="top-bar">
<div class="top-bar-left">
<% if namespace == "officing" %>
<h1>
<%= link_to "#" do %>
<%= setting["org_name"] %>
<br><small><%= namespaced_header_title %></small>
<% end %>
</h1>
<% else %>
<h1>
<%= link_to namespaced_root_path do %>
<%= setting["org_name"] %>
<br><small><%= namespaced_header_title %></small>
<% end %>
</h1>
<% end %>
</div>
<% if show_admin_menu?(current_user) || namespace != "management" %>
<div id="responsive_menu">
<div class="top-bar-right">
<ul class="menu" data-responsive-menu="medium-dropdown">
<%= render "shared/admin_login_items", current_user: current_user %>
<%= render "layouts/notification_item", current_user: current_user %>
<%= render "devise/menu/login_items", current_user: current_user %>
</ul>
</div>
</div>
<% end %>
</div>
</div>
</header>