added support for results for full elections
[selectricity] / app / views / common / _methodinfo_ssd.rhtml
diff --git a/app/views/common/_methodinfo_ssd.rhtml b/app/views/common/_methodinfo_ssd.rhtml
new file mode 100644 (file)
index 0000000..0c8dc95
--- /dev/null
@@ -0,0 +1,36 @@
+<p>The full results of this election ranked the candidates in order of
+preference (from most preferred to least preferred):</p>
+
+<ol>
+<% @election.ssd_result.ranked_candidates.each do |place|  %>
+  <li><%= h(place.collect {|c| @names[c].capitalize}.join( " <em>and</em> " )) %>
+      <%= "<strong>(TIE)</strong>" if place.length > 1 %></li>
+<% end %>
+</ol>
+
+
+<div class="rbmoreinfo">
+<h4>About the Schulze Method</h4>
+
+<p>The <%= link_to "Schulze method",
+"http://en.wikipedia.org/wiki/Schulze_method" %> is a preferential
+voting system. It is based on the Condorcet method but includes a set of
+methods for resolving "circular" defeats.</p>
+
+<p>The Schulze method is also known as Schwartz Sequential Dropping
+(SSD), Cloneproof Schwartz Sequential Dropping (CSSD), Beatpath Method,
+Beatpath Winner, Path Voting, and Path Winner.</p>
+</div>
+
+
+<% candidates = @election.ssd_result.ranked_candidates.flatten -%>
+<% if candidates.size <= 7 -%>
+  <%= render_partial 'common/pref_tables' %>
+<% else %>
+
+  There are too many candidates in your elections to show the result
+  tables.  <%= link_to "Click here", { :action => 'pref_tables', :id =>
+  @voter.password }, :popup => [] %> to view details.
+
+<% end -%>
+

Benjamin Mako Hill || Want to submit a patch?