In the middle of adding custom theme supports. Skin_pictures table added to store...
[selectricity-live] / app / views / election / edit_candidates.rhtml
index 0c416d5ee071cb757a11c9b3ff73e10869b23333..7e1f315c9506f86268f94046fedee7c361689ee1 100644 (file)
@@ -1,14 +1,46 @@
-<% @edit = true %>
-<h1><strong><%= @election.name %>:</strong> Edit Candidates</h1>
+<div id="title-header">
+  <span class="header">Edit Candidates</span>
+  <span class="subheader"></span>
+</div>
 
-<p>The following are valid options or candidates in this election:</p>
+<div class="clear-div"></div>
 
-<ul>
-<% @election.candidates.each do |candidate| %>
-   <% @candidate = candidate %>
-   <%= render :partial => 'candidate_line' %>
+<div class="normal-header">
+  <span class="header">Enter New Candidate</span>
+  <span class="subheader"></span>
+</div>
+
+<%= error_messages_for :candidate %>
+
+<% form_tag( { :action => :add_candidate, :id => @election.id },
+              :multipart => true ) do %>
+<%= render :partial => 'candidate_form' %>
+<p><%= submit_tag "Add Candidate" %></p>
+<% end %>
+
+
+<div class="normal-header">
+  <span class="header">Current Candidates</span>
+  <span class="subheader"></span>
+</div>
+
+
+<% unless @election.candidates.empty? %>
+  <% @election.candidates.each do |candidate| %>
+    <% @current_candidate = candidate %>
+    <%= render :partial => 'candidate_line_edit' %>
+  <% end %>
+
+<% else %>
+  <p>There are no candidates registered for this election.</p>
 <% end %>
-</ul>
 
-<%= render :partial => 'candidates_form' %>
-<%= button_to "Done!", :action => 'show', :id => @election %>
+<div class="normal-header">
+  <span class="header">Continue</span>
+  <span class="subheader"></span>
+</div>
+
+<p>When you are done entering candidates, please click the button below
+to proceed to the next step.</p>
+
+<%= button_to "Proceed to Next Step", :action => 'new_voters', :id => @election %>

Benjamin Mako Hill || Want to submit a patch?