summaryrefslogtreecommitdiff
path: root/app/views/tournaments/show.html.erb
blob: c3a40e7ad6b72fc42cadcff8c84da585aa6ba16c (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<% if @tournament.joinable_by?(current_user) %>
	<%= form_tag(tournament_path(@tournament), method: "put") do %>
		<input type="hidden" name="update_action" value="join">
		<%= current_user.name %><%= submit_tag("Join") %>
	<% end %>
<% end %>

<% if current_user.in_group?(:host) %>
<p>
  <strong>Game:</strong>
  <%= @tournament.game %>
</p>

<p>
  <strong>Status:</strong>
  <%= @tournament.status %>
</p>

<p>
  <strong>Min players per team:</strong>
  <%= @tournament.min_players_per_team %>
</p>

<p>
  <strong>Max players per team:</strong>
  <%= @tournament.max_players_per_team %>
</p>

<p>
  <strong>Min teams per match:</strong>
  <%= @tournament.min_teams_per_match %>
</p>

<p>
  <strong>Max teams per match:</strong>
  <%= @tournament.max_teams_per_match %>
</p>

<p>
  <strong>Set rounds:</strong>
  <%= @tournament.set_rounds %>
</p>

<p>
  <strong>Randomized teams:</strong>
  <%= @tournament.randomized_teams %>
</p>

<p>
  <strong>Status:</strong>
  <%= @tournament.status %>
</p>

<%= form_tag(tournaments_path.to_s + "/" + @tournament.id.to_s + "/edit", method: "get") do %>
  <input type="hidden" name="close_action" value="close">
  <%= submit_tag("Close Tournament Registration") %>
<% end %>

<%= link_to 'Edit', edit_tournament_path(@tournament) %> |
<%= link_to 'Back', tournaments_path %>

<% end %>