Adds ballot booths menu on admin
This commit is contained in:
@@ -21,7 +21,11 @@ module AdminHelper
|
||||
end
|
||||
|
||||
def menu_polls?
|
||||
%w[polls questions officers booths officer_assignments booth_assignments recounts results shifts questions answers].include?(controller_name)
|
||||
%w[polls questions answers].include?(controller_name)
|
||||
end
|
||||
|
||||
def menu_booths?
|
||||
%w[officers booths officer_assignments booth_assignments recounts results shifts].include?(controller_name)
|
||||
end
|
||||
|
||||
def menu_profiles?
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
<strong><%= t("admin.menu.title_polls") %></strong>
|
||||
</a>
|
||||
<ul id="polls_menu" <%= "class=is-active" if menu_polls? || controller.class.parent == Admin::Poll::Questions::Answers %>>
|
||||
<li <%= "class=is-active" if controller_name == "polls" && action_name != "booth_assignments" ||
|
||||
%w(booth_assignments officer_assignments recounts results).include?(controller_name) %>>
|
||||
<li <%= "class=is-active" if controller_name == "polls" && action_name != "booth_assignments" %>>
|
||||
<%= link_to t("admin.menu.polls"), admin_polls_path %>
|
||||
</li>
|
||||
|
||||
@@ -16,7 +15,16 @@
|
||||
controller.class.parent == Admin::Poll::Questions::Answers %>>
|
||||
<%= link_to t("admin.menu.poll_questions"), admin_questions_path %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li class="section-title">
|
||||
<a href="#">
|
||||
<span class="icon-box"></span>
|
||||
<strong><%= t("admin.menu.title_booths") %></strong>
|
||||
</a>
|
||||
<ul id="booths_menu" <%= "class=is-active" if menu_booths? || controller_name == "polls" && action_name == "booth_assignments" %>>
|
||||
<li <%= "class=is-active" if controller_name == "officers" %>>
|
||||
<%= link_to t("admin.menu.poll_officers"), admin_officers_path %>
|
||||
</li>
|
||||
@@ -37,7 +45,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if feature?(:legislation) %>
|
||||
<li class="section-title <%= "is-active" if controller.class.parent == Admin::Legislation %>">
|
||||
|
||||
@@ -534,6 +534,7 @@ en:
|
||||
title_profiles: Profiles
|
||||
title_settings: Settings
|
||||
title_site_customization: Site content
|
||||
title_booths: Voting booths
|
||||
legislation: Collaborative Legislation
|
||||
users: Users
|
||||
administrators:
|
||||
|
||||
@@ -534,6 +534,7 @@ es:
|
||||
title_profiles: Perfiles
|
||||
title_settings: Configuración
|
||||
title_site_customization: Contenido del sitio
|
||||
title_booths: Urnas de votación
|
||||
legislation: Legislación colaborativa
|
||||
users: Usuarios
|
||||
administrators:
|
||||
|
||||
Reference in New Issue
Block a user