Files
nairobi/app/views/proposals/_support_status.html.erb
Javi Martín 4b42a68b6a Use the vote action to vote featured proposals
The action and the views were almost identical, with the supports
progress and the HTML classes of the success message element being the
only exceptions; we can use CSS for the styles instead.
2022-02-21 18:47:13 +01:00

44 lines
1.4 KiB
Plaintext

<% if proposal.selected? %>
<div class="callout success">
<strong><%= t("proposals.proposal.selected") %></strong>
</div>
<% else %>
<div id="proposal_sticky" data-sticky-container>
<div class="sticky fixed-mobile-content"
data-sticky
data-stick-to="bottom"
data-sticky-on="small"
data-top-anchor="0"
data-btm-anchor="sticky_stop"
data-check-every="0">
<div class="fixed-mobile-content">
<div class="sidebar-divider"></div>
<h2><%= t("votes.supports") %></h2>
<div id="<%= dom_id(proposal) %>_votes">
<% if proposal.draft? %>
<div class="callout primary">
<p class="text-center small"><strong><%= t("proposals.show.draft") %></strong></p>
</div>
<% elsif proposal.successful? %>
<div class="supports text-center">
<%= render "proposals/supports", proposal: proposal %>
</div>
<% elsif proposal.archived? %>
<div class="padding text-center">
<p>
<strong><%= t("proposals.proposal.supports", count: proposal.total_votes) %></strong>
</p>
<p><%= t("proposals.proposal.archived") %></p>
</div>
<% else %>
<%= render "votes", proposal: proposal %>
<% end %>
</div>
</div>
</div>
</div>
<div id="sticky_stop"></div>
<% end %>