Manage the render of the price field on public investment section
This commit is contained in:
@@ -17,10 +17,14 @@ class Budgets::Investments::NewComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def subtitle
|
||||
if budget.single_heading?
|
||||
return unless budget.single_heading?
|
||||
|
||||
if budget.show_money?
|
||||
tag.span t("budgets.investments.form.subtitle",
|
||||
heading: budget.headings.first.name,
|
||||
price: budget.formatted_heading_price(budget.headings.first))
|
||||
else
|
||||
tag.span t("budgets.investments.form.subtitle_without_price", heading: budget.headings.first.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user