90c93eacad2082a19f0a50280667f31eb4e54083
[selectricity] / app / views / election / show.rhtml
1 <% %>
2 <h1>Information On <%= @election.name %></h1>
3
4 <h2>Election Overview</h2> 
5  
6 <p><strong>Description</strong></p>
7
8 <blockquote>
9 <%= h(@election.description) %>
10 </blockquote>
11
12 <p><strong>Election End Date</strong></p>
13
14 <blockquote>
15 <%= @election.enddate %>
16 </blockquote>
17
18 <p><%= link_to "Edit election overview.", :action => 'edit', :id => @election.id %></p>
19
20 <h2>Candidates</h2> 
21
22 <% unless @election.candidates.empty? %>
23   <%= render :partial => 'candidate_list' %>
24   <p><%= link_to "Add, remove, or edit candidates.", :action => 'edit_candidates', :id => @election.id %></p>
25 <% else %>
26   <p><em>There are currently no candidates registered for this election.
27   <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id %></em></p>
28
29 <% end %>
30
31 <h2>Voters</h2>
32
33 <% unless @election.voters.empty? %>
34   <%= render :partial => 'voter_list' %>
35   <%= link_to "Add or remove voters.", :action => 'edit_voters', :id => @election.id %></em></p>
36 <% else %>
37   <p><em>There are currently no voters registered for this election.
38   <%= link_to "Add some!", :action => 'edit_voters', :id => @election.id %></em></p>
39 <% end %>
40
41 <h2>Start Election</h2>
42
43 <% if @election.start_blockers.length > 0 %>
44   <p>Your election cannot be started for the following reasons:</p>
45   <ul>
46   <% for reason in @election.start_blockers %>
47   <li><%= reason %></li>
48   <% end %>
49   </ul>
50 <% else %>
51 <p>Please check eveything carefully on this page before starting this
52 election. Once you begin the election, you will <em>not</em> be able to
53 add or change candidates, modify the voting lists, or change the
54 election end time.</p>
55
56 <p>When you begin the election, the following will happen:</p>
57
58 <ul>
59   <li>The election will be "frozen" so that further edits to the
60       candidate list and voting list cannot occur.</li>
61   <li>All voters will be emailed notifying them that the election has
62       begun and of their unique login token.</li>
63 </ul>
64
65 <%= button_to 'Start Election!', :action => 'start_election', :id => @election.id %>
66
67 <% end %>

Benjamin Mako Hill || Want to submit a patch?