Make management layout similar to admin layout

The <main> tag was including the navigation, and now we use the same
flex layout, making it more accessible for mobile phone users.

I'm not sure the <main> tag should actually include the account info and
the flash message. I'm keeping it like this in order to keep the layout
the way it was.
This commit is contained in:
Javi Martín
2020-05-09 00:21:12 +02:00
parent 125106f9c0
commit a293dc013d
3 changed files with 43 additions and 43 deletions

View File

@@ -648,7 +648,7 @@ code {
border-radius: rem-calc(3); border-radius: rem-calc(3);
font-size: rem-calc(16); font-size: rem-calc(16);
font-weight: normal; font-weight: normal;
margin: $line-height; margin-bottom: $line-height;
padding: $line-height / 2; padding: $line-height / 2;
strong { strong {

View File

@@ -45,18 +45,21 @@
</div> </div>
</header> </header>
<main class="no-margin-top row expanded collapse"> <div class="menu-and-content no-margin-top">
<div class="small-12 medium-3 column admin-sidebar"> <%= check_box_tag :show_menu, nil, false, role: "switch" %>
<nav class="admin-sidebar">
<%= render "/management/menu" %> <%= render "/management/menu" %>
</div> </nav>
<%= render "management/account_info" %> <main class="admin-content">
<%= label_tag :show_menu, t("admin.menu.admin"),
"aria-hidden": true, class: "button hollow expanded" %>
<div class="admin-content small-12 medium-9 column"> <%= render "management/account_info" %>
<%= render "layouts/flash" %> <%= render "layouts/flash" %>
<%= yield %> <%= yield %>
</div> </main>
</main> </div>
</body> </body>
</html> </html>

View File

@@ -1,43 +1,40 @@
<% if managed_user.document_number.present? %> <% if managed_user.document_number.present? %>
<section class="small-12 medium-9 column"> <section class="account-info">
<div class="account-info"> <%= link_to(t("management.account_info.change_user"),
logout_management_users_path,
<%= link_to(t("management.account_info.change_user"), method: :delete,
logout_management_users_path, class: "float-right btchange-user button hollow") %>
method: :delete,
class: "float-right btchange-user button hollow") %>
<% if managed_user.level_two_or_three_verified? %>
<p>
<strong>
<%= t("management.account_info.identified_label") %>
</strong>
</p>
<% end %>
<% if managed_user.username.present? %>
<p>
<%= t("management.account_info.username_label") %>
<strong><%= managed_user.username %></strong>
</p>
<% end %>
<% if managed_user.email.present? %>
<p>
<%= t("management.account_info.email_label") %>
<strong><%= managed_user.email %></strong>
</p>
<% end %>
<% if managed_user.level_two_or_three_verified? %>
<p> <p>
<%= t("management.account_info.document_type_label") %> <strong>
<strong><%= humanize_document_type(managed_user.document_type) %></strong> <%= t("management.account_info.identified_label") %>
</strong>
</p> </p>
<% end %>
<% if managed_user.username.present? %>
<p> <p>
<%= t("management.account_info.document_number_label") %> <%= t("management.account_info.username_label") %>
<strong><%= managed_user.document_number %></strong> <strong><%= managed_user.username %></strong>
</p> </p>
</div> <% end %>
<% if managed_user.email.present? %>
<p>
<%= t("management.account_info.email_label") %>
<strong><%= managed_user.email %></strong>
</p>
<% end %>
<p>
<%= t("management.account_info.document_type_label") %>
<strong><%= humanize_document_type(managed_user.document_type) %></strong>
</p>
<p>
<%= t("management.account_info.document_number_label") %>
<strong><%= managed_user.document_number %></strong>
</p>
</section> </section>
<% end %> <% end %>