summaryrefslogtreecommitdiff
path: root/app/views
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
parentd0a0f806a4bb8072c532ea7b35ad8b7643ac8645 (diff)
started with advanced search
Diffstat (limited to 'app/views')
-rw-r--r--app/views/common/_show_user.html.erb4
-rw-r--r--app/views/search/go.html.erb16
-rw-r--r--app/views/tournaments/new.html.erb2
3 files changed, 17 insertions, 5 deletions
diff --git a/app/views/common/_show_user.html.erb b/app/views/common/_show_user.html.erb
index 70f1ca4..dd136a0 100644
--- a/app/views/common/_show_user.html.erb
+++ b/app/views/common/_show_user.html.erb
@@ -1,8 +1,8 @@
<div class="row user-listing">
- <div class="col-md-3 col-sm-3 col-xs-6"><%= image_tag ('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.email) + '?s=100&d=mm') %></div>
+ <div class="col-md-3 col-sm-4 col-xs-4"><%= image_tag ('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.email) + '?s=100&d=mm') %></div>
- <div class="col-md-9 col-sm-9 col-xs-6">
+ <div class="col-md-9 col-sm-8 col-xs-8">
<%# "header" %>
<%= link_to(target) do %><h3><%= target.user_name %></h3><% end %>
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>
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index 8c74068..c2b9904 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -4,7 +4,7 @@
<%= select_tag('game',
options_from_collection_for_select(@games, 'id', 'name', @tournament.game.nil? || @tournament.game.id),
:prompt => "Select a Game Type") %>
- <%= submit_tag("Select", :class => "btn btn-success btn-xs") %>
+ <%= submit_tag("Select", :class => "btn") %>
<% end %>
<div id='ajax-form'>