Listing Contests

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

Current Contests

<% if cuser and cuser.admin? %> <% end %> <% @contests_active.each do |contest| %> <% if cuser and cuser.admin? %> <% end %> <% end %>
Name Start Status
<%= link_to (h contest.name), contest %> <%= longdate contest.start %> <%= contest.statuses[contest.status] %> <%= link_to icon('pencil'), edit_contest_path(contest) %> <%= link_to icon('times'), contest, confirm: 'Are you sure?', method: :delete %>
<% if cuser and cuser.admin? %> <%= link_to 'New Contest', new_contest_path, class: 'button' %> <% end %>