Files
nairobi/app/components/budgets/investment_component.html.erb
Javi Martín 8b1e48b4ea Fix duplicate support_title I18n key
The key was declared twice and so the first one ("Support this project")
was overwritten.

We're grouping all keys related to the investment list together in order
to reduce the chances of this issue happening again (or, at least, in
this part of the code).
2021-06-12 13:20:39 +02:00

34 lines
1.4 KiB
Plaintext

<div id="<%= dom_id(investment) %>" class="investments-list-item">
<% if investment.image.present? %>
<%= image_tag investment.image_url(:large), alt: investment.image.title.unicode_normalize %>
<% else %>
<%= image_tag "budget_investment_no_image.jpg", alt: investment.title %>
<% end %>
<% if investment.should_show_vote_count? || investment.should_show_price? %>
<div class="supports-and-price">
<% if investment.should_show_vote_count? %>
<span class="supports-title"><%= t("budgets.investments_list.investment.supports") %></span>
<strong><%= investment.total_votes %></strong>
<% end %>
<% if investment.should_show_price? %>
<span class="price-title"><%= t("budgets.investments_list.investment.price") %></span>
<strong><%= investment.formatted_price %></strong>
<% end %>
</div>
<% end %>
<div class="budget-investment-content">
<% cache [locale_and_user_status(investment), "index", investment, investment.author] do %>
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
<%= render Budgets::Investments::InfoComponent.new(investment) %>
<%= link_to namespaced_budget_investment_path(investment), class: "read-more" do %>
<small><%= t("budgets.investments_list.investment.read_more") %></small>
<% end %>
<% end %>
</div>
</div>