voter. Once all votes have been counted the candidate with the most
points is the winner.</p>
</div>
-<%= image_tag( graph_url( :action => 'borda_bar', :id => @election ) ) %>
+
+<div class="graph">
+ <%= image_tag( graph_url( :action => 'borda_bar', :id => @election ) ) %>
+</div>
"Simple Condorcet" to distinguish it from the Schulze method which is
another Condorcet system.</p>
+<%= render :partial => 'pref_tables' %>
+
</div>
</div>
-<%= image_tag(graph_url( :action => 'plurality_pie', :id => @election ) )%>
+<div class="graph">
+ <%= image_tag(graph_url( :action => 'plurality_pie', :id => @election ) )%>
+</div>
<% victories = @election.ssd_result.victories_and_ties %>
<% if candidates.size <= 7 -%>
+
+<p>Each number in the table below shows how many times the candidate on
+the left beat the matching candidate on the top. The winner is on the
+top of the left column.</p>
+
<!-- This table shows how many times each choice was ranked above the other,
with percentages-->
+<div class="result_table">
<table class="preftable">
-<caption>Each number shows how many times the candidate on the left beat the
-matching candidate on the top. The Schulze/Condorcet winner is on the top of the
-left column.</caption>
<tr>
<td></td>
<% candidates.each do |candidate| -%>
</tr>
<% end -%>
</table>
-<br />
+</div>
<!-- This table generates a margin of victory -->
+
+<p>A simplification of the above data. The winner is on the left; each
+cell names the defeated candidate and the magnitude of the victory in
+parenthesis.</p>
+
+<div class="result_table">
<table class="preftable">
-<caption>A simplification of the above data. The winner is on the left; each cell
-names the defeated candidate and the magnitude of the victory in parenthesis.
-</caption>
<% candidates.each do |victor| %>
<tr>
<th><%=h @names[victor] %></th>
</tr>
<% end -%>
</table>
+</div>
<% end -%>
<div class="winner">
-<% if result.winner? and result.winners.length == 1%>
- <p>The winner is:
- <strong><%=h @candidates[result.winner].name.capitalize %></strong></p>
+<p class="winner_text">
+<% if result.winner? and result.winners.length == 1 -%>
+ The winner is:
+ <strong><%=h @candidates[result.winner].name.capitalize %></strong>
<% elsif result.winner? and result.winners.length > 1 %>
- <p>There was a tie. The winners are: <strong><%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%></strong></p>
+ There was a tie. The winners are: <strong><%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%></strong>
<% else %>
- <p>There is no winner using this method. </strong></p>
+ <p>There is no winner using this method. </strong>
<% end %>
+</p>
</div>
-<h2>Winner</h2>
-<%= render :partial => 'result', :object => @results[@election.election_method] %>
+<h2>Method</h2>
<p>This election was run using:
<strong><%= ELECTION_TYPES[@election.election_method] %></strong></p>
<span class="subheader">Results</span>
</div>
+<div id="winner_box">
+<%= render :partial => 'result', :object => @results[@election.election_method] %>
+</div>
+
<% if @election.shortdesc %>
<p><strong>Vote Description:</strong></p>
<blockquote><em><%=h @election.shortdesc %></em>
color: #666666;
}
-/* #graph {
- margin-top: 50px;
- background: url(/images/graph.jpg) top left no-repeat;
- height: 0px;
- overflow: hidden;
- padding-top: 243px;
-} */
-
-
+.graph {
+ text-align: center;
+}
/* Right column. Includes top-bar and main-box. */
float: left;
}
+.result_table {
+ text-align: center;
+ margin-bottom: 1em;
+}
.preftable {
font-family: verdana,arial,helvetica,sans-serif;
border-spacing: 0px;
border-style: solid;
caption-side: top;
}
-.preftable caption {
- font-family: verdana,arial,helvetica,sans-serif;
- font-size: 0.9em;
-}
+
.preftable th {
font-family: verdana,arial,helvetica,sans-serif;
border-width: 2px;
border: 1px black solid;
}
+.winner_text {
+ text-align: center;
+}
+
+#winner_box {
+ border: 3px white solid;
+ background-color: #666666;
+ color: white;
+ margin: 0.5em 0 1em 0;
+}
+
+.winner_text {
+ font-size: 1.2em;
+}
+#winner_box .winner_text {
+ font-size: 2em;
+}
+
+#winner_box p {
+ margin: 0;
+ padding: 0;
+}