show price on index/show if feasible && selected
This commit is contained in:
@@ -217,6 +217,12 @@ class Budget
|
|||||||
budget.balloting?
|
budget.balloting?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def should_show_price?
|
||||||
|
feasible? &&
|
||||||
|
selected? &&
|
||||||
|
(budget.reviewing_ballots? || budget.finished?)
|
||||||
|
end
|
||||||
|
|
||||||
def should_show_price_info?
|
def should_show_price_info?
|
||||||
feasible? &&
|
feasible? &&
|
||||||
price_explanation.present? &&
|
price_explanation.present? &&
|
||||||
|
|||||||
@@ -73,6 +73,13 @@
|
|||||||
ballot: ballot
|
ballot: ballot
|
||||||
} %>
|
} %>
|
||||||
</div>
|
</div>
|
||||||
|
<% elsif investment.should_show_price? %>
|
||||||
|
<div id="<%= dom_id(investment) %>_price"
|
||||||
|
class="supports small-12 medium-3 column text-center">
|
||||||
|
<p class="investment-project-amount margin-top">
|
||||||
|
<%= investment.formatted_price %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -98,6 +98,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if investment.should_show_price? %>
|
||||||
|
<div class="sidebar-divider"></div>
|
||||||
|
<h2><%= t("budgets.investments.show.price") %></h2>
|
||||||
|
<div class="supports text-center">
|
||||||
|
<p class="investment-project-amount">
|
||||||
|
<%= investment.formatted_price %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<div id="social-share" class="sidebar-divider"></div>
|
<div id="social-share" class="sidebar-divider"></div>
|
||||||
<h2><%= t("budgets.investments.show.share") %></h2>
|
<h2><%= t("budgets.investments.show.share") %></h2>
|
||||||
<div class="social-share-full">
|
<div class="social-share-full">
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ en:
|
|||||||
title: Investment project
|
title: Investment project
|
||||||
supports: Supports
|
supports: Supports
|
||||||
votes: Votes
|
votes: Votes
|
||||||
|
price: Price
|
||||||
wrong_price_format: Only integer numbers
|
wrong_price_format: Only integer numbers
|
||||||
investment:
|
investment:
|
||||||
title: Investment project
|
title: Investment project
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ es:
|
|||||||
title: Propuesta de inversión
|
title: Propuesta de inversión
|
||||||
supports: Apoyos
|
supports: Apoyos
|
||||||
votes: Votos
|
votes: Votos
|
||||||
|
price: Coste
|
||||||
wrong_price_format: Solo puede incluir caracteres numéricos
|
wrong_price_format: Solo puede incluir caracteres numéricos
|
||||||
investment:
|
investment:
|
||||||
title: Propuesta de inversión
|
title: Propuesta de inversión
|
||||||
|
|||||||
Reference in New Issue
Block a user