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)
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

View File

@@ -36,6 +36,7 @@
</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.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.visible_to_valuators") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.list.selected") %></th>

View File

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

View File

@@ -206,7 +206,7 @@ en:
no_valuators_assigned: No valuators assigned
no_valuation_groups: No valuation groups assigned
feasibility:
feasible: "Feasible (%{price})"
feasible: "Feasible"
unfeasible: "Unfeasible"
undecided: "Undecided"
selected: "Selected"
@@ -225,6 +225,7 @@ en:
visible_to_valuators: Show to valuators
author_username: Author username
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
see_results: "See results"
show:

View File

@@ -206,7 +206,7 @@ es:
no_valuators_assigned: Sin evaluador
no_valuation_groups: Sin grupos evaluadores
feasibility:
feasible: "Viable (%{price})"
feasible: "Viable"
unfeasible: "Inviable"
undecided: "Sin decidir"
selected: "Seleccionado"
@@ -225,6 +225,7 @@ es:
visible_to_valuators: Mostrar a evaluadores
author_username: Usuario autor
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
see_results: "Ver resultados"
show: