Pref_tables now use the Schulze ssd_result object, and they own't display if
author<jlsharps@mit.edu> <>
Fri, 31 Aug 2007 15:58:32 +0000 (11:58 -0400)
committer<jlsharps@mit.edu> <>
Fri, 31 Aug 2007 15:58:32 +0000 (11:58 -0400)
more than 7 candidates because it would look ugly :(.

app/views/quickvote/_pref_tables.rhtml
public/stylesheets/main.css

index 628ce55ca5d873474e149fdc4097109cf8512799..3479167d226296cc14a0864c47b1299d2efb452a 100644 (file)
@@ -1,8 +1,9 @@
-<% 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 %>
+<% matrix = @election.ssd_result.matrix %>
+<% victories = @election.ssd_result.victories_and_ties %>
 
+<% if candidates.size <= 7 -%>
 <!-- This table shows how many times each choice was ranked above the other, 
        with percentages-->
 <table class="preftable">
@@ -30,7 +31,7 @@
  </tr>
 <% end -%>
 </table>
-
+<br />
 <!-- This table generates a margin of victory -->
 <table class="preftable">
   <% candidates.each do |victor| %>
@@ -49,3 +50,5 @@
   </tr>
   <% end -%>
 </table>
+<% end -%>
+
index 13626a13bd67f4a807535390e38f603e9ef76c8c..a77ca83e47927e7f4331a5423a06fd381b9597ab 100644 (file)
@@ -274,14 +274,15 @@ li.moveable {
 }
 
 .preftable th {
+       font-family: verdana,arial,helvetica,sans-serif;
        border-width: 2px;
        border-color: #999999;
        border-style: solid;
        text-align: center;
        font-weight: bold;
-       padding: 5px 5px 5px 15px;
+       padding: 5px 5px 5px 5px;
        background-color: #999999;
-       color: #fff;
+       color: #FFFFFF;
 }
 
 .preftable td {

Benjamin Mako Hill || Want to submit a patch?