34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
<% @headings.each do |heading| %>
|
|
<h4 id="<%= heading.name.parameterize %>">
|
|
<%= heading.name %>
|
|
</h4>
|
|
<div class="row" data-equalizer-on="medium" data-equalizer>
|
|
<% winner_investments(heading).each do |investment| %>
|
|
<div class="small-12 medium-6 large-4 column end margin-bottom">
|
|
<div class="budget-execution">
|
|
<%= link_to budget_investment_path(@budget, investment, anchor: "tab-milestones"), data: { 'equalizer-watch': true } do %>
|
|
<% investment.milestones.order(publication_date: :desc).limit(1).each do |milestone| %>
|
|
<% if milestone.image.present? %>
|
|
<%= image_tag milestone.image_url(:large), alt: milestone.image.title %>
|
|
<% elsif 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 %>
|
|
<% end %>
|
|
<div class="budget-execution-info">
|
|
<div class="budget-execution-content">
|
|
<h5><%= investment.title %></h5>
|
|
<span class="author"><%= investment.author.name %></span>
|
|
</div>
|
|
<p class="price margin-top text-center">
|
|
<strong><%= investment.formatted_price %></strong>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|