From b0b2a235f02b95058aa7bfbf817d5dd1d85b6730 Mon Sep 17 00:00:00 2001 From: tkimia Date: Mon, 28 Apr 2014 01:30:32 -0400 Subject: first draft selection. Not done... most of my time was spent reqriting the SVG in ERB --- app/views/common/_show_tournament.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/common') 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 @@
<% 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 %>

<%= submit_tag("Join")%> <% end %>

- <% else %> + <% elsif target.players.include?(current_user)%>

You've signed up for this tournament!

<% 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 %> -- cgit v1.2.3-2-g168b