Budget investments cannot be edited when budget is finished. Only milestones can be managed.
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
<%= investment.valuation_finished? ? t('shared.yes'): t('shared.no') %>
|
||||
</td>
|
||||
<td class="small">
|
||||
<% unless investment.budget.finished? %>
|
||||
<% if investment.selected? %>
|
||||
<%= link_to toggle_selection_admin_budget_budget_investment_path(@budget,
|
||||
investment,
|
||||
@@ -76,6 +77,7 @@
|
||||
<%= t("admin.budget_investments.index.select") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% if params[:filter] == 'selected' %>
|
||||
<td class="small text-center">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<%= link_to t("admin.budget_investments.show.edit"),
|
||||
edit_admin_budget_budget_investment_path(@budget, @investment,
|
||||
Budget::Investment.filter_params(params)) %>
|
||||
Budget::Investment.filter_params(params)) unless @budget.finished? %>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<p>
|
||||
<%= link_to t("admin.budget_investments.show.edit_classification"),
|
||||
edit_admin_budget_budget_investment_path(@budget, @investment,
|
||||
{anchor: 'classification'}.merge(Budget::Investment.filter_params(params))) %>
|
||||
{anchor: 'classification'}.merge(Budget::Investment.filter_params(params))) unless @budget.finished? %>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
@@ -44,7 +44,7 @@
|
||||
<%= render 'valuation/budget_investments/written_by_valuators' %>
|
||||
|
||||
<p>
|
||||
<%= link_to t("admin.budget_investments.show.edit_dossier"), edit_valuation_budget_budget_investment_path(@budget, @investment) %>
|
||||
<%= link_to t("admin.budget_investments.show.edit_dossier"), edit_valuation_budget_budget_investment_path(@budget, @investment) unless @budget.finished? %>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
Reference in New Issue
Block a user