Sha256: 4bd8318cf765c0a2a08c6d373d4e3398e9ebeab28c56c3b83799746b73d2b3a5
Contents?: true
Size: 1.16 KB
Versions: 8
Compression:
Stored size: 1.16 KB
Contents
.clear .poll{:id => "poll_ui_#{poll.id}"} - has_voted = logged_in? && poll.voted?(current_user) %table.poll %thead %tr %th{:colspan => 2} .right =:total_votes.l = poll.votes.size = poll.question -poll.choices.each do |choice| %tr -if @is_current_user || has_voted %td.bars .bar-container .bar{:style => "width:#{choice.votes_percentage}%"} ="#{choice.votes_percentage}%" %td - if logged_in? && !has_voted = link_to_remote :vote.l, { :url => votes_path(:choice_id => choice), :method => :post, :loading => "$$('table.poll').invoke('addClassName', 'loading')"}, {:title => :vote.l, :class => 'vote'} - elsif !logged_in? = link_to :vote.l, new_vote_path(:post_id => poll.post.id), {:title => :log_in_to_vote.l, :class => 'vote'} = choice.description -if !has_voted %tr %td{:colspan => 2} %small.quiet= :you_must_vote_to_see_the_results.l -elsif logged_in? %tr %td{:colspan => 2} %small.quiet= :you_have_already_voted.l .clear %br
Version data entries
8 entries across 8 versions & 1 rubygems