ensl.org/app/views/polls/_show.html.erb
Luke Barratt 5487854a6c Start to cleanup old assets
Added new ISO country code flag icons to asset pipeline
Lots and lots of new style changes
Began converting to JS to coffeescript
2014-04-09 00:28:53 +01:00

19 lines
609 B
Text

<h5><%= @poll.question %></h5>
<div>
<% @poll.options.all.each do |opt| %>
<p>
<% 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 %>
<%= image_tag "/images/icons/poll.png", :class => "bar", :height => 6, :width => opt.votes*100/@poll.votes %>
<% end %>
<span><%= opt.votes %></span>
</p>
<% end %>
</div>
<p><%= link_to "Archive..", polls_path %></p>