This way we make it easier to modify. Note that, since the title of the page is "Administration" and it's in the "Admin" section, we're adding an option to the `header` method in order to avoid having a confusing title like "Administration - Admin". Also note that, by removing the `title` HTML class, we avoid inheriting styles from the `dashboard.scss` stylesheet, and now the heading is displayed in the position it was meant to. Finally, the concept of using a `main-class` for the current page comes from a branch (currently in development) which will replace the <div> tag with the `admin-content` class with a `main` tag.
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
<!DOCTYPE html>
|
|
<html <%= common_html_attributes %>>
|
|
<head>
|
|
<%= render "layouts/common_head", default_title: "Admin" %>
|
|
<%= content_for :head %>
|
|
</head>
|
|
|
|
<body class="admin">
|
|
<%= render Layout::AdminHeaderComponent.new(current_user) %>
|
|
|
|
<div class="menu-and-content">
|
|
<%= check_box_tag :show_menu, nil, false, role: "switch" %>
|
|
|
|
<nav id="side_menu" class="admin-sidebar">
|
|
<% if namespace == "admin" %>
|
|
<%= render Admin::MenuComponent.new %>
|
|
<% elsif namespace == "sdg_management" %>
|
|
<%= render SDGManagement::MenuComponent.new %>
|
|
<% else %>
|
|
<%= render "/#{namespace}/menu" %>
|
|
<% end %>
|
|
</nav>
|
|
|
|
<div class="admin-content <%= yield(:main_class) %>">
|
|
<%= label_tag :show_menu, t("admin.menu.admin"),
|
|
"aria-hidden": true, class: "button hollow expanded" %>
|
|
|
|
<%= render "layouts/flash" %>
|
|
<%= render "layouts/officing_booth" if controller.class.module_parent == Officing && session[:booth_id].present? %>
|
|
<%= yield %>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|