<%= back_link_to budget_investments_path(investment.budget, heading_id: investment.heading) %> <% if can?(:create, @document) && investment.documents.size < Budget::Investment.max_documents_allowed %> <%= link_to t("documents.upload_document"), new_document_path(documentable_id:investment, documentable_type: investment.class.name, from: request.url), class: 'button hollow float-right' %> <% end %> <% if author_of?(investment, current_user) || (current_user && current_user.administrator?) %> <% button_text = investment.image.exists? ? t("budgets.investments.show.edit_image") : t("budgets.investments.show.add_image") %> <%= link_to button_text, edit_image_budget_investment_path(investment.budget, investment), class: 'button hollow float-right' %> <% end %>

<%= investment.title %>

<%= render '/shared/author_info', resource: investment %>  •  <%= l investment.created_at.to_date %>  •  <%= investment.heading.name %>

<% if investment.image.exists? %>
<%= image_tag investment.image.url(), title: investment.image_title, alt: investment.image_title %>
<%= investment.image_title %>

<% end %>

<%= 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 %> <% if investment.external_url.present? %> <% end %> <% if investment.unfeasible? && investment.unfeasibility_explanation.present? %>

<%= t('budgets.investments.show.unfeasibility_explanation') %>

<%= investment.unfeasibility_explanation %>

<% end %> <% if investment.should_show_price_info? %>

<%= t('budgets.investments.show.price_explanation') %>

<%= investment.price_explanation %>

<% end %>