Files
nairobi/app/views/valuation/budget_investments/edit.html.erb
Javi Martín 911fe4e481 Simplify calls to render partial
We're also adding a bit of consistency, since most of our calls to
partial rendering omit the `partial` and `locals` keys.
2019-09-04 15:00:36 +02:00

42 lines
1.5 KiB
Plaintext

<%= link_to valuation_budget_budget_investment_path(@budget, @investment), class: "back" do %>
<span class="icon-angle-left"></span>
<%= "#{t("valuation.budget_investments.show.title")} #{@investment.id}" %>
<% end %>
<h2><%= t("valuation.budget_investments.edit.dossier") %></h2>
<% if can?(:valuate, @investment) && can?(:edit_dossier, @investment) %>
<%= render "/valuation/budget_investments/dossier_form", investment: @investment %>
<% else %>
<%= render "/valuation/budget_investments/dossier_detail", investment: @investment %>
<% end %>
<%= render "valuation/budget_investments/valuation_comments" %>
<h2><%= t("valuation.budget_investments.show.preview") %></h2>
<hr>
<%= render "/budgets/investments/investment_detail", investment: @investment, preview: true %>
<hr>
<h2><%= t("valuation.budget_investments.show.responsibles") %></h2>
<p><strong><%= t("valuation.budget_investments.show.assigned_admin") %>:</strong>
<% if @investment.administrator.present? %>
<%= @investment.administrator.name %> (<%= @investment.administrator.email %>)
<% else %>
<%= t("valuation.budget_investments.show.undefined") %>
<% end %>
</p>
<p><strong><%= t("valuation.budget_investments.show.assigned_valuators") %>:</strong></p>
<div id="assigned_valuators">
<ul>
<% @investment.valuators.each do |valuator| %>
<li><%= valuator.name %> (<%= valuator.email %>)</li>
<% end %>
<% if @investment.valuators.empty? %>
<li><%= t("valuation.budget_investments.show.undefined") %></li>
<% end %>
</ul>
</div>