add search to archive

This commit is contained in:
Matt K. Fu committed 2013-06-05 18:03:09 +08:00
1 parent 704db56925
commit 30824d1620
11 files changed
+75 -32

No files matched your search

@@ -1,9 +1,4 @@
<% if @data.blank? and @search %>
<%=render :partial => 'shared/search_not_found' %>
<% elsif @search %>
<%= t("search.result_get",:search_word => params[:search_query],:item_num=>@data.count) unless (@data.count == 30) %>
<%= t("search.too_many",:search_word => params[:search_query],:exceed_num=>@data.count) if (@data.count ==30) %>
<% end %>
<%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %>
<%= render @partial %>
<% if @paginate and !@data.blank? %>
+6
View File
@@ -0,0 +1,6 @@
<% if items.blank? and !params[:search_query].blank? %>
<%=render :partial => 'shared/search_not_found' %>
<% elsif !params[:search_query].blank? %>
<%= t("search.result_get",:search_word => params[:search_query],:item_num=>items.count) unless (items.count == 30) %>
<%= t("search.too_many",:search_word => params[:search_query],:exceed_num=>items.count) if (items.count ==30) %>
<% end %>