-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
show.html.erb
80 lines (65 loc) · 2.7 KB
/
show.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<%= link_to admin_budget_budget_investments_path(Budget::Investment.filter_params(params).to_h),
class: "back", data: { no_turbolink: true } do %>
<span class="icon-angle-left"></span><%= t("shared.back") %>
<% end %>
<%= render "written_by_author" %>
<h2 class="inline-block"><%= t("admin.budget_investments.show.preview") %></h2>
<% if can?(:admin_update, @investment) %>
<div class="float-right">
<%= link_to t("admin.budget_investments.show.edit"),
edit_admin_budget_budget_investment_path(
@budget,
@investment,
Budget::Investment.filter_params(params).to_h
),
class: "button hollow" %>
</div>
<% end %>
<hr>
<%= render "/budgets/investments/investment_detail", investment: @investment, preview: true %>
<hr>
<h2 id="classification"><%= t("admin.budget_investments.show.classification") %></h2>
<p><strong><%= t("admin.budget_investments.show.assigned_admin") %>:</strong>
<%= @investment.administrator.try(:name_and_email) || t("admin.budget_investments.show.undefined") %>
</p>
<p id="tags">
<strong><%= t("admin.budget_investments.show.tags") %>:</strong>
<%= @investment.valuation_tags.pluck(:name).sort.join(", ") %>
</p>
<p id="assigned_valuator_groups">
<strong><%= t("admin.budget_investments.show.valuator_groups") %>:</strong>
<% if @investment.valuator_groups.any? %>
<%= @investment.valuator_groups.collect(&:name).join(", ") %>
<% else %>
<%= t("admin.budget_investments.show.undefined") %>
<% end %>
</p>
<p id="assigned_valuators">
<strong><%= t("admin.budget_investments.show.assigned_valuators") %>:</strong>
<% if @investment.valuators.any? %>
<%= @investment.valuators.collect(&:name_and_email).join(", ") %>
<% else %>
<%= t("admin.budget_investments.show.undefined") %>
<% end %>
</p>
<% if can?(:admin_update, @investment) %>
<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).to_h)
) %>
</p>
<% end %>
<hr>
<h2><%= t("admin.budget_investments.show.dossier") %></h2>
<%= render "valuation/budget_investments/dossier" %>
<% if can?(:valuate, @investment) %>
<p>
<%= link_to t("admin.budget_investments.show.edit_dossier"), edit_valuation_budget_budget_investment_path(@budget, @investment) %>
</p>
<% end %>
<%= render "valuation/budget_investments/valuation_comments" %>
<%= render "admin/audits/audits", resource: @investment %>
<%= render "admin/milestones/milestones", milestoneable: @investment %>