Render winner investments under 'Executions' tab
This commit is contained in:
17
app/views/budgets/executions/_investments.html.erb
Normal file
17
app/views/budgets/executions/_investments.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<div>
|
||||
<% @headings.each do |heading| %>
|
||||
<b><%= heading.name %></b>
|
||||
<% heading.investments.selected.sort_by_ballots.joins(:milestones).each do |investment| %>
|
||||
<div>
|
||||
<% if investment.image.present? %>
|
||||
<%= image_tag investment.image_url(:thumb), alt: investment.image.title %>
|
||||
<% else %>
|
||||
<%= image_tag Rails.root.join('/budget_execution_no_image.jpg'), alt: investment.title %>
|
||||
<% end %>
|
||||
<%= investment.title %>
|
||||
<%= investment.author.name %>
|
||||
<%= investment.formatted_price %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -61,5 +61,7 @@
|
||||
), class: "js-submit-on-change", prompt: t("budgets.executions.filters.all") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render 'budgets/executions/investments' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user