X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/c35eb01007440d21ded1ec10e56406108fe44294..8a444bfe3f442135ba66e5d9b8cdddfa9e3b50f2:/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 %>