This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
binaryattraction/app/views/votes/show.html.haml

21 lines
635 B
Plaintext

#scrolling_photo_block_container
= pagination 'scrolling_photo_block', url(:vote, :id => @user.user_name)
#scrolling_photo_block
= partial 'votes/stats_for_user'
- if @user == current_user
%h1 Your voting record
- else
%h1== #{@user.user_name}'s Voting record
%div.user_stat_chart
= stat_chart
%p== <strong>Zero:</strong> <tt>#{@user.votes.select { |v| v.zero? }.size}</tt>
%p== <strong>One:</strong> <tt>#{@user.votes.select { |v| v.one? }.size}</tt>
%p== <strong>Oneness:</strong> <tt>#{"%.1f%%" % (@user.votes.select { |v| v.one? }.size.to_f / @user.votes.size.to_f * 100.0)}</tt>
%br{ :style => 'clear: both' }