summaryrefslogtreecommitdiff
path: root/app/views/tournaments/index.html.erb
blob: 06e1b2562fc06438e8acc7bb8304094e87db8e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<h1>Listing Tournaments</h1>

<div id="tournament-list">
	<% if @tournaments.length > 0 %>

		<%# Each tournament has a div for its listing %>
		<% @tournaments.each do |t| %>
			<%= render "common/show_tournament", :target => t %>
		<% end %>

	<% else %>

		<p class="no-entries"> No tournaments going on right now...
			<% if current_user.can?(:create_tournament) %>
				Why not start your own?
			<% end %>
		</p>
		
	<% end %>
</div>

<% if current_user.can?(:create_tournament) %>
	<div><%= link_to 'New Tournament',  new_tournament_path, :class => "btn btn-warning btn-lg" %></div>
<% end %>