X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/5901217a8893619fbdb02d540c08390f92eae368..07ff860387aed826ff4046f16a27324c58e4fb3d:/app/views/front/_user_summary.rhtml
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 %>