summaryrefslogtreecommitdiff
path: root/app/views/tournaments/show.html.erb
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-03-25 17:30:10 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-03-25 17:30:10 -0400
commit0c22c4bd9a0b4a0b0ff5840c1af41c0b320e3529 (patch)
tree2fc2082814e513ec5d68b22e7fa07d268df6d788 /app/views/tournaments/show.html.erb
parent8435c0a5ec9889a9da6ede2e24c044d64b279095 (diff)
added match status
Diffstat (limited to 'app/views/tournaments/show.html.erb')
-rw-r--r--app/views/tournaments/show.html.erb35
1 files changed, 2 insertions, 33 deletions
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index 3de0623..3cb6179 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -1,19 +1,5 @@
-<% 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 %>
+<p id="notice"><%= notice %></p>
-
-<div class="progress">
- <%= tag("div", {:class => "progress-bar progress-bar-warning", :style => "width: " +(@tournament.players.count * 100 / (@tournament.min_players_per_team * @tournament.min_teams_per_match)).to_s + "%", "aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => (@tournament.players.count * 100 / (@tournament.min_players_per_team * @tournament.min_teams_per_match)).to_s, "role" => "progressbar"}) %>
- <span class="sr-only">60% Complete (warning)</span>
- </div>
-</div>
-<p><%= @tournament.players.count %> have signed up. <%= @tournament.min_players_per_team * @tournament.min_teams_per_match %> needed. </p>
-
-<% if current_user.in_group?(:host) %>
<p>
<strong>Name:</strong>
<%= @tournament.name %>
@@ -21,7 +7,7 @@
<p>
<strong>Game:</strong>
- <%= @tournament.id %>
+ <%= @tournament.game %>
</p>
<p>
@@ -59,22 +45,5 @@
<%= @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">
- <% if @tournament.players.count >= @tournament.min_players_per_team * @tournament.min_teams_per_match %>
- <%= submit_tag("Close Tournament Registration") %>
- <% else %>
- <%= submit_tag("Close Tournament Registration", disabled: true) %>
- <% end %>
-<% end %>
-
<%= link_to 'Edit', edit_tournament_path(@tournament) %> |
<%= link_to 'Back', tournaments_path %>
-
-<% end %>
-