40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
<div class="clear"></div>
|
|
|
|
<% if @budget.accepting? %>
|
|
<% if current_user && current_user.level_two_or_three_verified? %>
|
|
<%= link_to t("budget.investments.index.sidebar.create"), new_budget_investment_path, class: "button budget expanded" %>
|
|
<% else %>
|
|
<div class="callout warning">
|
|
<%= t("budget.investments.index.sidebar.verified_only",
|
|
verify: link_to(t("budget.investments.index.sidebar.verify_account"), verification_path)).html_safe %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class="sidebar-divider"></div>
|
|
<h2 class="sidebar-title"><%= t("budget.investments.index.sidebar.my_ballot") %></h2>
|
|
|
|
<% if @heading && @ballot.investments.by_heading(@heading.id).count > 0 %>
|
|
<p>
|
|
<em>
|
|
<%= t("budget.investments.index.sidebar.voted_html",
|
|
count: @ballot.investments.by_heading(@heading.id).count,
|
|
amount_spent: @ballot.formatted_amount_spent(@heading)) %>
|
|
</em>
|
|
</p>
|
|
<% else %>
|
|
<p><strong><%= t("budget.investments.index.sidebar.zero") %></strong></p>
|
|
<% end %>
|
|
|
|
<ul class="ballot-list">
|
|
<% if @heading %>
|
|
<% @ballot.investments.by_heading(@heading.id).each do |investment| %>
|
|
<%= render 'budgets/ballot/investment_for_sidebar',
|
|
investment: investment,
|
|
investment_ids: @investment_ids %>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|
|
|
|
<p class="callout primary"><%= t("budget.investments.index.sidebar.voted_info") %></p>
|