merged in from code from the other master
[selectricity] / app / views / election / edit_candidates.rhtml
1 <div id="title-header">
2   <span class="header">Edit Candidates</span>
3   <span class="subheader"></span>
4 </div>
5
6 <div class="clear-div"></div>
7
8 <% if @election.active == 0 %>
9
10 <div class="normal-header">
11   <span class="header">Enter New Candidate</span>
12   <span class="subheader"></span>
13 </div>
14
15 <%= error_messages_for :candidate %>
16
17 <% form_tag( { :action => :add_candidate, :id => @election.id },
18               :multipart => true ) do %>
19 <%= render :partial => 'candidate_form' %>
20 <p><%= submit_tag "Add Candidate" %></p>
21 <% end %>
22
23
24 <div class="normal-header">
25   <span class="header">Current Candidates</span>
26   <span class="subheader"></span>
27 </div>
28
29
30 <% unless @election.candidates.empty? %>
31   <% @election.candidates.each do |candidate| %>
32     <% @current_candidate = candidate %>
33     <%= render :partial => 'candidate_line_edit' %>
34   <% end %>
35
36 <% else %>
37   <p>There are no candidates registered for this election.</p>
38 <% end %>
39
40 <div class="normal-header">
41   <span class="header">Continue</span>
42   <span class="subheader"></span>
43 </div>
44
45 <p>When you are done entering candidates, please click the button below
46 to proceed to the next step.</p>
47
48 <%= button_to "Proceed to Next Step", :action => 'new_voters', :id => @election %>
49
50 <% else %>
51
52 <p>You can not edit the list of candidates once the election has begun.
53 please return to the <%= link_to "election overview page", :action =>
54 'show', :id => @election.id %>.</p>
55
56 <% end %>

Benjamin Mako Hill || Want to submit a patch?