Merge jdong
authorJohn Dong <jdong@mit.edu>
Fri, 31 Aug 2007 16:59:55 +0000 (12:59 -0400)
committerJohn Dong <jdong@mit.edu>
Fri, 31 Aug 2007 16:59:55 +0000 (12:59 -0400)
app/views/quickvote/_pref_tables.rhtml
app/views/quickvote/_result_box.rhtml
app/views/quickvote/_results_sidebar.rhtml
app/views/quickvote/results.rhtml
config/gmaps_api_key.yml
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 41d9d173532773edf1ecb086820687be4597ed34..917dbd4eea590d0ecbdec4da97361428e8783069 100644 (file)
@@ -9,8 +9,11 @@
   <% end %></span>
 </div>
 
+<% unless @election.election_method == method -%>
+<%= render :partial => 'result', :object => @results[method]%>
+<% end -%>
 <%= render :partial => 'methodinfo_' + method,
-           :object => @results[@election.election_method] %>
+           :object => @results[method] %>
 
 </div>
 
index c60ed3ddfc1cf90a31e10cddf936a2e2d4283fc7..37776b802f0cdbff66f125921248b3b3f4bb3a87 100644 (file)
@@ -34,4 +34,11 @@ Event.observe(method_select, 'change', show_results_for);
 
 <h2>Statistics</h2>
 <%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
+<br />
+<br />
+
+<h2>Voter Report</h2>
+
+<p><%= link_to "[View All Voters: Map and Other Info]", :controller => "quickvote",
+       :action => "list_voters", :id => @election.id %></p>
 
index 52810fe543d228a1b43391b82ddce41feffeab2f..3ba74f56b17383c35732a1730e80b625955703ec 100644 (file)
 
 <div class="clear-div"></div>
 
-<div class="normal-header">
-  <span class="header">Voter Report</span>
-  <span class="subheader"></span>
-</div>
-
-<p><%= link_to "[View All Voters]", :controller => "quickvote", :action => "list_voters", :id => @election.id %></p>
-<br />
-
 <!--
 <%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %><br />
 -->
index b0c65fb0eb70554e97bc053b99e5d7049a16686f..b7ceca6974154513c7fad53c0c659a678eb29170 100644 (file)
@@ -9,4 +9,4 @@ test:
  ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ\r
 \r
 production:\r
- ABQIAAAA479zRK1hoNqMcKLTMuBcTRQ0mFvgRda1vOZQqJO6gQItognzGRQueA871M_O5_Q9Pd9xs4Ah4SNYTg\r
+ ABQIAAAA479zRK1hoNqMcKLTMuBcTRR0OKg4vZKrhw1amyo3djP_wIZS7BQ-fJouJ5VRd_fb2HO6KKzIMAVW6Q\r
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?