diff options
Diffstat (limited to 'lib/sampling/manual.html.erb')
-rw-r--r-- | lib/sampling/manual.html.erb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/sampling/manual.html.erb b/lib/sampling/manual.html.erb new file mode 100644 index 0000000..2bbd6da --- /dev/null +++ b/lib/sampling/manual.html.erb @@ -0,0 +1,31 @@ +<% if @tournament.hosts.include? @current_user %> + <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| %> + <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 %> + <input type="submit", value="Finish match" > +<% else %> + <p>The match is running; the host has yet to post the scores of the match.</p> +<% end %> |