<%# Show search results if a query was not nill %> <% if !@query.empty? %> <% if @tournaments.empty? and @players.empty? %>

No results found for "<%= @query %>"

<% else %>

Showing results for: <%= @query %>

<% if @tournaments.length > 0 %>

Tournaments

<% end %> <% @tournaments.each do |t| %> <%= render "common/show_tournament", :target => t %> <% end %> <% if @players.length > 0 %>

Players

<% end %> <% @players.each do |p| %> <%= render "common/show_user", :target => p %> <% end %> <% end %> <% end %>