summaryrefslogtreecommitdiff
path: root/app/views/search/go.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/search/go.html.erb')
-rw-r--r--app/views/search/go.html.erb24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/views/search/go.html.erb b/app/views/search/go.html.erb
new file mode 100644
index 0000000..324fa48
--- /dev/null
+++ b/app/views/search/go.html.erb
@@ -0,0 +1,24 @@
+
+<%# Show search results if a query was not nill %>
+<% if !@query.empty? %>
+
+ <% if @tournaments.empty? and @players.empty? %>
+ <h3> No results found for "<%= @query %>" </h3>
+ <% else %>
+ <h3> Showing results for: <span><%= @query %></span></h3>
+ <% if @tournaments.length > 0 %>
+ <h4> Tournaments </h4>
+ <% end %>
+ <% @tournaments.each do |t| %>
+ <%= render "common/show_tournament", :target => t %>
+ <% end %>
+
+ <% if @players.length > 0 %>
+ <h4> Players </h4>
+ <% end %>
+ <% @players.each do |p| %>
+ <%= render "common/show_player", :target => p %>
+ <% end %>
+
+ <% end %>
+<% end %> \ No newline at end of file