From 6a7a6b1be68db17baa28cef37a70b3faa5b2d28b Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Tue, 14 Jan 2014 16:18:48 +0800 Subject: [PATCH] modified searching result for stores --- app/views/stores/index.html.erb | 2 +- app/views/stores/search.html.erb | 39 +++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb index 4642e18c2..d349d0aa8 100644 --- a/app/views/stores/index.html.erb +++ b/app/views/stores/index.html.erb @@ -74,7 +74,7 @@ <% @attach_array.each do |k|%>

- <%=@str_arr.shift%> + <%= @str_arr.shift %>

diff --git a/app/views/stores/search.html.erb b/app/views/stores/search.html.erb index 989e6b4f2..f9838a329 100644 --- a/app/views/stores/search.html.erb +++ b/app/views/stores/search.html.erb @@ -1 +1,38 @@ -<%= @searched_attach.to_s %> \ No newline at end of file +<% content_for :top_field do%> +
+ <%= form_tag( search_stores_path, method: 'get') do %> + <%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字' %> + <%= submit_tag l(:label_search), class:"whiteButton m3p10 h30"%> + <% end %> +
+<% end %> + +<% @searched_attach.each do |result| %> + +
+ + +
+ <%= result.description %> +
所属分类:IT资料 > 常用软件 > 下载软件 + 上传时间:<%= format_time(result.created_on) %>
星级: | 下载:<%= result.downloads%> | 大小:<%= number_to_human_size(result.filesize) %> + | 共享者:<%= result.author%> + +
+ <% end %> + + + \ No newline at end of file