40e24b5fbf039d7036d1e4ba79ba23d82d74614d
[selectricity] / app / views / elections / list.rhtml
1 <h1>Listing elections</h1>
2
3 <table>
4   <tr>
5   <% for column in Election.content_columns %>
6     <th><%= column.human_name %></th>
7   <% end %>
8   </tr>
9   
10 <% for election in @elections %>
11   <tr>
12   <% for column in Election.content_columns %>
13     <td><%=h election.send(column.name) %></td>
14   <% end %>
15     <td><%= link_to 'Show', :action => 'show', :id => election %></td>
16     <td><%= link_to 'Edit', :action => 'edit', :id => election %></td>
17     <td><%= link_to 'Destroy', { :action => 'destroy', :id => election }, :confirm => 'Are you sure?' %></td>
18   </tr>
19 <% end %>
20 </table>
21
22 <%= link_to 'Previous page', { :page => @election_pages.current.previous } if @election_pages.current.previous %>
23 <%= link_to 'Next page', { :page => @election_pages.current.next } if @election_pages.current.next %> 
24
25 <br />
26
27 <%= link_to 'New election', :action => 'new' %>

Benjamin Mako Hill || Want to submit a patch?