We only want to render the account link and login items in the header. And we want only render the Multitenancy and Administrators sections in the admin sidebar. We include the administrators management so it's possible to give permissions to other users to manage tenants. In order to restrict access to other sections by typing the URL or following a link, we're only enabling the rest of the routes when we aren't in the multitenancy management mode.
27 lines
682 B
Plaintext
27 lines
682 B
Plaintext
<header class="header">
|
|
<div class="top-links">
|
|
<%= render Layout::LocaleSwitcherComponent.new %>
|
|
|
|
<% if show_link_to_root_path? %>
|
|
<%= link_to root_path do %>
|
|
<%= t("admin.dashboard.index.back", org: setting["org_name"]) %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<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>
|
|
</header>
|