From 2d097c71a32646fce3b90608cbffde9992c979ef Mon Sep 17 00:00:00 2001
From: guntasgrewal The host has yet to post the scores of the match
+ <% team.users.collect{|u| u.user_name}.each do |k| %>
+
+ <% end %>
+
-<% if (@match.status==1) %>
- <% if (@tournament.players.include?(current_user) || @tournament.hosts.include?(current_user)) %>
+<% elsif (@match.status==1) %>
+ <% if @tournament.hosts.include?(current_user) && @scores.empty? %>
+ <%= form_tag(tournament_match_path(@tournament, @match), method: "put") do %>
+
+ <% @match.teams.each do |team| %>
+
+ <% end %>
+ <%= submit_tag("Enter Scores") %>
+ <% end %>
+ <% else %>
+ <% if @scores.empty? %>
+
<% team.users.collect{|u| u.user_name}.each do |k| %>
- <% end %>
+ <% end %>
+ <% else %>
+ <% @match.teams.each do |team| %>
+
+ <% team.users.each do |user| %>
+
+ <% end %>
+ <% end %>
<% end %>
-<% end %>
-<% if (@match.status==0) %>
+<% elsif (@match.status==2) %>
<% if (@tournament.players.include?(current_user)) %>
<% @match.teams.each do |team| %>
-
- <% team.users.collect{|u| u.user_name}.each do |k| %>
-
-
+ <% if team.users.include?(current_user) %>
+
+ <% team.users.collect{|u| u.user_name}.each do |k| %>
+
+ <% end %>
<% end %>
<% elsif (@tournament.hosts.include?(current_user)) %>
@@ -69,3 +104,23 @@