Permalink
Browse files

Add the search box to the homepage too

  • Loading branch information...
1 parent 416b2fd commit 97256358c37432bb05853b569095319d166582de @jeffkreeftmeijer jeffkreeftmeijer committed Dec 13, 2010
Showing with 13 additions and 0 deletions.
  1. +8 −0 spec/acceptance/homepage_spec.rb
  2. +5 −0 views/home.haml
@@ -61,6 +61,14 @@
page.should have_content '1 projects'
end
+
+ scenario 'search a project' do
+ visit '/'
+
+ fill_in 'q', :with => 'project1'
+ click_button 'Search'
+ page.should have_content '1 projects'
+ end
end
View
@@ -4,6 +4,11 @@
:textile
"Log in via Github":/auth/github to add your work or check out the "projects":/projects we know about already.
+#search
+ %form{:action => '/projects', :method => 'GET'}
+ %input{:type => 'text', :name => 'q', :value => '', :placeholder => 'find a project'}
+ %input{:type => 'submit', :value => 'Search'}
+
#new
%h2 Recently added

0 comments on commit 9725635

Please sign in to comment.