Tournament:
<%= @match.tournament.id %>
@@ -27,49 +26,38 @@
Note:- The change of status from 1 to 2 is coming from League Data Pull (RIOT API)
-->
-
-<% 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 (@match.status==1) %>
<% 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| %>
-
+
<%= k %>
<% end %>
-
+
<% end %>
<% end %>
<% end %>
<% if (@match.status==0) %>
- <% if (@tournament.players.include?(current_user) %>
+ <% if (@tournament.players.include?(current_user)) %>
<% @match.teams.each do |team| %>
-
+
<% team.users.collect{|u| u.user_name}.each do |k| %>
-
+
<%= k %>
<% end %>
-
- <% end %>
+
+ <% end %>
+ <% elsif (@tournament.hosts.include?(current_user)) %>
+
<% end %>
<% end %>
--
cgit v1.2.3-54-g00ecf