merged in changes from live version
[selectricity-live] / app / views / front / _user_summary.rhtml
1 <% if @current_elections.length < 1 %>
2   <p><em>You have not created any elections.</em></p>
3 <% elsif @current_elections.length > 6 %>
4 <p>You have more than six elections which may not fit on the control panel. Clcik on the following link to go to your user profile, which lists all your elections. <b/> 
5 <%= link_to "Summary", :controller => "account", :action => "summary", :id => session[:user].id %> </p>
6 <% else %>
7   <ul>
8   <% for election in @current_elections %>
9     <li><%= link_to election.name, :controller => 'election', :action => 'show', :id => election.id %>
10     <% if Time.now > election.enddate %>
11       (election over)
12     <% else %>
13       (ends in <em><%= distance_of_time_in_words Time.now, election.enddate %></em>)</li> 
14     <% end %>
15   <% end %>
16   </ul>
17 <% end %>
18
19 <p><%= link_to "Create a new election", :controller => 'election', :action => 'new' %>.</p>
20

Benjamin Mako Hill || Want to submit a patch?