X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/823d530ba46c1fb3518c4deef0081738503837eb..e7df11018ea1e15f8671f948126632be3ac86e84:/app/views/quickvote/_pref_tables.rhtml?ds=inline diff --git a/app/views/quickvote/_pref_tables.rhtml b/app/views/quickvote/_pref_tables.rhtml index 0d2b020..628ce55 100644 --- a/app/views/quickvote/_pref_tables.rhtml +++ b/app/views/quickvote/_pref_tables.rhtml @@ -2,21 +2,20 @@ <% voters = @election.voters.size %> <% matrix = @election.condorcet_result.matrix %> <% victories = @election.condorcet_result.victories_and_ties %> -<% names = @election.names_by_id %> - +
- + <% candidates.each do |candidate| -%> - + <% end -%> <% candidates.each do |winner| -%> - + <% candidates.each do |loser| -%> <% if winner == loser -%> @@ -33,13 +32,13 @@
<%=h names[candidate] -%><%=h @names[candidate] -%>
<%=h names[winner] %><%=h @names[winner] %> --
- +
<% candidates.each do |victor| %> - + <% victories[victor].keys.each do |loser| %> <% margin = victories[victor][loser]%> -
<%=h names[victor] %><%=h @names[victor] %><%=h names[loser] %> + <%=h @names[loser] %> <% if margin == 0%> Tied! <% else -%>