]> projects.mako.cc - selectricity/blobdiff - app/views/election/_candidate_list.rhtml
Added some minor TODO's for increased user funcitonality. Change email, beautify...
[selectricity] / app / views / election / _candidate_list.rhtml
index 881c0a5fb84d466a08338d25326793fa9401e18c..2691f5bb552c6c07f382ae5664024bf2c9300daf 100644 (file)
@@ -1,7 +1,20 @@
-<% %>
 <ul id="candidate_list">
   <% @election.candidates.each do |candidate| %>
       <% @current_candidate = candidate %>
-      <%= render(:partial => 'candidate_line')%>
+      <%= render(:partial => 'election/candidate_line')%>
     <% end %>
 </ul>
+
+<script>
+function show_candidate_info(id) {
+    Element.hide($("show_candidate_link_" + id));
+    Element.show($("candidate_description_" + id));
+    Element.show($("hide_candidate_link_" + id));
+}
+
+function hide_candidate_info(id) {
+    Element.hide($("hide_candidate_link_" + id));
+    Element.hide($("candidate_description_" + id));
+    Element.show($("show_candidate_link_" + id));
+}
+</script>

Benjamin Mako Hill || Want to submit a patch?