<% if @match.score1 and @match.score2%>
<% if @match.score1 > @match.score2; c1 = 'green'; c2 = 'red' end %>
<% if @match.score1 < @match.score2; c1 = 'red'; c2 = 'green' end %>
<% if @match.score1 == @match.score2; c1 = 'yellow'; c2 = 'yellow' end %>
<%= namelink @match.contester1.team if @match.contester1 %>
<%= h @match.score1 %>
-
<%= h @match.score2 %>
<%= namelink @match.contester2.team if @match.contester2 %>
<% else %>
<%= namelink @match.contester1.team if @match.contester1 %>
vs
<%= namelink @match.contester2.team if @match.contester2 %>
<% end %>
<%= longtime @match.match_time %>
<%= cascade @match, [:contest, :server, :hltv, :demo, :referee, [@match.contester1, "team1_lineup"], [@match.contester2, "team2_lineup"], ["Man of the Match", :motm]] %>
Maps:
<%= namelink @match.map1 %>, <%= namelink @match.map2 %>
<% if @match.hltv %>
<%= link_to "Connect to HLTV", "steam://connect/#{@match.hltv.addr}" %>
<% end %>
<%# if cuser and @match.can_update? cuser, [:matchers_attributes] %>
<%# if cuser and cuser.admin? %>
<%#= link_to "Scoring and lineup", :action => "score", :id => @match %>
<%# end %>
<% if cuser and @match.can_update? cuser, [:report] %>
<%= link_to "Referee (Scoring, Line-Ups, Man of the match)", :controller => :matches, :action => "ref", :id => @match %>
<% end %>
<%# if cuser and @match.can_update? cuser, [:hltv] %>
<%#= link_to "Extras", :action => "extra", :id => @match %>
<%# end %>
Predictions (<%= @match.predictions.count %>)
<% if @newpred.can_create? cuser %>
<%= form_for @newpred do |f| %>
<%= f.hidden_field :match_id %>
<%= f.text_field :score1, :size => 1 %> -
<%= f.text_field :score2, :size => 1 %>
<%= submit_tag "Save Prediction" %>
<% end %>
<% else %>
<%= @match.contester1.team if @match.contester1 %>: <%= @match.preds(1) %>%
<%= @match.contester2.team if @match.contester2 %>: <%= @match.preds(2) %>%
<% end %>
<% unless @match.report.nil? or @match.report.empty? %>