Use CSS to display icons in the admin menu
This way we simplify the HTML and generating similar menus will be easier. We also improve the experience for screen reader users, who might have been hearing the icons as text because we weren't using the `aria-hidden` attribute. We're still keeping the "icon-" classes for compatibility with CONSUL installations which might have changed this code.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<ul id="admin_menu" data-accordion-menu>
|
||||
<li class="section-title">
|
||||
<a href="#">
|
||||
<span class="icon-user"></span>
|
||||
<%= t("management.menu.users") %>
|
||||
</a>
|
||||
<a href="#" class="users-link"><%= t("management.menu.users") %></a>
|
||||
<ul class="is-active">
|
||||
|
||||
<li <%= "class=is-active" if menu_users? %>>
|
||||
@@ -43,24 +40,15 @@
|
||||
|
||||
<% if Setting["process.budgets"] %>
|
||||
<li <%= "class=is-active" if menu_print_investments? %>>
|
||||
<%= link_to print_investments_management_budgets_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_budget_investments") %>
|
||||
<% end %>
|
||||
<%= link_to t("management.menu.print_budget_investments"), print_investments_management_budgets_path, class: "print-investments-link" %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li <%= "class=is-active" if menu_print_proposals? %>>
|
||||
<%= link_to print_management_proposals_path do %>
|
||||
<span class="icon-print"></span>
|
||||
<%= t("management.menu.print_proposals") %>
|
||||
<% end %>
|
||||
<%= link_to t("management.menu.print_proposals"), print_management_proposals_path, class: "print-proposals-link" %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if menu_user_invites? %>>
|
||||
<%= link_to new_management_user_invite_path do %>
|
||||
<span class="icon-letter"></span>
|
||||
<%= t("management.menu.user_invites") %>
|
||||
<% end %>
|
||||
<%= link_to t("management.menu.user_invites"), new_management_user_invite_path, class: "invitations-link" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user