]> projects.mako.cc - selectricity/blobdiff - app/views/quickvote/_victories_ties.rhtml
Added Sparklines controller and dependency, see README. Created method and table...
[selectricity] / app / views / quickvote / _victories_ties.rhtml
diff --git a/app/views/quickvote/_victories_ties.rhtml b/app/views/quickvote/_victories_ties.rhtml
new file mode 100644 (file)
index 0000000..7c3506a
--- /dev/null
@@ -0,0 +1,17 @@
+<% victories, tied = @election.condorcet_result.victories_and_ties %>
+<% names = @election.names_by_id %>
+<% %>
+<table class="voterbox">
+  <% victories.keys.each do |victor| %>
+  <tr>
+    <th><%= names[victor] %></th>
+       <% victories[victor].keys.each do |loser| %>
+       <td><%= names[loser] %> (<%= victories[victor][loser] %>)</td>
+       <% end -%>
+  </tr>
+  <% end -%>
+</table>
+               
+       
+       
+

Benjamin Mako Hill || Want to submit a patch?