From 667fc50c4c029dc0b21246981f7b372d8d51e1b3 Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Thu, 29 May 2008 15:06:18 +0000 Subject: [PATCH] ActionItem354: fixed a problem on the definedness of simple_search local variable on the _search_form.rhml and the hiding of the advanced options --- app/views/search/_search_form.rhtml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/app/views/search/_search_form.rhtml b/app/views/search/_search_form.rhtml index 728617a..f68f27a 100644 --- a/app/views/search/_search_form.rhtml +++ b/app/views/search/_search_form.rhtml @@ -1,3 +1,5 @@ +<% simple_search = false unless defined? simple_search %> + <% form_tag( { :action => 'index', :category_path => ( @category ? @category.explode_path : [] ) }, :method => 'get', :class => 'search_form' ) do %> <%= '

%s

' % form_title if defined? form_title %> @@ -13,18 +15,31 @@ <% end %> -
-

<%= _('Search for:') %>

- -
-
+
+
+

<%= _('Search within:') %>

+
+
+ <%= text_field_tag 'radius', '',:id => 'search-radius' %> + <%= text_field :region, :name, :id => 'search_region' %> +
+ <%= auto_complete_field('search_region', :url => {:action => 'complete_region'}) %> +
+
+ +
+

<%= _('Search for:') %>

+
    + <% @search_in.map { |t,n| [t,gettext(n)] } . + sort_by(&:last).each do |thing, name| %> +
  • + <%= labelled_check_box name, 'find_in[]', thing.to_s, @searching[thing.to_sym] %> +
  • + <% end %> +
+
+
+
<% if simple_search %> <%= link_to_function(_('Advanced search'), nil, :id => 'advanced_search_link') do |page| -- libgit2 0.21.2