]> projects.mako.cc - selectricity/blobdiff - app/views/election/_candidate_line.rhtml
Change ol to li.moveable for IE6 quirk; no need to remove all ordered lists
[selectricity] / app / views / election / _candidate_line.rhtml
index 7f68e6fa60b1177abdf5c4d59524da29db4618db..e5bcf07b22b22275675f00fa799d1857042c7d68 100644 (file)
@@ -1,11 +1,19 @@
-<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 } %>
+<div id="cand<%= @current_candidate.id %>">
+  <li><%=h @current_candidate.name -%>
+    <% if @show_details %>
+      (<%= link_to_remote "Hide Details",
+                         :update => "cand#{@current_candidate.id}",
+                         :url => { :action => :lessinfo_candidate,
+                                      :id => @current_candidate.id } %>)
+      <br />
+      <blockquote>
+      <%=h (@current_candidate.description) %>
+      </blockquote>
+    <% else %>
+      (<%= link_to_remote "Show Details",
+                         :update => "cand#{@current_candidate.id}",
+                         :url => { :action => :moreinfo_candidate,
+                                              :id => @current_candidate.id } %>)
     <% end %>
-
   </li>
 </div>

Benjamin Mako Hill || Want to submit a patch?