diff options
Diffstat (limited to 'app/views/tournaments/show.html.erb')
-rw-r--r-- | app/views/tournaments/show.html.erb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb index 208c6f4..c3a40e7 100644 --- a/app/views/tournaments/show.html.erb +++ b/app/views/tournaments/show.html.erb @@ -1,5 +1,11 @@ -<p id="notice"><%= notice %></p> +<% 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 %> @@ -40,5 +46,18 @@ <%= @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 %> + |