X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/58fb91dde4b0a16c1a764dda66e31bc57565e41f..6a1c545f073430dd46bf5ad89b0450a16c659b00:/app/views/quickvote/_pref_table.rhtml diff --git a/app/views/quickvote/_pref_table.rhtml b/app/views/quickvote/_pref_table.rhtml deleted file mode 100644 index 011fcbe..0000000 --- a/app/views/quickvote/_pref_table.rhtml +++ /dev/null @@ -1,32 +0,0 @@ -<% candidates = @election.candidates.sort.collect {|candidate| candidate.id}-%> -<% voters = @election.voters.size %> -<% matrix = @election.condorcet_result.matrix %> -<% names = Hash.new -%> -<% candidates.each do |candidate| -%> - <%names[candidate] = Candidate.find(candidate).name -%> -<% end -%> - - - - <% candidates.each do |candidate| -%> - - <% end -%> - - -<% candidates.each do |winner| -%> - - - <% candidates.each do |loser| -%> - <% if winner == loser -%> - - <% else %> - - <% end -%> - <% end -%> - -<% end -%> -
<%=h names[candidate] -%>
<%=h names[winner] %> -- <% wins = matrix[winner][loser] unless matrix[winner].nil?%> - <%= wins %> - <%= sparkline_tag [(wins.to_f/voters.to_f)*100.0], :type => 'pie', - :diameter => 25, :share_color => '#74ce00' %> -