From da6c29f53b3598a6d2d9959df277b0340bc54cee Mon Sep 17 00:00:00 2001
From:
The full results of this election ranked the candidates in order of +preference (from most preferred to least preferred):
+ +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.
+ +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.
+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.
@@ -63,5 +61,4 @@ parenthesis. <% end -%> -<% end -%> diff --git a/app/views/quickvote/_result.rhtml b/app/views/common/_result.rhtml similarity index 100% rename from app/views/quickvote/_result.rhtml rename to app/views/common/_result.rhtml diff --git a/app/views/quickvote/_result_box.rhtml b/app/views/common/_result_box.rhtml similarity index 79% rename from app/views/quickvote/_result_box.rhtml rename to app/views/common/_result_box.rhtml index 917dbd4..528885d 100644 --- a/app/views/quickvote/_result_box.rhtml +++ b/app/views/common/_result_box.rhtml @@ -10,9 +10,9 @@ <% unless @election.election_method == method -%> -<%= render :partial => 'result', :object => @results[method]%> +<%= render :partial => 'common/result', :object => @results[method]%> <% end -%> -<%= render :partial => 'methodinfo_' + method, +<%= render :partial => 'common/methodinfo_' + method, :object => @results[method] %> diff --git a/app/views/voter/_sortable_vote.rhtml b/app/views/common/_sortable_vote.rhtml similarity index 66% rename from app/views/voter/_sortable_vote.rhtml rename to app/views/common/_sortable_vote.rhtml index 2452476..6876966 100644 --- a/app/views/voter/_sortable_vote.rhtml +++ b/app/views/common/_sortable_vote.rhtml @@ -1,8 +1,3 @@ -Please vote by dragging items in the list below into your preferred -order.
-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.
- -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.
-This election was run using: -<%= ELECTION_TYPES[@election.election_method] %>
- -View results using other methods:
-<% type_hash = {}; ELECTION_TYPES.each {|k,v| type_hash[v] = k} %>
-<%= select_tag 'election_type_select', options_for_select(type_hash, @election.election_method) %>
<%= link_to "Auditing Information", { :action => 'details', :id => @voter.password }, :popup => [] %>
+ diff --git a/app/views/voter/_vote_sidebar.rhtml b/app/views/voter/_vote_sidebar.rhtml new file mode 100644 index 0000000..5b8d038 --- /dev/null +++ b/app/views/voter/_vote_sidebar.rhtml @@ -0,0 +1,10 @@ +Please vote by dragging items in the list below into your preferred +order.
+ +<%= render :partial => 'common/sortable_vote' %> + +This page contains information useful for auditing elections and +verify that votes were tabulated correctly.
+ +The following invididuals (in random order) voted in this +election:
+ +The following table lists the votes cast in random order.
+ +The column marked Verification Token lists tokens that were +given to voters at the time of voting. Voters can check to see that the +vote that corresponds to their token was recorded correctly. The column +marks "vote" lists the candidates in order of the voter's preference. To +read these votes, please refer to the key below.
+ +Verification Token | +Vote | +<%- @votes.each do |vote| -%> +
---|---|
<%= vote.token %> | <%= vote.votestring%> | +
Key:
+ +Code | +Candidate | +<%- @election.candidates.sort.each_with_index do |c, i| -%> +
---|---|
<%= (i + 65).chr %> | +<%= c.name %> | +
Vote Description:
+<%=h @election.shortdesc %> + <% if @election.longdesc -%> ++<% end %> + +
+ <%= h(@election.longdesc) -%> + <% end -%> +
Number of voters:
++ <%= @election.voters.reject {|v| not v.voted? }.length %> ++ +<%= render :partial => 'common/result_box', + :locals => { :method => @election.election_method } %> + +<% for result_type in @election.other_methods %> + +<%= render :partial => 'common/result_box', + :locals => { :method => result_type } %> + +<% end %> + + + + + + diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index a050444..5d7f199 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -105,3 +105,36 @@ h2, h3 { border: 1px black solid; text-align: center; font-weight: bold +} + +.preftable { + font-family: verdana,arial,helvetica,sans-serif; + border-spacing: 0px; + border-width: 2px; + border-color: #999999; + border-style: solid; + caption-side: top; +} + +.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 5px; + background-color: #999999; + color: #FFFFFF; +} + +.preftable td { + border-collapse: collapse; + border-width: 1px; + border-color: #999999; + border-style: solid; + text-align: right; + padding-right: 5px; + padding-left: 5px; +} + diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 97c6848..e7ff4a6 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -250,36 +250,6 @@ blockquote { text-align: center; margin-bottom: 1em; } -.preftable { - font-family: verdana,arial,helvetica,sans-serif; - border-spacing: 0px; - border-width: 2px; - border-color: #999999; - border-style: solid; - caption-side: top; -} - -.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 5px; - background-color: #999999; - color: #FFFFFF; -} - -.preftable td { - border-collapse: collapse; - border-width: 1px; - border-color: #999999; - border-style: solid; - text-align: right; - padding-right: 5px; - padding-left: 5px; -} .voterbox { border-spacing: 0px; -- 2.39.5