X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/1ef3925927fb35483da98af08f9fc175d5502708..2b0073e486a86c2546b58a7ffc10d641f73d196a:/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 18e5aa3..3479167 100644 --- a/app/views/quickvote/_pref_tables.rhtml +++ b/app/views/quickvote/_pref_tables.rhtml @@ -1,22 +1,22 @@ -<% candidates = @election.condorcet_result.ranked_candidates.flatten -%> +<% candidates = @election.ssd_result.ranked_candidates.flatten -%> <% voters = @election.voters.size %> -<% matrix = @election.condorcet_result.matrix %> -<% victories = @election.condorcet_result.victories_and_ties %> -<% names = @election.names_by_id %> +<% matrix = @election.ssd_result.matrix %> +<% victories = @election.ssd_result.victories_and_ties %> +<% if candidates.size <= 7 -%> <% candidates.each do |candidate| -%> - + <% end -%> <% candidates.each do |winner| -%> - + <% candidates.each do |loser| -%> <% if winner == loser -%> @@ -31,15 +31,15 @@ <% end -%>
<%=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 -%>
<%=h names[victor] %><%=h @names[victor] %><%=h names[loser] %> + <%=h @names[loser] %> <% if margin == 0%> Tied! <% else -%> @@ -50,3 +50,5 @@
+<% end -%> +