1 <div id="title-header">
2 <span class="header">Election Overview</span>
3 <span class="subheader"></span>
5 <% if @election.enddate < Time.now %>
6 <div id="status">Election is finished. <%= link_to "View results",
7 :controller => 'voter', :action => 'index',
8 :election_id => @election.id %>.</div>
10 <% elsif (@election.active? && @election.early_results? ) %>
11 <div id="status">The creator of this election has decided that the results
12 should be viewable while the election is in progress.
13 <%if @election.voters.empty? %>
14 However, no one has voted yet.
16 <%= link_to "View results", :controller => 'voter', :action => 'results',
20 <% elsif @election.active? %>
21 <div id="status">Vote is in currently in progress. Return to
22 this page for results on <%= @election.enddate %>.</div>
25 <p style="text-align: right;">
26 <%= link_to "Edit General Information",
27 :action => 'edit_general_information', :id => @election.id %>
31 <p><strong>Summary</strong></p>
34 <%= h(@election.name) %>
37 <p><strong>Description</strong></p>
40 <%= h(@election.description) %>
43 <p><strong>Additional Information</strong></p>
45 <ul> <li>Elections will end at <strong><%= @election.enddate
46 %></strong>.</li> <li>Elections results <strong><% if
47 @election.early_results %>will be<% else %>will not be<% end
48 %></strong> visible while election is in progress.</li>
50 <% if @election.embeddable %>
51 <li>Elections <strong>will be</strong> embeddable.</li>
54 <% if @election.kiosk %>
55 <li>Selectricity's kiosk mode <strong>will be</strong> available.</li>
58 <% if @election.verifiable%>
59 <li>Voters <strong>will be</strong> given tokens to verify their votes.</li>
61 <li>Elections <strong>will not be</strong> voter verifiable.</li>
66 <% if @election.active? and not @election.authenticated? %>
67 <p><strong>Link to election:</strong></p>
69 <li><%= (link_to ("Vote in election",
70 :controller => 'voter', :action => 'index', :election_id => @election.id)).to_s %>
71 (<%= votepassword_url(:urlpassword => "open." + @election.id.to_s) %>)</li>
73 <% if @election.kiosk %>
74 <li><%= link_to("Kiosk mode",
75 kiosk_ready_url(:urlpassword => "open." + @election.id.to_s,
77 (<%= kiosk_ready_url(:urlpassword => "open." + @election.id.to_s, :kiosk => true) %>)
82 <div class="normal-header">
83 <span class="header">Candidates</span>
84 <span class="subheader"></span>
88 <% if not (@election.active? or @election.done?) %>
89 <p style="text-align: right;">
90 <%= link_to "Edit Candidates",
91 :action => 'edit_candidates', :id => @election.id %></p>
95 <% if @election.candidates.empty? %>
96 <p><em>There are currently no candidates registered.</em>
97 <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id %>
100 <%= render :partial => 'candidate_list' %>
103 <div class="normal-header">
104 <span class="header">Voters</span>
105 <span class="subheader"></span>
108 <% if not (@election.active? or @election.done?) %>
109 <p style="text-align: right;">
110 <%= link_to "Change Voters/Options",
111 :action => 'edit_voters', :id => @election.id %></p>
114 <% if not @election.authenticated? %>
115 <p><em>This election is open the public.</em></p>
116 <% elsif @election.voters.empty? %>
117 <p><em>There are currently no voters registered. </em>
118 <%= link_to "Add some!", :action => 'edit_voters',
119 :id => @election.id %></p>
121 <%= render :partial => 'voter_list' %>
122 <p><em><%= link_to "Add or remove voters.", :action => 'edit_voters',
123 :id => @election.id unless @election.active? or @election.done? %>
127 <% if not (@election.active? or @election.done?) %>
129 <div class="normal-header">
130 <span class="header">Start Election</span>
131 <span class="subheader"></span>
134 <% if @election.start_blockers.length > 0 %>
135 <p>Your vote cannot be started for the following reasons:</p>
137 <% for reason in @election.start_blockers %>
138 <li><%= reason %></li>
142 <p>Please check everything carefully on this page before starting this
143 vote. Once you begin the vote, you will <em>not</em> be able to add or
144 change candidates, modify the voting lists, or change the end
147 <p>When you begin the vote, the following will happen:</p>
150 <li>The vote will be "frozen" so that further edits to the
151 candidate list and voting list cannot occur.</li>
152 <% if @election.authenticated? %>
153 <li>All voters will be emailed notifying them that the vote has
154 begun and of their unique login token.</li>
158 <%= button_to 'Start Election!', :action => 'start_election', :id => @election.id %>
161 <% elsif @election.embeddable? %>
163 <div class="normal-header">
164 <span class="header">Embedding</span>
165 <span class="subheader"></span>
169 <p>To embed your election, copy and paste the following code into your
172 <pre><%= h("<iframe src='") + votepassword_url(:urlpassword => "open." + @election.id.to_s, :embed => "true") + h("' width='330px' height='#{(@election.candidates.length+2)*53}px'>" ) %>
173 <%= h("</iframe>") %></pre>