X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/e7bff908a0ea52b62e4fa0dc13be0293a51dcbb1:/app/views/voter/details.rhtml..83a39529b634c0344a7884d5813e3f7e1a7dbcb4:/app/views/common/details.rhtml diff --git a/app/views/voter/details.rhtml b/app/views/common/details.rhtml similarity index 50% rename from app/views/voter/details.rhtml rename to app/views/common/details.rhtml index cf73f41..ae09c29 100644 --- a/app/views/voter/details.rhtml +++ b/app/views/common/details.rhtml @@ -1,3 +1,6 @@ +<% @votes = @election.votes.select {|v| v.confirmed? }.shuffle %> +<% @voters = @votes.collect {|v| v.voter}.shuffle %> +
Details <%= @election.name %> @@ -11,27 +14,35 @@ election:

    <%- @voters.each do |voter| -%> -
  1. <%= voter.email %>
  2. +
  3. <% if voter.email %> + <%= voter.email %> + <% elsif @election.kiosk? %> + Kiosk Voter + <% else %> + Unknown voter + <% end %>
  4. <%- end -%>

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 -marked Vote lists the candidates in order of the voter's -preference. To read these votes, refer to the key below.

+

<% if @election.verifiable %>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.<% end %> The column marked Vote lists +the candidates in order of the voter's preference. To read these votes, +refer to the key below.

- +<% if @election.verifiable %><% end %> <%- @votes.each_with_index do |vote, i| -%> - +<% if @election.verifiable %><% end %> + <%- end -%>
Verification TokenVerification TokenVote
<%= i + 1 %><%= vote.token %><%= vote.votestring%><%= vote.token %><%= vote.votestring%>