diff options
Diffstat (limited to 'app/views/matches')
-rw-r--r-- | app/views/matches/index.html.erb | 22 | ||||
-rw-r--r-- | app/views/matches/show.html.erb | 19 |
2 files changed, 28 insertions, 13 deletions
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 0f86da6..d4ddb0e 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -1,35 +1,30 @@ -<h1><%= @tournament.name %> Matches</h1> +<h1><%= @tournament.name %> - Matches</h1> -<!-- -<table> + +<table class="table"> <thead> <tr> <th>Status</th> - <th>Tournament</th> <th>Name</th> <th>Winner</th> - <th>Remote</th> - <th></th> - <th></th> <th></th> </tr> </thead> - <tbody> + <tbody class="table-hover"> <% @tournament.matches.each do |match| %> <tr> - <td><%= match.tournament.id %></td> <td><%= match.status %></td> - <td><%= match.tournament %></td> + <td><%= match.id%></td> <td><%= match.name %></td> - <td><%= match.winner %></td> + <td><%= link_to "Show", tournament_match_path(@tournament, match) %> </tr> <% end %> </tbody> </table> <br> ---> + <SVG version="1.1" baseProfile="full" @@ -37,7 +32,8 @@ xmlns="http://www.w3.org/2000/svg"> <% (1..@matches.count).each do |i| %> - <g class="svg-match" > + <g class="svg-match"> + <rect rx="10" </g> <% end %> diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 53c3b38..4973dc3 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -12,7 +12,24 @@ <strong>Name:</strong> <%= @match.name %> </p> +<!-- + Match Status 0 => Pairings Stage + Match Status 1 => Match Active + Match Status 2 => Match Finished (Peer Review Starts) + Match Status 3 => Match Completed (Scores Completed OR Results Page) + Four views:- (status is Match status) + A. Pairings, when status is 0 for either Host or Player Or when status is 1 for player + B. A page the host will see if status is 1 OR 2 + C. The Peer review page that the players will see if status is 2. + D. The page everyone will see when status is 3. + + Note:- The change of status from 1 to 2 is coming from League Data Pull (RIOT API) + +--> +<!-- + This is what the HOST will see when the Match Status is NOT 3 +--> <% if (@tournament.hosts.include?(current_user) and @match.winner.nil?) %> <%= form_for([@tournament, @match], method: "put") do |f| %> <ul> @@ -25,6 +42,8 @@ <% end %> <% end %> + + <% unless @match.winner.nil? %> <p> <strong>Winner:</strong> |