X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/6a1c545f073430dd46bf5ad89b0450a16c659b00..ce1489ae318bfe129070ecaf4e5c422015572caf:/app/views/quickvote/_pref_tables.rhtml diff --git a/app/views/quickvote/_pref_tables.rhtml b/app/views/quickvote/_pref_tables.rhtml index 66e0cbf..628ce55 100644 --- a/app/views/quickvote/_pref_tables.rhtml +++ b/app/views/quickvote/_pref_tables.rhtml @@ -2,22 +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 -%> @@ -34,21 +32,20 @@
<%=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]%> - + <% end -%> <% end -%>
<%=h names[victor] %><%=h @names[victor] %><%=h names[loser] %> + <%=h @names[loser] %> <% if margin == 0%> Tied! <% else -%> (<%= margin%>) <% end -%> -
-