Listing Contests

<% if cuser and cuser.admin? %> <%= link_to 'New Contest', new_contest_path %> <% end %>

Current Contests

<% if cuser and cuser.admin? %> <% end %> <% @contests_active.each do |contest| %> <% if contest.rules and contest.rules.title then %> <% else %> <% end %> <% if cuser and cuser.admin? %> <% end %> <% end %>
Name Start End Rules StatusOptions
<%= link_to (h contest.name), contest %> <%= longtime contest.start %> <%= longtime contest.end %><%= link_to (h contest.rules.title), contest.rules %><%= "No ruleset specified" %><%= contest.statuses[contest.status] %> <%= link_to 'Edit', edit_contest_path(contest) %> <%= link_to 'Destroy', contest, :confirm => 'Are you sure?', :method => :delete %>

Previous Contests

<% if cuser and cuser.admin? %> <% end %> <% @contests_inactive.reverse_each do |contest| %> <% if contest.winner then %> <% else %> <% end %> <% if cuser and cuser.admin? %> <% end %> <% end %>
Name Start End Winner StatusOptions
<%= link_to (h contest.name), contest %> <%= longtime contest.start %> <%= longtime contest.end %><%= flag contest.winner.team.country %> <%= link_to (h contest.winner.team.name), contest.winner %><%= %> <%= %><%= contest.statuses[contest.status] %> <%= link_to 'Edit', edit_contest_path(contest) %> <%= link_to 'Destroy', contest, :confirm => 'Are you sure?', :method => :delete %>

<% if cuser and cuser.admin? %> <%= link_to 'New Contest', new_contest_path %> <% end %>