Render winner investments under 'Executions' tab

This commit is contained in:
Angel Perez
2018-07-02 22:34:41 -04:00
committed by Javi Martín
parent 5de74ea6f1
commit 2a3ce0b182
2 changed files with 19 additions and 0 deletions

View 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>

View File

@@ -61,5 +61,7 @@
), class: "js-submit-on-change", prompt: t("budgets.executions.filters.all") %>
</div>
<% end %>
<%= render 'budgets/executions/investments' %>
</div>
</div>