displays appropriate vote info depending on phase
This commit is contained in:
@@ -46,7 +46,6 @@
|
||||
<% 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: {
|
||||
@@ -55,9 +54,17 @@
|
||||
vote_url: namespaced_budget_investment_vote_path(investment, value: 'yes')
|
||||
} %>
|
||||
</div>
|
||||
|
||||
<% elsif investment.should_show_vote_count? %>
|
||||
<div id="<%= dom_id(investment) %>_votes"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<div class="supports js-participation">
|
||||
<span class="total-supports no-button">
|
||||
<%= t("budgets.investments.investment.supports",
|
||||
count: investment.total_votes) %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif investment.should_show_ballots? %>
|
||||
|
||||
<div id="<%= dom_id(investment) %>_ballot"
|
||||
class="small-12 medium-3 column text-center">
|
||||
<%= render partial: '/budgets/investments/ballot', locals: {
|
||||
@@ -66,7 +73,6 @@
|
||||
ballot: ballot
|
||||
} %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -55,11 +55,10 @@
|
||||
|
||||
<% if investment.should_show_aside? %>
|
||||
<aside class="small-12 medium-3 column">
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("votes.supports") %></h2>
|
||||
<div class="text-center">
|
||||
|
||||
<% if investment.should_show_votes? %>
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("budgets.investments.show.supports") %></h2>
|
||||
<div class="text-center">
|
||||
<div id="<%= dom_id(investment) %>_votes">
|
||||
<%= render partial: '/budgets/investments/votes', locals: {
|
||||
investment: investment,
|
||||
@@ -67,7 +66,20 @@
|
||||
vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes')
|
||||
} %>
|
||||
</div>
|
||||
<% elsif investment.should_show_ballots? %>
|
||||
</div>
|
||||
<% elsif investment.should_show_vote_count? %>
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("budgets.investments.show.supports") %></h2>
|
||||
<div class="text-center">
|
||||
<span class="total-supports">
|
||||
<%= t("budgets.investments.investment.supports",
|
||||
count: investment.total_votes) %>
|
||||
</span>
|
||||
</div>
|
||||
<% elsif investment.should_show_ballots? %>
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("budgets.investments.show.votes") %></h2>
|
||||
<div class="text-center">
|
||||
<div id="<%= dom_id(investment) %>_ballot">
|
||||
<%= render partial: 'ballot', locals: {
|
||||
investment: investment,
|
||||
@@ -75,8 +87,8 @@
|
||||
ballot: ballot,
|
||||
} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="sidebar-divider"></div>
|
||||
<h2><%= t("budgets.investments.show.share") %></h2>
|
||||
|
||||
Reference in New Issue
Block a user