X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/c35eb01007440d21ded1ec10e56406108fe44294..e3b1d64e4220f627e53b6c8c0f70ba941dfdc788:/app/views/front/_user_summary.rhtml?ds=sidebyside
diff --git a/app/views/front/_user_summary.rhtml b/app/views/front/_user_summary.rhtml
index ce65bba..30b3799 100644
--- a/app/views/front/_user_summary.rhtml
+++ b/app/views/front/_user_summary.rhtml
@@ -3,8 +3,12 @@
<% else %>
<% for election in @current_elections %>
- - <%= link_to election.name, :controller => 'election', :action => 'show', :id => election.id %> (ends in <%=
- distance_of_time_in_words Time.now, election.enddate %>)
+ - <%= link_to election.name, :controller => 'election', :action => 'show', :id => election.id %>
+ <% if Time.now > election.enddate %>
+ (election over)
+ <% else %>
+ (ends in <%= distance_of_time_in_words Time.now, election.enddate %>)
+ <% end %>
<% end %>
<% end %>