Merge pull request #2342 from wairbut-m2c/iagirre-budgets-column-show-valuators

Budget: add column show to valuators
This commit is contained in:
Alberto
2018-04-30 17:49:15 +02:00
committed by GitHub
13 changed files with 193 additions and 23 deletions

View File

@@ -28,8 +28,14 @@
<th><%= t("admin.budget_investments.index.table_geozone") %></th>
<th><%= t("admin.budget_investments.index.table_feasibility") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_valuation_finished") %></th>
<th class="text-center"><%= t("admin.budget_investments.index.table_selection") %></th>
<% if params[:filter] == "selected" %>
<th class="text-center">
<% if params[:filter] == "under_valuation" %>
<%= t("admin.budget_investments.index.table_evaluation") %>
<% else %>
<%= t("admin.budget_investments.index.table_selection") %>
<% end %>
</th>
<% if params[:filter] == "selected" %>
<th class="text-center"><%= t("admin.budget_investments.index.table_incompatible") %></th>
<% end %>
</tr>
@@ -78,7 +84,15 @@
<td class="small text-center">
<%= investment.valuation_finished? ? t("shared.yes"): t("shared.no") %>
</td>
<td class="small">
<td class="small text-center">
<% if params[:filter] == "under_valuation" %>
<%= form_for [:admin, investment.budget, investment], remote: true do |f| %>
<%= f.check_box :visible_to_valuators,
label: false,
class: "js-submit-on-change",
id: "budget_investment_visible_to_valuators" %>
<% end %>
<% else %>
<% if investment.selected? %>
<%= link_to_unless investment.budget.finished?,
t("admin.budget_investments.index.selected"),
@@ -106,6 +120,7 @@
remote: true,
class: "button small hollow expanded" %>
<% end %>
<% end %>
</td>
<% if params[:filter] == "selected" %>
<td class="small text-center">