<span class="header">Election Overview</span>
<span class="subheader"></span>
</div>
-
-<% if @election.done? %>
+<% if @election.enddate < Time.now %>
<div id="status">Election is finished. <%= link_to "View results",
- :action => 'detailed_results', :id => @election.id %>.</div>
+ :controller => 'voter', :action => 'index',
+ :election_id => @election.id %>.</div>
-<% elsif (@election.active? && @election.viewable?) %>
- <div id="status">The creator of this election has decided that the results
+<% elsif (@election.active? && @election.early_results? ) %>
+ <div id="status">You have decided that the results
should be viewable while the election is in progress.
- <%if @election.voters.empty? %>
+ <%if @election.voters.select {|v| v.vote.confirmed?}.empty? %>
However, no one has voted yet.
<% else %>
- <%= link_to "View results", :action => 'detailed_results',
+ <%= link_to "View results", :controller => 'election', :action => 'results',
:id => @election.id %>.
<% end %>
</div>
<ul> <li>Elections will end at <strong><%= @election.enddate
%></strong>.</li> <li>Elections results <strong><% if
@election.early_results %>will be<% else %>will not be<% end
-%></strong> will be visible while election is in progress.</li>
+%></strong> visible while election is in progress.</li>
<% if @election.embeddable %>
<li>Elections <strong>will be</strong> embeddable.</li>
<% end %>
+<% if @election.kiosk %>
+<li>Selectricity's kiosk mode <strong>will be</strong> available.</li>
+<% end %>
+
+<% if @election.verifiable%>
+<li>Voters <strong>will be</strong> given tokens to verify their votes.</li>
+<% else %>
+<li>Elections <strong>will not be</strong> voter verifiable.</li>
+<% end %>
+
</ul>
<% if @election.active? and not @election.authenticated? %>
-<p><strong>Link</strong></p>
-<%= (link_to ("Go Vote!",
- :controller => 'voter', :action => 'index', :election_id => @election.id)).to_s %>
+<p><strong>Link to election:</strong></p>
+<ul>
+<li><%= (link_to ("Vote in election",
+ :controller => 'voter', :action => 'index', :election_id => @election.id)).to_s %>
+ (<%= votepassword_url(:urlpassword => "open." + @election.id.to_s) %>)</li>
+
+<% if @election.kiosk %>
+<li><%= link_to("Kiosk mode",
+ kiosk_ready_url(:urlpassword => "open." + @election.id.to_s,
+ :kiosk => true)) %>
+ (<%= kiosk_ready_url(:urlpassword => "open." + @election.id.to_s, :kiosk => true) %>)
+ <% end %>
+</ul>
<% end -%>
<div class="normal-header">