summaryrefslogtreecommitdiff
path: root/app/views/common/_show_tournament.html.erb
diff options
context:
space:
mode:
authortkimia <tkimia@purdue.edu>2014-04-28 01:30:32 -0400
committertkimia <tkimia@purdue.edu>2014-04-28 01:30:32 -0400
commitb0b2a235f02b95058aa7bfbf817d5dd1d85b6730 (patch)
tree449c0c0f348402b192da3b46df468552a71b3b63 /app/views/common/_show_tournament.html.erb
parent7a4832621f1a0bb2e4b86ee9f879a73df0188a3e (diff)
first draft selection. Not done... most of my time was spent reqriting the SVG in ERB
Diffstat (limited to 'app/views/common/_show_tournament.html.erb')
-rw-r--r--app/views/common/_show_tournament.html.erb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/common/_show_tournament.html.erb b/app/views/common/_show_tournament.html.erb
index 12a7fea..5659947 100644
--- a/app/views/common/_show_tournament.html.erb
+++ b/app/views/common/_show_tournament.html.erb
@@ -23,17 +23,17 @@
</div>
<div class="col-md-2 col-sm-2 col-xs-2">
<% if signed_in? %>
- <% if !target.players.include?(current_user) %>
+ <% if !target.players.include?(current_user) && target.status == 0 %>
<%= form_tag(tournament_path(target), method: "put") do %>
<p>
<input type="hidden" name="update_action" value="join">
<%= submit_tag("Join")%>
<% end %>
</p>
- <% else %>
+ <% elsif target.players.include?(current_user)%>
<p style="margin-top:10px;"> You've signed up for this tournament! </p>
<% end %>
- <% if target.status == 1 %>
+ <% if target.status == 1 && target.stages.first.scheduling_method == "elimination" && target.stages.first.matches.first.status == 0 %>
<%= form_tag(tournament_brackets_path(target), method: "post") do %>
<%= submit_tag("Make Bracket") %>
<% end %>