2014-04-21 18:19:03 +00:00
|
|
|
<div id="match">
|
|
|
|
<div class="contesters">
|
|
|
|
<% if @match.score1 and @match.score2 %>
|
|
|
|
<h1 class="team-1"><%= namelink @match.contester1.team if @match.contester1 %></h1>
|
|
|
|
<div class="versus split">
|
|
|
|
<div class="score-1">
|
|
|
|
<%= h @match.score1 %>
|
|
|
|
</div>
|
|
|
|
<span class="vs"></span>
|
|
|
|
<div class="score-2">
|
|
|
|
<%= h @match.score2 %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h1 class="team-2"><%= namelink @match.contester2.team if @match.contester2 %></h1>
|
|
|
|
<% else %>
|
|
|
|
<h1 class="team-1"><%= namelink @match.contester1.team if @match.contester1 %></h1>
|
|
|
|
<div class="versus">
|
|
|
|
<span class="vs">VS</span>
|
|
|
|
</div>
|
|
|
|
<h1 class="team-2"><%= namelink @match.contester2.team if @match.contester2 %></h1>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<% if @match.team1_lineup.any? || @match.team2_lineup.any? %>
|
|
|
|
<div class="lineups <%= 'shift' if !@match.team1_lineup.any? %>">
|
|
|
|
<% if @match.team1_lineup.any? %>
|
|
|
|
<div class="team-1">
|
|
|
|
<ul>
|
|
|
|
<% @match.team1_lineup.each do |teamer| %>
|
|
|
|
<li>
|
|
|
|
<% if teamer.user == @match.motm %>
|
|
|
|
<%= icon 'star' %>
|
|
|
|
<% end %>
|
|
|
|
<%= teamer.user.username %>
|
|
|
|
<%= flag teamer.user.country %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<% if @match.team2_lineup.any? %>
|
|
|
|
<div class="team-2">
|
|
|
|
<ul>
|
|
|
|
<% @match.team2_lineup.each do |teamer| %>
|
|
|
|
<li>
|
|
|
|
<%= flag teamer.user.country %>
|
|
|
|
<%= teamer.user.username %>
|
|
|
|
<% if teamer.user == @match.motm %>
|
|
|
|
<%= icon 'star' %>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<div class="details">
|
|
|
|
<h3 class="contest"><%= @match.contest %></h3>
|
|
|
|
<h5 class="date"><%= @match.match_time.strftime("%A %e %B %Y") %></h5>
|
|
|
|
<h5 class="date"><%= Time.use_zone(timezone_offset) { @match.match_time.strftime("%H:%M %Z") } %></h5>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="predictions">
|
|
|
|
<h4>Predictions (<%= @match.predictions.count %>)</h4>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<% if @newpred.can_create? cuser %>
|
|
|
|
<%= form_for @newpred do |f| %>
|
|
|
|
<%= f.hidden_field :match_id %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<div class="fields">
|
|
|
|
<div class="team-1">
|
|
|
|
<%= f.text_field :score1, size: 1, placeholder: 0 %>
|
|
|
|
</div>
|
|
|
|
<div class="team-2">
|
|
|
|
<%= f.text_field :score2, size: 1, placeholder: 0 %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<div class="add">
|
|
|
|
<%= submit_tag "Add Prediction", class: 'button tiny' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<div class="team-1">
|
|
|
|
<%= @match.contester1.team if @match.contester1 %>
|
|
|
|
<div class="highlight"><%= @match.preds(1) %>%</div>
|
|
|
|
</div>
|
|
|
|
<div class="team-2">
|
|
|
|
<div class="highlight"><%= @match.preds(2) %>%</div>
|
|
|
|
<%= @match.contester2.team if @match.contester2 %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
2014-04-21 18:19:03 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<div class="details">
|
|
|
|
<%= cascade @match, [:server, :demo, :referee] %>
|
|
|
|
<strong>Maps</strong><br>
|
|
|
|
<%= namelink @match.map1 %>, <%= namelink @match.map2 %>
|
2014-05-10 08:44:48 +00:00
|
|
|
|
|
|
|
<% if @match.caster && @match.caster.profile.stream %>
|
|
|
|
<dl>
|
|
|
|
<dt>Stream</dt>
|
|
|
|
<dd>
|
|
|
|
<%= link_to @match.caster.profile.stream, @match.caster.profile.stream %>
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<% end %>
|
2014-04-21 18:19:03 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% unless @match.report.nil? or @match.report.empty? %>
|
|
|
|
<div class="report">
|
|
|
|
<h3>Match Report</h3>
|
|
|
|
<p><%= @match.report.html_safe %></p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<% if cuser and @match.can_update? cuser, [:report] %>
|
|
|
|
<div class="referee">
|
|
|
|
<%= link_to "Referee Admin", { controller: :matches, action: 'ref', id: @match }, class: 'button' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<%= add_comments @match %>
|