shows investment price info only if phase is balloting or later
This commit is contained in:
@@ -245,6 +245,12 @@ class Budget
|
||||
budget.balloting?
|
||||
end
|
||||
|
||||
def should_show_price_info?
|
||||
feasible? &&
|
||||
price_explanation.present? &&
|
||||
(budget.balloting? || budget.reviewing_ballots? || budget.finished?)
|
||||
end
|
||||
|
||||
def formatted_price
|
||||
budget.formatted_amount(price)
|
||||
end
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<p><%= investment.unfeasibility_explanation %></p>
|
||||
<% end %>
|
||||
|
||||
<% if investment.feasible? && investment.price_explanation.present? %>
|
||||
<% if investment.should_show_price_info? %>
|
||||
<h2><%= t('budgets.investments.show.price_explanation') %></h2>
|
||||
<p><%= investment.price_explanation %></p>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user