Renamed "elections" controller to "election."
[selectricity-live] / app / views / election / _voter_list.rhtml
diff --git a/app/views/election/_voter_list.rhtml b/app/views/election/_voter_list.rhtml
new file mode 100644 (file)
index 0000000..c1035d7
--- /dev/null
@@ -0,0 +1,23 @@
+<%
+# basic election information template
+-%>
+
+<% unless @election.voters.empty? %>
+  <p>The following voters are currently registered for this election:</p>
+
+  <ul>
+    <% @election.voters.each do |voter| %>
+    <div id="voter<%= voter.id %>">
+      <li><%= voter.email %>
+          <% if @edit %>
+          <%= link_to_remote "Delete",
+                      :complete => "Element.remove('voter#{voter.id}')",
+                     :url => { :action => :delete_voter, :id => voter.id } %>
+         <% end %>
+      </li>
+    </div>  
+    <% end %>
+  </ul>
+<% end %>
+
+

Benjamin Mako Hill || Want to submit a patch?