X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/1660465f3e072cbddc19b19f7f8869affb0694c5..dc7d60a0de460c72d292b43616eb97a8b34741c8:/app/views/elections/list.rhtml diff --git a/app/views/elections/list.rhtml b/app/views/elections/list.rhtml index 40e24b5..83be6c6 100644 --- a/app/views/elections/list.rhtml +++ b/app/views/elections/list.rhtml @@ -1,20 +1,28 @@ +<% %>

Listing elections

- - - <% for column in Election.content_columns %> - - <% end %> - - +
<%= column.human_name %>
+ <% for election in @elections %> - <% for column in Election.content_columns %> - - <% end %> - - - + + + <% end %>
<%=h election.send(column.name) %><%= link_to 'Show', :action => 'show', :id => election %><%= link_to 'Edit', :action => 'edit', :id => election %><%= link_to 'Destroy', { :action => 'destroy', :id => election }, :confirm => 'Are you sure?' %>

<%= link_to election.name, :action => 'show', :id => election %>

+

Description:

+
<%= election.description %>
+ +

Election Information:

+
    +
  • <%= election.voters.length %> registered voters
  • +
  • <%= "Not " unless election.anonymous == 1 %>Anonymous
  • +
  • Starts <%= election.startdate %>
  • +
  • Ends <%= election.enddate %>
  • +
+
+

Candidates:

+ <% @election = election %><%= render :partial => 'candidate_list', :id => election.id %> +
+ <%= link_to 'Destroy', { :action => 'destroy', :id => election }, :confirm => 'Are you sure?' %>