Fix typos in admin menu classes
The HTML `class` attribute was declared twice and so the second one was being ignored. In the case of messages, it was "working" properly because the `class=is-active` part is not used on `<li>` tags when they've got a `<ul>` inside them.
This commit is contained in:
@@ -90,13 +90,12 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% messages_sections = %w[newsletters emails_download admin_notifications system_emails] %>
|
<% messages_sections = %w[newsletters emails_download admin_notifications system_emails] %>
|
||||||
<% messages_menu_active = messages_sections.include?(controller_name) %>
|
<li class="section-title">
|
||||||
<li class="section-title" <%= "class=is-active" if messages_menu_active %>>
|
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<span class="icon-zip"></span>
|
<span class="icon-zip"></span>
|
||||||
<strong><%= t("admin.menu.messaging_users") %></strong>
|
<strong><%= t("admin.menu.messaging_users") %></strong>
|
||||||
</a>
|
</a>
|
||||||
<ul id="messaging_users_menu" <%= "class=is-active" if messages_menu_active %>>
|
<ul id="messaging_users_menu" <%= "class=is-active" if messages_sections.include?(controller_name) %>>
|
||||||
<li <%= "class=is-active" if controller_name == "newsletters" %>>
|
<li <%= "class=is-active" if controller_name == "newsletters" %>>
|
||||||
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
|
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
|
||||||
</li>
|
</li>
|
||||||
@@ -221,7 +220,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="section-title" <%= "class=is-active" if controller_name == "stats" %>>
|
<li class="section-title <%= "is-active" if controller_name == "stats" %>">
|
||||||
<%= link_to admin_stats_path do %>
|
<%= link_to admin_stats_path do %>
|
||||||
<span class="icon-stats"></span><%= t("admin.menu.stats") %>
|
<span class="icon-stats"></span><%= t("admin.menu.stats") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user