summaryrefslogtreecommitdiff
path: root/app/views/search
diff options
context:
space:
mode:
authortkimia <tkimia@purdue.edu>2014-04-23 20:26:37 -0400
committertkimia <tkimia@purdue.edu>2014-04-23 20:26:37 -0400
commitcba4c47e7cca06434742fc5fd282c40973c546d1 (patch)
treef16d4e7892777836d2c22a00b1194d255adab95e /app/views/search
parentd0a0f806a4bb8072c532ea7b35ad8b7643ac8645 (diff)
started with advanced search
Diffstat (limited to 'app/views/search')
-rw-r--r--app/views/search/go.html.erb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/views/search/go.html.erb b/app/views/search/go.html.erb
index d2bf8f3..ea2dabf 100644
--- a/app/views/search/go.html.erb
+++ b/app/views/search/go.html.erb
@@ -4,12 +4,24 @@
</div>
<div class="expanded">
<h5><a href="#collapse">Advanced Search [hide]</a></h5>
- <p>This is where the advancedsearch will go.</p>
+ <%= form_tag("/search", method: "get") do %>
+ <div class="form-group">
+ <%= label_tag :query, 'Find:' %>
+ <%= text_field_tag(:query, params[:query]) %>
+ </div>
+ <div class="form-group">
+ <%= label_tag :game_type, 'Game Type:' %>
+ <%= select_tag(:game_type, options_from_collection_for_select(@games, 'id', 'name'), :prompt => 'All Games') %>
+ </div>
+ <div>
+ <%= submit_tag("Search", :name=>nil) %>
+ </div>
+ <% end %>
</div>
</div>
<%# Show search results if a query was not nill %>
-<% if !@query.empty? %>
+<% if !@query.nil? and !@query.empty? %>
<% if @tournaments.empty? and @players.empty? %>
<h3> No results found for "<%= @query %>" </h3>