summaryrefslogtreecommitdiff
path: root/app/views/search/go.html.erb
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-22 18:17:47 -0400
committernfoy <nfoy@purdue.edu>2014-04-22 18:17:47 -0400
commit7f452e8d99a86af2e3dc2f743158951092aedeb7 (patch)
tree103f3cb57b05c5a580c3a5152a2a97f5a8070d1e /app/views/search/go.html.erb
parent7fe1f6a809d68648bede431b84692bf7d8bb0c01 (diff)
parent7deb9c1c7acadf9a5b638313f51ba9dc60624672 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views/search/go.html.erb')
-rw-r--r--app/views/search/go.html.erb23
1 files changed, 23 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..6d5826f
--- /dev/null
+++ b/app/views/search/go.html.erb
@@ -0,0 +1,23 @@
+
+<%# Show search results if a query was not nill %>
+<% if !@query.empty? %>
+ <h3> Showing results for: <span><%= @query %></span></h3>
+ <% if @tournaments.empty? and @players.empty? %>
+ <p> No results found for "<%= @query %>" </p>
+ <% else %>
+ <% 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