<%= @contest.name %>

<% content_for :sidebar do %>

Contest Details

Start - End
<%= longdate @contest.start %>
<%= longdate @contest.end %>
Rules
<%= namelink @contest.rules %>
Status
<%= @contest.statuses[@contest.status] %>
Default
Sunday: <%= Time.use_zone(timezone_offset) { @contest.default_time.strftime("%H:%M %Z") } %>
<%= link_to 'Scheduled Matches', confirmed_matches_path(@contest), class: 'button' %> <% if @contest.can_update?(cuser) %> <%= link_to 'Edit Contest', edit_contest_path(@contest), class: 'button' %> <% end %>
<% end %>
<% if @contest.contest_type == Contest::TYPE_BRACKET %> <%= render partial: 'bracket', locals: { contest: @contest } %> <% elsif @contest.contest_type == Contest::TYPE_LADDER %> <%= render partial: "contesters/ladder", locals: { actions: true, contest: @contest } %> <% else %> <%= render partial: 'normal' %> <% end %>

Matches Played

<% if @contest.weeks.count > 0 %> <% @contest.weeks.ordered.each do |week| %> <% next if week.matches.realfinished.size == 0 %> <% if @contest.contest_type == Contest::TYPE_LADDER %> <% end %> <% week.matches.realfinished.ordered.reverse_each do |match| %> <% if @contest.contest_type == Contest::TYPE_LADDER %> <% end %> <% end %> <% end %>
<%= week.name %> Date ScorePoints
<%= namelink match.contester1.team if match.contester1 %> vs <%= namelink match.contester2.team if match.contester1 %> <%= shorttime match.match_time %> <%= link_to match, :class => "bold #{match.score_color}" do %> <%= h match.score1 %> - <%= h match.score2 %> <% end %> <%= match.points1 || 0 %> / <%= match.points2 || 0 %>
<% else %> <% if @contest.contest_type == Contest::TYPE_LADDER %> <% end %> <% @contest.matches.realfinished.ordered.each do |match| %> <% if @contest.contest_type == Contest::TYPE_LADDER %> <% end %> <% end %>
Teams Date ScorePoints
<%= namelink match.contester1.team %> vs <%= namelink match.contester2.team %> <%= shorttime match.match_time %> <%= link_to(match) do %> <%= h match.score1 %> - <%= h match.score2 %> <% end %> <%= match.points1 || 0 %> / <%= match.points2 || 0 %>
<% end %> <% if @contest.matches.unfinished.ordered.count > 0 %>

Matches to be played

<% @contest.matches.unfinished.ordered.reverse_each do |match| %> <% end %>
Teams Date
<%= namelink match.contester1.team if match.contester1 %> vs <%= namelink match.contester2.team if match.contester2 %> <%= link_to shorttime(match.match_time), match %>
<% end %>
<% @contest.preds_with_score.each do |prediction| %> <% end %>
User Result
<%= namelink prediction.user %> <%= prediction.correct %> / <%= prediction.total %> correct (<%= prediction.score.to_f.round(2) %>%)
    <% @contest.maps.each do |map| %>
  • <%= map %>
  • <% end %>