mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-16 01:41:23 +00:00
ca75960bdd
Improved content spacing Colour tweaks
23 lines
702 B
Text
23 lines
702 B
Text
<div class="widget-content-wrapper">
|
|
<div class="question">
|
|
<h5><%= @poll.question %></h5>
|
|
|
|
<% @poll.options.all.each do |opt| %>
|
|
<p class="option">
|
|
<% if cuser and !@poll.voted?(cuser) %>
|
|
<%= link_to (h opt), controller: "votes", action: "create", vote: { votable_id: opt.id, votable_type: "Option" } %>
|
|
<% else %>
|
|
<%= opt.option %> <br />
|
|
<% end %>
|
|
<% if opt.votes > 0 %>
|
|
<%= content_tag :div, "", { class: "bar", style: "width: #{opt.votes*100/@poll.votes}%;" } %>
|
|
<% end %>
|
|
<span><%= opt.votes %></span>
|
|
</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= link_to "Archive", polls_path, class: "button" %>
|
|
</div>
|
|
|
|
|