Restores investment/_investment view

This commit is contained in:
kikito
2016-12-02 20:10:22 +01:00
parent f677d90f73
commit 98549d8e61

View File

@@ -0,0 +1,70 @@
<div id="<%= dom_id(investment) %>" class="budget-investment clear">
<div class="panel">
<div class="row">
<div class="small-12 medium-9 column">
<div class="budget-investment-content">
<% cache [locale_and_user_status(investment), 'index', investment, investment.author] do %>
<span class="label-budget-investment float-left"><%= t("budget.investments.investment.title") %></span>
<span class="icon-budget"></span>
<h3><%= link_to investment.title, namespaced_budget_investment_path(investment) %></h3>
<p class="investment-project-info">
<%= l investment.created_at.to_date %>
<% if investment.author.hidden? || investment.author.erased? %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<span class="author">
<%= t("budget.investments.show.author_deleted") %>
</span>
<% else %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<span class="author">
<%= investment.author.name %>
</span>
<% if investment.author.official? %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<span class="label round level-<%= investment.author.official_level %>">
<%= investment.author.official_position %>
</span>
<% end %>
<% end %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= heading_name(investment.heading) %>
</p>
<div class="investment-project-description">
<p><%= link_to investment.description, namespaced_budget_investment_path(investment) %></p>
<div class="truncate"></div>
</div>
<% end %>
</div>
</div>
<% unless investment.unfeasible? %>
<% if investment.should_show_votes? %>
<div id="<%= dom_id(investment) %>_votes"
class="small-12 medium-3 column text-center">
<%= render partial: '/budgets/investments/votes', locals: {
investment: investment,
investment_votes: investment_votes,
vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes')
} %>
</div>
<% elsif investment.should_show_ballots? %>
<div id="<%= dom_id(investment) %>_ballot"
class="small-12 medium-3 column text-center">
<%= render 'ballot', investment: investment %>
</div>
<% end %>
<% end %>
</div>
</div>
</div>