Merge branch 'master' into budgets-ui
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
class: "float-right small" %>
|
||||
|
||||
<% if @investments.any? %>
|
||||
<h3 class="inline-block"><%= page_entries_info @investments %></h3>
|
||||
<h3><%= page_entries_info @investments %></h3>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -28,14 +29,20 @@
|
||||
<strong><%= investment.id %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to investment.title, admin_budget_budget_investment_path(budget_id: @budget.id, id: investment.id, params: Budget::Investment.filter_params(params)) %>
|
||||
<%= link_to investment.title,
|
||||
admin_budget_budget_investment_path(budget_id: @budget.id,
|
||||
id: investment.id,
|
||||
params: Budget::Investment.filter_params(params)),
|
||||
target: "_blank" %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= investment.total_votes %>
|
||||
</td>
|
||||
<td class="small">
|
||||
<% if investment.administrator.present? %>
|
||||
<span title="<%= t('admin.budget_investments.index.assigned_admin') %>"><%= investment.administrator.name %></span>
|
||||
<span title="<%= t('admin.budget_investments.index.assigned_admin') %>">
|
||||
<%= investment.administrator.name %>
|
||||
</span>
|
||||
<% else %>
|
||||
<%= t("admin.budget_investments.index.no_admin_assigned") %>
|
||||
<% end %>
|
||||
@@ -59,7 +66,27 @@
|
||||
<%= investment.valuation_finished? ? t('shared.yes'): t('shared.no') %>
|
||||
</td>
|
||||
<td class="small">
|
||||
<%= investment_selected_link(investment) %>
|
||||
<% if investment.selected? %>
|
||||
<%= link_to_unless investment.budget.finished?,
|
||||
t("admin.budget_investments.index.selected"),
|
||||
toggle_selection_admin_budget_budget_investment_path(@budget,
|
||||
investment,
|
||||
filter: params[:filter],
|
||||
page: params[:page]),
|
||||
method: :patch,
|
||||
remote: true,
|
||||
class: "button small expanded" %>
|
||||
<% elsif investment.feasible? && investment.valuation_finished? %>
|
||||
<%= link_to_unless investment.budget.finished?,
|
||||
t("admin.budget_investments.index.select"),
|
||||
toggle_selection_admin_budget_budget_investment_path(@budget,
|
||||
investment,
|
||||
filter: params[:filter],
|
||||
page: params[:page]),
|
||||
method: :patch,
|
||||
remote: true,
|
||||
class: "button small hollow expanded" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% if params[:filter] == 'selected' %>
|
||||
<td class="small text-center">
|
||||
|
||||
Reference in New Issue
Block a user