X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/c35eb01007440d21ded1ec10e56406108fe44294..e8111bfbb23641eb8f5e6afadab6ec38e9e260c4:/app/views/front/_user_summary.rhtml?ds=inline
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 %>