summaryrefslogtreecommitdiff
path: root/lib/sampling/manual.html.erb
blob: 2bbd6dad8b0d598df603e07462af43793578f30c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 %>