From bb53f8ac2ab52301b32fe65ddc10a32f6bc730e8 Mon Sep 17 00:00:00 2001 From: tkimia Date: Tue, 22 Apr 2014 17:42:57 -0400 Subject: prelim search --- app/views/tournaments/index.html.erb | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'app/views/tournaments/index.html.erb') diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb index eef9577..129f3de 100644 --- a/app/views/tournaments/index.html.erb +++ b/app/views/tournaments/index.html.erb @@ -4,39 +4,7 @@ <% if @tournaments.length > 0 %> <%# Each tournament has a div for its listing %> <% @tournaments.each do |t| %> -
-
<%= image_tag 'http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(t.hosts.first.email) + '?s=100&d=mm' %>
-
- <%# "header" %> - <%= link_to(t) do %>

<%= t.name %>

<% end %> -
-
- Hosted by: <%= t.hosts.first.name %> -
-
-

Players per team: <%= t.min_players_per_team %>

-

Players signed up: <%= t.players.count %>

-
-
-

<%= (t.randomized_teams)? "Teams are Random" : "Teams are Chosen" %>

-

Players signed up: <%= t.players.count %>

-
-
-
-
- <% if signed_in? %> - <% if !t.players.include?(current_user) %> - <%= form_tag(tournament_path(t), method: "put") do %> - - <%= submit_tag("Join") - %> - <% end %> - <% else %> -

You've signed up for this tournament!

- <% end %> - <% end %> -
-
+ <%= render "common/show_tournament", :target => t %> <% end %> <% else %>

No tournaments going on right now... -- cgit v1.2.3-2-g168b From 266602ea1e97d886f031b80add7a760034221f76 Mon Sep 17 00:00:00 2001 From: tkimia Date: Tue, 22 Apr 2014 18:04:41 -0400 Subject: basic search complete --- app/views/tournaments/index.html.erb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views/tournaments/index.html.erb') diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb index 129f3de..06e1b25 100644 --- a/app/views/tournaments/index.html.erb +++ b/app/views/tournaments/index.html.erb @@ -2,16 +2,20 @@

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

No tournaments going on right now... <% if current_user.can?(:create_tournament) %> Why not start your own? <% end %>

+ <% end %>
-- cgit v1.2.3-2-g168b