improves styles for budget investments advanced filters
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
// 07. Legislation
|
// 07. Legislation
|
||||||
// 08. CMS
|
// 08. CMS
|
||||||
// 09. Map
|
// 09. Map
|
||||||
// 10. Budget phases
|
// 10. Budgets
|
||||||
//
|
//
|
||||||
|
|
||||||
// 01. Global styles
|
// 01. Global styles
|
||||||
@@ -1034,8 +1034,33 @@ table {
|
|||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 10. Budget phases
|
// 10. Budgets
|
||||||
// -----------------
|
// -----------------
|
||||||
|
|
||||||
|
.advanced-filters {
|
||||||
|
margin: $line-height 0;
|
||||||
|
|
||||||
|
@include breakpoint(medium) {
|
||||||
|
margin: $line-height / 2 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.advanced-filters-content {
|
||||||
|
background: $highlight;
|
||||||
|
clear: both;
|
||||||
|
padding: $line-height / 2;
|
||||||
|
margin: $line-height 0;
|
||||||
|
|
||||||
|
.filter {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 $line-height / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
margin-top: $line-height / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.budget-phase-enabled {
|
.budget-phase-enabled {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding-left: rem-calc(20);
|
padding-left: rem-calc(20);
|
||||||
|
|||||||
@@ -1,27 +1,44 @@
|
|||||||
<div id="advanced-filters" class="callout primary">
|
<%= link_to "#advanced_filters_content",
|
||||||
|
data: {toggle: "advanced_filters"},
|
||||||
|
class: "advanced-filters float-right" do %>
|
||||||
|
<%= t("admin.budget_investments.index.advanced_filters") %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div id="advanced_filters" class="row expanded advanced-filters-content hide" data-toggler=".hide">
|
||||||
<%= form_tag(admin_budget_budget_investments_path(budget: @budget,
|
<%= form_tag(admin_budget_budget_investments_path(budget: @budget,
|
||||||
filter: params[:filter],
|
filter: params[:filter],
|
||||||
second_filter: params[:second_filter],
|
second_filter: params[:second_filter],
|
||||||
max_per_heading: params[:max_per_heading],
|
max_per_heading: params[:max_per_heading],
|
||||||
page: 1), method: :get, remote: true, enforce_utf8: false) do %>
|
page: 1), method: :get, remote: true, enforce_utf8: false) do %>
|
||||||
|
<div class="small-12 medium-8 large-10 column">
|
||||||
|
<span class="filter">
|
||||||
|
<%= check_box_tag :second_filter, "feasible" %>
|
||||||
|
<%= t("#{i18n_namespace}.filters.feasible") %>
|
||||||
|
</span>
|
||||||
|
|
||||||
<%= check_box_tag :second_filter, "feasible" %>
|
<span class="filter">
|
||||||
<%= t("#{i18n_namespace}.filters.feasible") %>
|
<%= check_box_tag :second_filter, "selected" %>
|
||||||
|
<%= t("#{i18n_namespace}.filters.selected") %>
|
||||||
|
</span>
|
||||||
|
|
||||||
<%= check_box_tag :second_filter, "selected" %>
|
<span class="filter">
|
||||||
<%= t("#{i18n_namespace}.filters.selected") %>
|
<%= check_box_tag :second_filter, "undecided" %>
|
||||||
|
<%= t("#{i18n_namespace}.filters.undecided") %>
|
||||||
|
</span>
|
||||||
|
|
||||||
<%= check_box_tag :second_filter, "undecided" %>
|
<span class="filter">
|
||||||
<%= t("#{i18n_namespace}.filters.undecided") %>
|
<%= check_box_tag :second_filter, "unfeasible" %>
|
||||||
|
<%= t("#{i18n_namespace}.filters.unfeasible") %>
|
||||||
|
</span>
|
||||||
|
|
||||||
<%= check_box_tag :second_filter, "unfeasible" %>
|
<span class="filter">
|
||||||
<%= t("#{i18n_namespace}.filters.unfeasible") %>
|
<strong><%= t("#{i18n_namespace}.filters.max_per_heading") %></strong>
|
||||||
|
<%= text_field_tag :max_per_heading %>
|
||||||
<div class="large-1">
|
</span>
|
||||||
<%= text_field_tag :max_per_heading %>
|
|
||||||
<%= t("#{i18n_namespace}.filters.max_per_heading") %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag t("#{i18n_namespace}.filters.button"), class: "button small float-right" %>
|
<div class="small-12 medium-4 large-2 column">
|
||||||
|
<%= submit_tag t("#{i18n_namespace}.filters.button"), class: "button expanded" %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,40 +1,38 @@
|
|||||||
<h2 class="inline-block"><%= @budget.name %> - <%= t("admin.budget_investments.index.title") %></h2>
|
<h2 class="inline-block"><%= @budget.name %> - <%= t("admin.budget_investments.index.title") %></h2>
|
||||||
|
|
||||||
<div class="row margin">
|
<%= form_tag(admin_budget_budget_investments_path(budget: @budget), method: :get, enforce_utf8: false) do %>
|
||||||
<%= form_tag(admin_budget_budget_investments_path(budget: @budget), method: :get, enforce_utf8: false) do %>
|
<div class="small-12 medium-3 column">
|
||||||
<div class="small-12 medium-3 column">
|
<%= select_tag :administrator_id,
|
||||||
<%= select_tag :administrator_id,
|
options_for_select(admin_select_options, params[:administrator_id]),
|
||||||
options_for_select(admin_select_options, params[:administrator_id]),
|
{ prompt: t("admin.budget_investments.index.administrator_filter_all"),
|
||||||
{ prompt: t("admin.budget_investments.index.administrator_filter_all"),
|
label: false,
|
||||||
label: false,
|
class: "js-submit-on-change" } %>
|
||||||
class: "js-submit-on-change" } %>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="small-12 medium-3 column">
|
<div class="small-12 medium-3 column">
|
||||||
<%= select_tag :valuator_id,
|
<%= select_tag :valuator_id,
|
||||||
options_for_select(valuator_select_options, params[:valuator_id]),
|
options_for_select(valuator_select_options, params[:valuator_id]),
|
||||||
{ prompt: t("admin.budget_investments.index.valuator_filter_all"),
|
{ prompt: t("admin.budget_investments.index.valuator_filter_all"),
|
||||||
label: false,
|
label: false,
|
||||||
class: "js-submit-on-change" } %>
|
class: "js-submit-on-change" } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="small-12 medium-3 column">
|
<div class="small-12 medium-3 column">
|
||||||
<%= select_tag :heading_id,
|
<%= select_tag :heading_id,
|
||||||
options_for_select(budget_heading_select_options(@budget), params[:heading_id]),
|
options_for_select(budget_heading_select_options(@budget), params[:heading_id]),
|
||||||
{ prompt: t("admin.budget_investments.index.heading_filter_all"),
|
{ prompt: t("admin.budget_investments.index.heading_filter_all"),
|
||||||
label: false,
|
label: false,
|
||||||
class: "js-submit-on-change" } %>
|
class: "js-submit-on-change" } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="small-12 medium-3 column">
|
<div class="small-12 medium-3 column">
|
||||||
<%= select_tag :tag_name,
|
<%= select_tag :tag_name,
|
||||||
options_for_select(investment_tags_select_options, params[:tag_name]),
|
options_for_select(investment_tags_select_options, params[:tag_name]),
|
||||||
{ prompt: t("admin.budget_investments.index.tags_filter_all"),
|
{ prompt: t("admin.budget_investments.index.tags_filter_all"),
|
||||||
label: false,
|
label: false,
|
||||||
class: "js-submit-on-change" } %>
|
class: "js-submit-on-change" } %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= render "advanced_filters", i18n_namespace: "admin.budget_investments.index" %>
|
<%= render "advanced_filters", i18n_namespace: "admin.budget_investments.index" %>
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ en:
|
|||||||
administrator_filter_all: All administrators
|
administrator_filter_all: All administrators
|
||||||
valuator_filter_all: All valuators
|
valuator_filter_all: All valuators
|
||||||
tags_filter_all: All tags
|
tags_filter_all: All tags
|
||||||
|
advanced_filters: Advanced filters
|
||||||
filters:
|
filters:
|
||||||
all: All
|
all: All
|
||||||
without_admin: Without assigned admin
|
without_admin: Without assigned admin
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ es:
|
|||||||
administrator_filter_all: Todos los administradores
|
administrator_filter_all: Todos los administradores
|
||||||
valuator_filter_all: Todos los evaluadores
|
valuator_filter_all: Todos los evaluadores
|
||||||
tags_filter_all: Todas las etiquetas
|
tags_filter_all: Todas las etiquetas
|
||||||
|
advanced_filters: Filtros avanzados
|
||||||
filters:
|
filters:
|
||||||
all: Todos
|
all: Todos
|
||||||
without_admin: Sin administrador
|
without_admin: Sin administrador
|
||||||
|
|||||||
Reference in New Issue
Block a user