Add new admin budget investments advanced filter for max supports

This commit is contained in:
lalo
2019-04-03 13:39:59 +02:00
parent f9e4c86871
commit 9edaf44b9c
5 changed files with 14 additions and 5 deletions

View File

@@ -58,6 +58,10 @@ class Budget::Investment::Exporter
def price(investment) def price(investment)
price_string = "admin.budget_investments.index.feasibility.#{investment.feasibility}" price_string = "admin.budget_investments.index.feasibility.#{investment.feasibility}"
I18n.t(price_string, price: investment.formatted_price) if investment.feasible?
"#{I18n.t(price_string)} (#{investment.formatted_price})"
else
I18n.t(price_string)
end
end end
end end

View File

@@ -36,6 +36,7 @@
</th> </th>
<th><%= t("admin.budget_investments.index.list.geozone") %></th> <th><%= t("admin.budget_investments.index.list.geozone") %></th>
<th><%= t("admin.budget_investments.index.list.feasibility") %></th> <th><%= t("admin.budget_investments.index.list.feasibility") %></th>
<th><%= t("admin.budget_investments.index.list.price") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.valuation_finished") %></th> <th class="text-center"><%= t("admin.budget_investments.index.list.valuation_finished") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.visible_to_valuators") %></th> <th class="text-center"><%= t("admin.budget_investments.index.list.visible_to_valuators") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.selected") %></th> <th class="text-center"><%= t("admin.budget_investments.index.list.selected") %></th>

View File

@@ -31,8 +31,10 @@
<%= investment.heading.name %> <%= investment.heading.name %>
</td> </td>
<td class="small"> <td class="small">
<%= t("admin.budget_investments.index.feasibility.#{investment.feasibility}", <%= t("admin.budget_investments.index.feasibility.#{investment.feasibility}") %>
price: investment.formatted_price) %> </td>
<td class="small">
<%= investment.formatted_price %>
</td> </td>
<td class="small text-center"> <td class="small text-center">
<%= investment.valuation_finished? ? t("shared.yes"): t("shared.no") %> <%= investment.valuation_finished? ? t("shared.yes"): t("shared.no") %>

View File

@@ -206,7 +206,7 @@ en:
no_valuators_assigned: No valuators assigned no_valuators_assigned: No valuators assigned
no_valuation_groups: No valuation groups assigned no_valuation_groups: No valuation groups assigned
feasibility: feasibility:
feasible: "Feasible (%{price})" feasible: "Feasible"
unfeasible: "Unfeasible" unfeasible: "Unfeasible"
undecided: "Undecided" undecided: "Undecided"
selected: "Selected" selected: "Selected"
@@ -225,6 +225,7 @@ en:
visible_to_valuators: Show to valuators visible_to_valuators: Show to valuators
author_username: Author username author_username: Author username
incompatible: Incompatible incompatible: Incompatible
price: Price
cannot_calculate_winners: The budget has to stay on phase "Balloting projects", "Reviewing Ballots" or "Finished budget" in order to calculate winners projects cannot_calculate_winners: The budget has to stay on phase "Balloting projects", "Reviewing Ballots" or "Finished budget" in order to calculate winners projects
see_results: "See results" see_results: "See results"
show: show:

View File

@@ -206,7 +206,7 @@ es:
no_valuators_assigned: Sin evaluador no_valuators_assigned: Sin evaluador
no_valuation_groups: Sin grupos evaluadores no_valuation_groups: Sin grupos evaluadores
feasibility: feasibility:
feasible: "Viable (%{price})" feasible: "Viable"
unfeasible: "Inviable" unfeasible: "Inviable"
undecided: "Sin decidir" undecided: "Sin decidir"
selected: "Seleccionado" selected: "Seleccionado"
@@ -225,6 +225,7 @@ es:
visible_to_valuators: Mostrar a evaluadores visible_to_valuators: Mostrar a evaluadores
author_username: Usuario autor author_username: Usuario autor
incompatible: Incompatible incompatible: Incompatible
price: Precio
cannot_calculate_winners: El presupuesto debe estar en las fases "Votación final", "Votación finalizada" o "Resultados" para poder calcular las propuestas ganadoras cannot_calculate_winners: El presupuesto debe estar en las fases "Votación final", "Votación finalizada" o "Resultados" para poder calcular las propuestas ganadoras
see_results: "Ver resultados" see_results: "Ver resultados"
show: show: