<% if (@tournament.hosts.include?(current_user) and @match.winner.nil?) %>
<%= form_for([@tournament, @match], method: "put") do |f| %>
<% @match.teams.each do |team| %>
<% end %>
<%= f.submit("Select Winner") %>
<% end %>
<% end %>
<% if (@match.status==0) %>
<% if (@tournament.players.include?(current_user) || @tournament.hosts.include?(current_user)) %>
<% @match.teams.each do |team| %>
<% team.users.collect{|u| u.user_name}.each do |k| %>
<% end %>
<% end %>
<% end %>
<% end %>
<% if (@match.status==0) %>
<% if (@tournament.players.include?(current_user) %>
<% @match.teams.each do |team| %>
<% team.users.collect{|u| u.user_name}.each do |k| %>
<% end %>
<% end %>
<% end %>
<% end %>
<% unless @match.winner.nil? %>