Commit 9db82030caf4b037b41e2b05b3b0e107ac60aa40
1 parent
50ba75f5
Exists in
master
and in
28 other branches
ActionItem410: fixing search form
in /assets/${stuff} git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1908 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
app/views/search/_search_form.rhtml
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | 2 | ||
3 | <% simple_search = false unless defined? simple_search %> | 3 | <% simple_search = false unless defined? simple_search %> |
4 | 4 | ||
5 | -<% form_tag( { :action => 'index', :category_path => ( @category ? @category.explode_path : [] ) }, | 5 | +<% form_tag( { :action => 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) }, |
6 | :method => 'get', :class => 'search_form' ) do %> | 6 | :method => 'get', :class => 'search_form' ) do %> |
7 | <%= '<h3>%s</h3>' % form_title if defined? form_title %> | 7 | <%= '<h3>%s</h3>' % form_title if defined? form_title %> |
8 | 8 |
test/functional/search_controller_test.rb
@@ -814,6 +814,11 @@ class SearchControllerTest < Test::Unit::TestCase | @@ -814,6 +814,11 @@ class SearchControllerTest < Test::Unit::TestCase | ||
814 | assert_equal 0, assigns(:calendar).size % 7 | 814 | assert_equal 0, assigns(:calendar).size % 7 |
815 | end | 815 | end |
816 | 816 | ||
817 | + should 'submit search form to /search when viewing asset' do | ||
818 | + get :index, :asset => 'people' | ||
819 | + assert_tag :tag => "form", :attributes => { :class => 'search_form', :action => '/search' } | ||
820 | + end | ||
821 | + | ||
817 | ################################################################## | 822 | ################################################################## |
818 | ################################################################## | 823 | ################################################################## |
819 | 824 |