Modified graphs to ahve a 4 color scheme, but it isn't the full palette of selectrici...
[selectricity] / app / views / quickvote / _pref_table.rhtml
diff --git a/app/views/quickvote/_pref_table.rhtml b/app/views/quickvote/_pref_table.rhtml
new file mode 100644 (file)
index 0000000..dfcb6cc
--- /dev/null
@@ -0,0 +1,19 @@
+<% candidates = @election.candidates.sort.collect {|candidate| candidate.id} -%>
+<table class="voterbox">
+  <tr>
+       <td> </td>
+       <% candidates.each do |candidate| -%>
+         <th><%= candidate -%></th>
+       <% end -%>
+<% candidates.each do |winner| -%>
+  <tr>
+       <th><%= winner %></th>
+  <% candidates.each do |loser| -%> 
+    <% if winner == loser -%>
+      <td> -- </td>
+    <% else %>         
+      <td><%= @election.condorcet_result.matrix[winner][loser] %></td>
+    <% end -%>
+  <% end -%>
+ </tr>
+<%end -%>
\ No newline at end of file

Benjamin Mako Hill || Want to submit a patch?