Move admin index to a component

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.
This commit is contained in:
Javi Martín
2023-10-16 14:17:41 +02:00
parent 0138e5d92c
commit 4435673ace
7 changed files with 21 additions and 10 deletions

View File

@@ -21,7 +21,7 @@
<% end %>
</nav>
<div class="admin-content">
<div class="admin-content <%= yield(:main_class) %>">
<%= label_tag :show_menu, t("admin.menu.admin"),
"aria-hidden": true, class: "button hollow expanded" %>