summaryrefslogtreecommitdiff
path: root/app/views/tournaments/show.html.erb
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-03-06 22:31:03 -0500
committerAndrewMurrell <amurrel@purdue.edu>2014-03-06 22:31:03 -0500
commitce8b05ed8fa3466c727269daa47ba7df672fdca1 (patch)
treee89c40080858aa63ba2837b697ef0eafe06cb4bf /app/views/tournaments/show.html.erb
parent3f6f212c1d50a0ae953104524ceffe94095307cf (diff)
Redirection works as does the close tournament button.
Diffstat (limited to 'app/views/tournaments/show.html.erb')
-rw-r--r--app/views/tournaments/show.html.erb12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index cd111f7..a04c852 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -1,10 +1,11 @@
<% if @tournament.joinable_by?(current_user) %>
<%= form_tag(tournament_path(@tournament), method: "put") do %>
<input type="hidden" name="update_action" value="join">
- <%= submit_tag("Join") %>
+ <%= current_user.name %><%= submit_tag("Join") %>
<% end %>
<% end %>
+<% if current_user.in_group?(:host) %>
<p>
<strong>Game:</strong>
<%= @tournament.game %>
@@ -45,5 +46,12 @@
<%= @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 %> \ No newline at end of file
+<%= link_to 'Back', tournaments_path %>
+
+<% end %> \ No newline at end of file