Renamed "elections" controller to "election."
[selectricity-live] / app / views / election / _candidate_line.rhtml
diff --git a/app/views/election/_candidate_line.rhtml b/app/views/election/_candidate_line.rhtml
new file mode 100644 (file)
index 0000000..7f68e6f
--- /dev/null
@@ -0,0 +1,11 @@
+<div id="cand<%= @candidate.id %>">
+  <li>
+    <%= @candidate.name %>
+    <% if @edit %>
+      <%= link_to_remote "Delete",
+                         :complete => "Element.remove('cand#{@candidate.id}')",
+                        :url => { :action => :delete_candidate, :id => @candidate.id } %>
+    <% end %>
+
+  </li>
+</div>

Benjamin Mako Hill || Want to submit a patch?