Mostly worked on the candidate adding feature to include pictures and
[selectricity-live] / app / views / election / _candidate_line_edit.rhtml
diff --git a/app/views/election/_candidate_line_edit.rhtml b/app/views/election/_candidate_line_edit.rhtml
new file mode 100644 (file)
index 0000000..ea20a4f
--- /dev/null
@@ -0,0 +1,24 @@
+<% -%>
+<div id="cand<%= @current_candidate.id %>">
+<p><strong><%= @current_candidate.name %></strong>
+  (<%= link_to_remote "Delete",
+                       :complete => "Element.remove('cand#{@current_candidate.id}')",
+                       :url => { :action => :delete_candidate,
+                      :id => @current_candidate.id } %> |
+    <%= link_to "Edit", :action => 'edit_candidate', :id =>
+    @current_candidate.id %>)<br />
+    <blockquote>
+    <table><tr><td valign="top">
+      <% if @current_candidate.picture? %>
+      <img src="<%= url_for :action => 'candidate_picture',
+                            :id => @current_candidate.id %>"
+           align="top" />
+      <% end %>
+      </td>
+      <td valign="top">
+        <em>Description:</em><br />
+         <%= h(@current_candidate.description) %>
+    </td></tr></table>
+    </blockquote>
+</p>
+</div>

Benjamin Mako Hill || Want to submit a patch?