From f781742961a1f6a41d10ba92acc0c1b9b84884df Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 17 Jan 2014 15:05:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E6=90=9C=E7=B4=A2=E6=A1=86"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/stores/_search_bar.html.erb | 6 ++++++ app/views/stores/index.html.erb | 7 +------ app/views/stores/search.html.erb | 7 +------ 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 app/views/stores/_search_bar.html.erb diff --git a/app/views/stores/_search_bar.html.erb b/app/views/stores/_search_bar.html.erb new file mode 100644 index 000000000..3221bd5b2 --- /dev/null +++ b/app/views/stores/_search_bar.html.erb @@ -0,0 +1,6 @@ +
+ <%= form_tag( search_stores_path, method: 'post') do %> + <%= text_field_tag 'name', params[:name], size:"100", placeholder:'请输入要搜索的关键字', :class => 'blueinputbar', :required => true %> + <%= submit_tag l(:label_search), :class => "enterprise"%> + <% end %> +
\ No newline at end of file diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb index e2d65c326..a253ea330 100644 --- a/app/views/stores/index.html.erb +++ b/app/views/stores/index.html.erb @@ -1,10 +1,5 @@ <% content_for :top_field do%> -
- <%= form_tag( search_stores_path, method: 'post') do %> - <%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :class => 'blueinputbar', :required => true %> - <%= submit_tag l(:label_search), :class => "enterprise"%> - <% end %> -
+ <%= render 'search_bar' %> <% end %>
diff --git a/app/views/stores/search.html.erb b/app/views/stores/search.html.erb index ae152d478..42cf0cd28 100644 --- a/app/views/stores/search.html.erb +++ b/app/views/stores/search.html.erb @@ -2,12 +2,7 @@ <% content_for :top_field do%> -
- <%= form_tag( search_stores_path, method: 'post') do %> - <%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :value => params[:name] , :class => 'blueinputbar', :required => true %> - <%= submit_tag l(:label_search), :class => "enterprise"%> - <% end %> -
+ <%= render 'search_bar' %> <% end %> <% @searched_attach.each do |result| %>