diff --git a/app/helpers/investments_helper.rb b/app/helpers/investments_helper.rb index 51d38d09a..f8fd84bf4 100644 --- a/app/helpers/investments_helper.rb +++ b/app/helpers/investments_helper.rb @@ -1,5 +1,9 @@ module InvestmentsHelper + def investment_image_full_url(investment, version) + URI(request.url) + investment.image.url(version) + end + def investment_image_file_name(investment) investment.image.url.split('/').last.split("?")[0] if investment.image.present? end diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb index a13df2626..6867c04a4 100644 --- a/app/views/budgets/investments/_investment.html.erb +++ b/app/views/budgets/investments/_investment.html.erb @@ -1,6 +1,7 @@
<%= l investment.created_at.to_date %> + <% if investment.author.hidden? || investment.author.erased? %> • <% end %> <% end %> + • <%= investment.heading.name %>
@@ -52,6 +58,7 @@<%= t("budgets.investments.show.code_html", code: investment.id) %>
+ <% if investment.location.present? %><%= t("budgets.investments.show.location_html", location: investment.location) %>
<% end %> + <% if investment.organization_name.present? %><%= t("budgets.investments.show.organization_name_html", name: investment.organization_name) %>
<% end %> + <%= render 'shared/tags', taggable: investment %> <%= safe_html_with_links investment.description.html_safe %> @@ -61,10 +69,12 @@ <%= text_with_links investment.external_url %><%= investment.unfeasibility_explanation %>
<% end %> + <% if investment.should_show_price_info? %><%= investment.price_explanation %>
@@ -129,7 +139,7 @@ <%= render partial: 'shared/social_share', locals: { share_title: t("budgets.investments.show.share"), title: investment.title, - image_url: investment.image.exists? ? URI(request.url) + investment.image.url(:thumb) : '', + image_url: investment.image.exists? ? investment_image_full_url(investment, :thumb) : '', url: budget_investment_url(budget_id: investment.budget_id, id: investment.id) } %>