adds helper for explanation fields
This commit is contained in:
@@ -23,4 +23,8 @@ module ValuationHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def explanation_field(field)
|
||||||
|
simple_format_no_tags_no_sanitize(safe_html_with_links(field.html_safe)) if field.present?
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -65,7 +65,8 @@
|
|||||||
<strong><%= t("valuation.spending_proposals.show.price_first_year") %> (<%= t("valuation.spending_proposals.show.currency") %>):</strong>
|
<strong><%= t("valuation.spending_proposals.show.price_first_year") %> (<%= t("valuation.spending_proposals.show.currency") %>):</strong>
|
||||||
<%= @spending_proposal.price_first_year.presence or t("valuation.spending_proposals.show.undefined") %>
|
<%= @spending_proposal.price_first_year.presence or t("valuation.spending_proposals.show.undefined") %>
|
||||||
</p>
|
</p>
|
||||||
<%= simple_format(safe_html_with_links(@spending_proposal.price_explanation.html_safe), {}, sanitize: false) if @spending_proposal.price_explanation.present? %>
|
|
||||||
|
<%= explanation_field @spending_proposal.price_explanation %>
|
||||||
|
|
||||||
<p id="time_scope">
|
<p id="time_scope">
|
||||||
<strong><%= t("valuation.spending_proposals.show.time_scope") %>:</strong>
|
<strong><%= t("valuation.spending_proposals.show.time_scope") %>:</strong>
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
<%= t("valuation.spending_proposals.show.#{@spending_proposal.feasibility}") %>
|
<%= t("valuation.spending_proposals.show.#{@spending_proposal.feasibility}") %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<%= simple_format_no_tags_no_sanitize(safe_html_with_links(@spending_proposal.feasible_explanation.html_safe)) if @spending_proposal.feasible_explanation.present? %>
|
<%= explanation_field @spending_proposal.feasible_explanation %>
|
||||||
|
|
||||||
<% if @spending_proposal.valuation_finished %>
|
<% if @spending_proposal.valuation_finished %>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user