From 25f4e292e653cfbd44ee4a58f08fbb8e47322eea Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Wed, 25 Jul 2012 13:58:09 +0800 Subject: [PATCH] add not found for no result --- config/locales/en.yml | 2 ++ config/locales/zh_tw.yml | 3 +++ .../views/panel/news/front_end/news_bulletins/index.html.erb | 3 +++ 3 files changed, 8 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 054d1c23..5cb5706a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -293,3 +293,5 @@ en: not_previewable: "Preview not support" limit_of_upload_file_size: "Upload file must be less than: %{best_size}" + search: + not_found: "NOT FOUND" \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 09877234..53ab04cf 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -430,6 +430,9 @@ zh_tw: select: prompt: "請選擇" + search: + not_found: "沒有搜尋結果" + activerecord: errors: template: # ~ 2.3.5 backward compatible diff --git a/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.html.erb b/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.html.erb index 6968a482..76ad680c 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/index.html.erb @@ -25,6 +25,9 @@ <%= display_date(post.postdate) %> <% end %> + <% if @news_bulletins.blank? %> + <%=render :partial => 'shared/search_not_found' %> + <% end %>