diff --git a/app/helpers/text_with_links_helper.rb b/app/helpers/text_with_links_helper.rb index fe726c51e..ac965dafa 100644 --- a/app/helpers/text_with_links_helper.rb +++ b/app/helpers/text_with_links_helper.rb @@ -11,4 +11,8 @@ module TextWithLinksHelper Rinku.auto_link(html, :all, 'target="_blank" rel="nofollow"').html_safe end + def simple_format_no_tags_no_sanitize(html) + simple_format(html, {}, sanitize: false) + end + end diff --git a/app/views/valuation/spending_proposals/show.html.erb b/app/views/valuation/spending_proposals/show.html.erb index 9ebaa0c24..e98968fee 100644 --- a/app/views/valuation/spending_proposals/show.html.erb +++ b/app/views/valuation/spending_proposals/show.html.erb @@ -53,30 +53,39 @@
<%= link_to t("valuation.spending_proposals.show.edit_dossier"), edit_valuation_spending_proposal_path(@spending_proposal) %>
- -<%= t("valuation.spending_proposals.show.price") %> (<%= t("valuation.spending_proposals.show.currency") %>): - <%= @spending_proposal.price.present? ? @spending_proposal.price : t("valuation.spending_proposals.show.undefined") %> +
+ <%= link_to t("valuation.spending_proposals.show.edit_dossier"), edit_valuation_spending_proposal_path(@spending_proposal) %>
-<%= t("valuation.spending_proposals.show.price_first_year") %> (<%= t("valuation.spending_proposals.show.currency") %>): - <%= @spending_proposal.price_first_year.present? ? @spending_proposal.price_first_year : t("valuation.spending_proposals.show.undefined") %> + +
+ <%= t("valuation.spending_proposals.show.price") %> (<%= t("valuation.spending_proposals.show.currency") %>): + <%= @spending_proposal.price.presence or t("valuation.spending_proposals.show.undefined") %> +
++ <%= t("valuation.spending_proposals.show.price_first_year") %> (<%= t("valuation.spending_proposals.show.currency") %>): + <%= @spending_proposal.price_first_year.presence or t("valuation.spending_proposals.show.undefined") %>
<%= simple_format(safe_html_with_links(@spending_proposal.price_explanation.html_safe), {}, sanitize: false) if @spending_proposal.price_explanation.present? %> -<%= t("valuation.spending_proposals.show.time_scope") %>: - <%= @spending_proposal.time_scope.present? ? @spending_proposal.time_scope : t("valuation.spending_proposals.show.undefined") %> +
+ <%= t("valuation.spending_proposals.show.time_scope") %>: + <%= @spending_proposal.time_scope.presence or t("valuation.spending_proposals.show.undefined") %>
-<%= t("valuation.spending_proposals.show.feasibility") %>: +
+ <%= t("valuation.spending_proposals.show.feasibility") %>: <%= t("valuation.spending_proposals.show.#{@spending_proposal.feasibility}") %>
-<%= simple_format(safe_html_with_links(@spending_proposal.feasible_explanation.html_safe), {}, sanitize: false) if @spending_proposal.feasible_explanation.present? %> + +<%= simple_format_no_tags_no_sanitize(safe_html_with_links(@spending_proposal.feasible_explanation.html_safe)) if @spending_proposal.feasible_explanation.present? %> <% if @spending_proposal.valuation_finished %> -<%= t("valuation.spending_proposals.show.valuation_finished") %> +
+ <%= t("valuation.spending_proposals.show.valuation_finished") %> +
<% end %> <% if @spending_proposal.internal_comments.present? %>