diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-05 19:56:18 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-05 19:56:18 -0400 |
commit | 6cbbb7833ea55123389356579ccccbc59dde4db9 (patch) | |
tree | ac91b1aa9828909cc932c2487b94c0cef8bf3428 /app/views/matches | |
parent | fca133856e323d01aa88e0e60acba762378dd9e3 (diff) |
Match status 1 page
Diffstat (limited to 'app/views/matches')
-rw-r--r-- | app/views/matches/index.html.erb | 1 | ||||
-rw-r--r-- | app/views/matches/show.html.erb | 31 |
2 files changed, 31 insertions, 1 deletions
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index d4ddb0e..219507d 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -18,6 +18,7 @@ <td><%= match.id%></td> <td><%= match.name %></td> <td><%= link_to "Show", tournament_match_path(@tournament, match) %> + <td><%= submit_tag("Start Match") %> </tr> <% end %> </tbody> diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 4973dc3..6fb4042 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -38,11 +38,40 @@ <%= team.users.collect{|u| u.user_name}.join(", ") %></label></li> <% end %> </ul> - <%= f.submit("Select winner") %> + <%= f.submit("Select Winner") %> <% end %> <% end %> +<!-- + This is what the Players and the Hosts of the tournament will view when the Match Status is 0 +--> +<% if (@match.status==0) %> + <% if (@tournament.players.include?(current_user) || @tournament.hosts.include?(current_user)) %> + <% @match.teams.each do |team| %> + <ul> + <% team.users.collect{|u| u.user_name}.each do |k| %> + <li><label><%= k %></label></li> + <% end %> + </ul> + <% end %> + <% end %> +<% end %> +<!-- + Players see the Peer Review Page + Host see the Game Status +--> +<% if (@match.status==0) %> + <% if (@tournament.players.include?(current_user) %> + <% @match.teams.each do |team| %> + <ul> + <% team.users.collect{|u| u.user_name}.each do |k| %> + <li><label><%= k %></label></li> + <% end %> + </ul> + <% end %> + <% end %> +<% end %> <% unless @match.winner.nil? %> <p> |