95 lines
3.4 KiB
Plaintext
95 lines
3.4 KiB
Plaintext
<% provide :title do %><%= @investment.title %><% end %>
|
|
|
|
<section class="budget-investment-show">
|
|
|
|
<ul class="breadcrumbs">
|
|
<li><%= link_to @investment.budget.name, budget_path(@investment.budget) %></a></li>
|
|
<li><%= @investment.group.name %></a></li>
|
|
<li><%= @investment.heading.name %></a></li>
|
|
</ul>
|
|
|
|
<div id="<%= dom_id(@investment) %>" class="row">
|
|
<div class="small-12 medium-9 column">
|
|
<%= link_to :back, class: "back" do %>
|
|
<span class="icon-angle-left"></span>
|
|
<%= t("shared.back") %>
|
|
<% end %>
|
|
|
|
<h1><%= @investment.title %></h1>
|
|
|
|
<div class="budget-investment-info">
|
|
<%= render '/shared/author_info', resource: @investment %>
|
|
|
|
<span class="bullet"> • </span>
|
|
<%= l @investment.created_at.to_date %>
|
|
<span class="bullet"> • </span>
|
|
<%= heading_name(@investment.heading) %>
|
|
</div>
|
|
|
|
<br>
|
|
<p id="investment_code">
|
|
<%= t("budget.investments.show.code") %>
|
|
<strong><%= @investment.id %></strong>
|
|
</p>
|
|
|
|
<%= safe_html_with_links @investment.description.html_safe %>
|
|
|
|
<% if @investment.external_url.present? %>
|
|
<div class="document-link">
|
|
<%= text_with_links @investment.external_url %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if @investment.unfeasible? && @investment.unfeasibility_explanation.present? %>
|
|
<h2><%= t('budget.investments.show.unfeasibility_explanation') %></h2>
|
|
<p><%= @investment.unfeasibility_explanation %></p>
|
|
<% end %>
|
|
|
|
<% if @investment.feasible? && @investment.price_explanation.present? %>
|
|
<h2><%= t('budget.investments.show.price_explanation') %></h2>
|
|
<p><%= @investment.price_explanation %></p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if (@investment.budget.selecting? && !@investment.unfeasible?) ||
|
|
(@investment.budget.balloting? && @investment.feasible? ||
|
|
(@investment.budget.on_hold?)) %>
|
|
<aside class="small-12 medium-3 column">
|
|
<div class="sidebar-divider"></div>
|
|
<h3><%= t("votes.supports") %></h3>
|
|
<div class="text-center">
|
|
|
|
<% if @investment.budget.selecting? || @investment.budget.on_hold? %>
|
|
<div id="<%= dom_id(@investment) %>_votes">
|
|
<%= render 'votes',
|
|
{ investment: @investment,
|
|
vote_url: vote_budget_investment_path(@investment.budget, @investment, value: 'yes') }
|
|
%>
|
|
</div>
|
|
<% else %>
|
|
<div id="<%= dom_id(@investment) %>_ballot">
|
|
<%= render 'ballot', investment: @investment %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="sidebar-divider"></div>
|
|
<h3><%= t("budget.investments.show.share") %></h3>
|
|
<div class="social-share-full">
|
|
<%= social_share_button_tag("#{@investment.title} #{setting['twitter_hashtag']}") %>
|
|
<% if browser.device.mobile? %>
|
|
<a href="whatsapp://send?text=<%= @investment.title %> <%= budget_investment_url(budget_id: @investment.budget.id, id: @investment.id) %>" data-action="share/whatsapp/share">
|
|
<span class="icon-whatsapp whatsapp"></span>
|
|
</a>
|
|
<% end %>
|
|
</div>
|
|
</aside>
|
|
<% end %>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
<% unless namespace == 'management' %>
|
|
<%= render "budgets/investments/comments" %>
|
|
<% end %>
|