X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/47fdfaba5a11570f2d7d720ee1c80d616d502c74..37ccb3a5511504b6b58c3fe70135e016d0a61bfd:/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 66e0cbf..3479167 100644
--- a/app/views/quickvote/_pref_tables.rhtml
+++ b/app/views/quickvote/_pref_tables.rhtml
@@ -1,23 +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| -%>
- <%=h names[candidate] -%> |
+ <%=h @names[candidate] -%> |
<% end -%>
<% candidates.each do |winner| -%>
- <%=h names[winner] %> |
+ <%=h @names[winner] %> |
<% candidates.each do |loser| -%>
<% if winner == loser -%>
-- |
@@ -32,23 +31,24 @@
<% end -%>
-
+
-
+
<% candidates.each do |victor| %>
- <%=h names[victor] %> |
+ <%=h @names[victor] %> |
<% victories[victor].keys.each do |loser| %>
<% margin = victories[victor][loser]%>
- <%=h names[loser] %>
+ | <%=h @names[loser] %>
<% if margin == 0%>
Tied!
<% else -%>
(<%= margin%>)
<% end -%>
- |
+
<% end -%>
<% end -%>
+<% end -%>