Files
nairobi/app/views/budgets/executions/_investments.html.erb
Javi Martín f0ab7bcfcc Move executions image partial to a component
This way it'll be easier to write tests for it. We also get rid of
another helper file :).
2022-08-03 17:01:57 +02:00

26 lines
1.1 KiB
Plaintext

<% @investments_by_heading.each do |heading, investments| %>
<h4 id="<%= heading.name.parameterize %>">
<%= heading.name %> (<%= investments.count %>)
</h4>
<div class="row" data-equalizer-on="medium" data-equalizer>
<% investments.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 %>
<%= render Budgets::Executions::ImageComponent.new(investment) %>
<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 %>