diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-29 16:41:35 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-29 16:41:35 -0400 |
commit | 42d6e3b1cc05ef5172081682b53675e4827254d3 (patch) | |
tree | 240743892a6f0948774f1b89bf5bf58ed49f6416 /lib/sampling/manual.html.erb | |
parent | 0d6f7a3bfbf4c87510a1bcf967b618f98e149d49 (diff) |
elimination works SOMETIMES... other times it just can't put down a damned winner
Diffstat (limited to 'lib/sampling/manual.html.erb')
-rw-r--r-- | lib/sampling/manual.html.erb | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/sampling/manual.html.erb b/lib/sampling/manual.html.erb index 187f002..2bbd6da 100644 --- a/lib/sampling/manual.html.erb +++ b/lib/sampling/manual.html.erb @@ -1,12 +1,30 @@ <% if @tournament.hosts.include? @current_user %> - <input type="hidden" name="update_action" value="finish" > + <fieldset><legend>Winner</legend> + <ul> + <% @match.teams.each do |team| %> + <li><label> + <input type="radio" name="manual[winner]" value="<%= team.id %>"> + Team <%= team.id %> + </label></li> + <% end %> + </ul> + </fieldset> <% @match.teams.each do |team| %> - <label> - <input type="radio", name="win", value="<%= team.id %>" > - <%= "Team #{team.id} Won" %> - </label> + <fieldset><legend>Statistics for Team <%= team.id %></legend> + <% team.users.each do |user| %> + <fieldset><legend><%= user.name %></legend> + <% @stats.reject{|s|s=="win"}.each do |stat| %> + <p> + <label> + <%= stat.titleize %> + <input type="numeric" name="manual[statistics][<%= user.id %>][<%= stat %>]"> + </label> + </p> + <% end %> + </fieldset> + <% end %> + </fieldset> <% end %> - <br> <input type="submit", value="Finish match" > <% else %> <p>The match is running; the host has yet to post the scores of the match.</p> |