]> projects.mako.cc - selectricity/blobdiff - app/views/election/_candidate_line.rhtml
updated db schema
[selectricity] / app / views / election / _candidate_line.rhtml
index 7f68e6fa60b1177abdf5c4d59524da29db4618db..2fc9a6353728e61e6cf421ee2949b510d62369f9 100644 (file)
@@ -1,11 +1,17 @@
-<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 %>
+<div id="cand<%= @current_candidate.id %>">
+  <li><%=h @current_candidate.name -%>
+    <span id="show_candidate_link_<%= @current_candidate.id %>">
+    (<%= link_to "Show Details", "#",
+         :onclick => "show_candidate_info(#{@current_candidate.id}); return false;"  %>)
+    </span>
+    <span style="display: none;" id="hide_candidate_link_<%= @current_candidate.id %>">
+    (<%= link_to "Hide Details", "#",
+         :onclick => "hide_candidate_info(#{@current_candidate.id}); return false;" %>)
+    <br />
 
 
+    <div style="display: none;" id="candidate_description_<%= @current_candidate.id %>">
+    <%= render :partial => 'candidate_box_info' %>
+    </>
+    </span>
   </li>
 </div>
   </li>
 </div>

Benjamin Mako Hill || Want to submit a patch?