merged changed in from devel to activate voting in full elections
[selectricity-live] / app / views / election / show.rhtml
1 <div id="title-header">
2   <span class="header">Election Overview</span>
3   <span class="subheader"></span>
4 </div>
5
6 <% if @election.active? %>
7   <div id="status">Vote is in currently in progress. Return to
8         this page for results on <%= @election.enddate %>.</div>
9 <% elsif @election.done? %>
10   <div id="status">Election is finished. <%= link_to "View results",
11   :action => 'results', :id => @election.id %>.</div>
12 <% end %>
13
14 <p><strong>Summary</strong></p>
15
16 <blockquote>
17 <%= h(@election.name) %>
18 </blockquote>
19
20 <p><strong>Description</strong></p>
21
22 <blockquote>
23 <%= h(@election.description) %>
24 </blockquote>
25
26 <p><strong>End Date</strong></p>
27
28 <blockquote>
29 <%= @election.enddate %>
30 </blockquote>
31
32 <% unless @election.active %>
33 <p><%= link_to "Edit overview.", :action => 'edit', :id => @election.id %></p>
34 <% end %>
35
36 <div class="normal-header">
37   <span class="header">Candidates</span>
38   <span class="subheader"></span>
39 </div>
40
41 <% unless @election.candidates.empty? %>
42   <%= render :partial => 'candidate_list' %>
43   <% unless @election.active %>
44   <p><%= link_to "Add, remove, or edit candidates.", :action => 'edit_candidates', :id => @election.id %></p>
45   <% end %>
46 <% else %>
47   <p><em>There are currently no candidates registered.  <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id unless @election.active %></em></p>
48
49 <% end %>
50
51 <div class="normal-header">
52   <span class="header">Voters</span>
53   <span class="subheader"></span>
54 </div>
55
56 <% unless @election.voters.empty? %>
57   <%= render :partial => 'voter_list' %>
58   <%= link_to "Add or remove voters.", :action => 'edit_voters', :id => @election.id unless @election.active %></em></p>
59 <% else %>
60   <p><em>There are currently no voters registered.  <%= link_to "Add some!", :action => 'edit_voters', :id => @election.id unless @election.active %></em></p>
61 <% end %>
62
63 <% unless @election.active? %>
64
65 <div class="normal-header">
66   <span class="header">Start Election</span>
67   <span class="subheader"></span>
68 </div>
69
70   <% if @election.start_blockers.length > 0 %>
71     <p>Your vote cannot be started for the following reasons:</p>
72     <ul>
73     <% for reason in @election.start_blockers %>
74     <li><%= reason %></li>
75     <% end %>
76     </ul>
77   <% else %>
78     <p>Please check everything carefully on this page before starting this
79     vote. Once you begin the vote, you will <em>not</em> be able to add or
80     change candidates, modify the voting lists, or change the end
81     time.</p>
82
83     <p>When you begin the vote, the following will happen:</p>
84
85     <ul>
86     <li>The vote will be "frozen" so that further edits to the
87         candidate list and voting list cannot occur.</li>
88     <li>All voters will be emailed notifying them that the vote has
89         begun and of their unique login token.</li>
90     </ul>
91
92     <%= button_to 'Start Election!', :action => 'start_election', :id => @election.id %>
93   <% end %>
94
95 <% end %>

Benjamin Mako Hill || Want to submit a patch?