+<% @votes = @election.votes.select {|v| v.confirmed? }.shuffle %>
+<% @voters = @votes.collect {|v| v.voter}.shuffle %>
+
<div id="title-header">
<span class="header">Details</span>
<span class="subheader"><%= @election.name %></span>
<ol>
<%- @voters.each do |voter| -%>
-<li><%= voter.email %></li>
+<li><% if voter.email %>
+ <%= voter.email %>
+ <% elsif @election.kiosk? %>
+ Kiosk Voter
+ <% else %>
+ Unknown voter
+ <% end %></li>
<%- end -%>
</ol>
<p>The following table lists the votes cast in random order.</p>
-<p>The column marked <em>Verification Token</em> 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 <em>Vote</em> lists the candidates in order of the voter's
-preference. To read these votes, refer to the key below.</p>
+<p><% if @election.verifiable %>The column marked <em>Verification
+Token</em> 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 <em>Vote</em> lists
+the candidates in order of the voter's preference. To read these votes,
+refer to the key below.</p>
<table class="preftable">
<tr>
<th></th>
-<th>Verification Token</th>
+<% if @election.verifiable %><th>Verification Token</th><% end %>
<th>Vote</th>
<%- @votes.each_with_index do |vote, i| -%>
<tr>
<td><%= i + 1 %></td>
-<td><%= vote.token %></td><td><%= vote.votestring%></td>
+<% if @election.verifiable %><td><%= vote.token %></td><% end %>
+<td><%= vote.votestring%></td>
</tr>
<%- end -%>
</table>