diff options
author | AndrewMurrell <amurrel@purdue.edu> | 2014-04-07 01:16:39 -0400 |
---|---|---|
committer | AndrewMurrell <amurrel@purdue.edu> | 2014-04-07 01:16:39 -0400 |
commit | f6412084d6aafe51a5da6ca31b5f1e79f2ca0029 (patch) | |
tree | 23b2eadc5c2f08166a4060dadbb07c45622c3a5c /app/views/matches/show.html.erb | |
parent | bfcf3ee4f4ef28457feb21a39d347f846184309c (diff) | |
parent | 0bb3311d90d74e80e6624897a56ab4e5641a2c76 (diff) |
Merged
Diffstat (limited to 'app/views/matches/show.html.erb')
-rw-r--r-- | app/views/matches/show.html.erb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 109aa70..cd30926 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -26,6 +26,7 @@ Note:- The change of status from 1 to 2 is coming from League Data Pull (RIOT API) --> + <% if (@match.status== 0) || !@tournament.players.include?(current_user) %> <% @match.teams.each do |team| %> <ol> @@ -37,7 +38,7 @@ <!-- - This is what the Players and the Hosts of the tournament will view when the Match Status is 0 + This is what the Players and the Hosts of the tournament will view when the Match Status is 1 --> <% elsif (@match.status==1) %> <% if @tournament.hosts.include?(current_user) && @scores.empty? %> @@ -87,7 +88,16 @@ <% if team.users.include?(current_user) %> <ol id="boxes" class="sortable"> <% team.users.collect{|u| u.user_name}.each do |k| %> - <li><%= k %></li> + <li><%= k%> + <br> + <% if (@tournament.game_id == 1) %> + <%= if @blue2["#{k}"] == nil + "Level: #{@purp2["#{k}"]["level"]} K/D/A: #{@purp2["#{k}"]["championsKilled"]}/#{@purp2["#{k}"]["numDeaths"]}/#{@purp2["#{k}"]["assists"]} Gold:#{@purp2["#{k}"]["goldEarned"]}" + else + "Level: #{@blue2["#{k}"]["level"]} K/D/A: #{@blue2["#{k}"]["championsKilled"]}/#{@blue2["#{k}"]["numDeaths"]}/#{@blue2["#{k}"]["assists"]} Gold:#{@blue2["#{k}"]["goldEarned"]}" + end %> + <% end %> + </li> <% end %> </ol> <% end %> @@ -104,7 +114,7 @@ </p> <% end %> -<% if @tournament.hosts.include?(current_user) %> +<% if @tournament.players.include?(current_user) %> <br /> <div id="host"> <%= form_tag(tournament_match_path(@tournament, @match), method: "put") do %> @@ -118,9 +128,11 @@ <% when 2 %> <input type="hidden" name="update_action" value="finish"> <%= submit_tag("End Match") %> + <% when 3 %> + <input type="hidden" name="update_action" value="reset"> + <%= submit_tag("Reset Status") %> <% end %> <% end %> - </div> <% end %> |