* refactored the system so that it keeps pictures in a seperate table
[selectricity] / app / views / election / edit_candidates.rhtml
1 <%= render_partial 'progress', 'candidates' %>
2 <h1>Edit/Add Candidates</h1>
3
4 <%= error_messages_for :candidate %>
5
6 <% unless @election.candidates.empty? %>
7   <p>The following are valid options or candidates in this election:</p>
8 1;3A
9
10   <% @election.candidates.each do |candidate| %>
11     <% @current_candidate = candidate %>
12     <%= render :partial => 'candidate_line_edit' %>
13   <% end %>
14
15 <% else %>
16   <p>There are no candidates registered for this election.</p>
17 <% end %>
18
19 <p>Please enter new candidates below.</p>
20
21 <% form_tag( { :action => :add_candidate, :id => @election.id },
22               :multipart => true ) do %>
23 <%= render :partial => 'candidate_form' %>
24 <%= submit_tag "Add Candidate" %>
25 <% end %>
26
27 <%= button_to "Done!", :action => 'new_voters', :id => @election %>

Benjamin Mako Hill || Want to submit a patch?