Merge pull request #1930 from consul/admin-filters

Admin filters
This commit is contained in:
BertoCQ
2017-09-27 18:17:44 +02:00
committed by GitHub
4 changed files with 31 additions and 10 deletions

View File

@@ -174,10 +174,19 @@ $sidebar-active: #f4fcd0;
max-width: none;
}
.menu.simple .active {
border-bottom: 2px solid $admin-color;
color: $admin-color;
font-weight: bold;
.menu.simple {
margin-bottom: $line-height / 2;
h2 {
font-weight: bold;
margin-bottom: $line-height / 3;
}
.active {
border-bottom: 2px solid $admin-color;
color: $admin-color;
font-weight: bold;
}
}
.tabs-panel {

View File

@@ -1,8 +1,10 @@
<ul class="menu simple clear" id="assigned-resources-tabs">
<% if controller_name == "polls" %>
<li class="active">
<h2>
<%= t("admin.polls.show.questions_tab") %>
(<%= @poll.questions.count %>)
</h2>
</li>
<% else %>
<li>
@@ -15,8 +17,10 @@
<% if controller_name == "booth_assignments" %>
<li class="active">
<%= t("admin.polls.show.booths_tab") %>
(<%= @poll.booth_assignments.select(:booth_id).distinct.count %>)
<h2>
<%= t("admin.polls.show.booths_tab") %>
(<%= @poll.booth_assignments.select(:booth_id).distinct.count %>)
</h2>
</li>
<% else %>
<li>
@@ -29,8 +33,10 @@
<% if controller_name == "officer_assignments" %>
<li class="active">
<%= t("admin.polls.show.officers_tab") %>
(<%= @poll.officer_assignments.select(:officer_id).distinct.count %>)
<h2>
<%= t("admin.polls.show.officers_tab") %>
(<%= @poll.officer_assignments.select(:officer_id).distinct.count %>)
</h2>
</li>
<% else %>
<li>
@@ -43,7 +49,9 @@
<% if controller_name == "recounts" %>
<li class="active">
<%= t("admin.polls.show.recounts_tab") %>
<h2>
<%= t("admin.polls.show.recounts_tab") %>
</h2>
</li>
<% else %>
<li>
@@ -53,7 +61,9 @@
<% if controller_name == "results" %>
<li class="active">
<%= t("admin.polls.show.results_tab") %>
<h2>
<%= t("admin.polls.show.results_tab") %>
</h2>
</li>
<% else %>
<li>

View File

@@ -66,6 +66,7 @@ en:
index:
title: Participatory budgets
new_link: Create new budget
filter: Filter
filters:
current: Open
finished: Finished

View File

@@ -66,6 +66,7 @@ es:
index:
title: Presupuestos participativos
new_link: Crear nuevo presupuesto
filter: Filtro
filters:
current: Abiertos
finished: Terminados