From d95d58ea726b0fd42cd6056499c0ae1989945a5a Mon Sep 17 00:00:00 2001 From: nccu Date: Mon, 5 Jan 2015 15:23:31 +0800 Subject: [PATCH] fix search word & back page notice word --- app/controllers/news_controller.rb | 14 +++++++------- app/views/admin/news/_form.html.erb | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index be56aeb..79af157 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -8,7 +8,7 @@ class NewsController < ApplicationController !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"} news = NewsBulletin.where(:title.ne => "").any_of(:title => /#{params[:keywords].to_s}/i).is_approved.order_by(sort).filter_by_categories(["all"]).per(15) if !params[:keywords].nil? news_count = news.count - keyword = params[:keywords] + keyword = "搜尋標題有關 ' " + params[:keywords] + " '" elsif params[:department] !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"} dept = Department.find_by(:uid => params["department"].split("-").last) rescue nil @@ -18,9 +18,9 @@ class NewsController < ApplicationController keywords = params[:department].split("-") keywords.delete(keywords.last) if keywords.kind_of?(Array) - keyword = keywords.join("-") + keyword = "列出由:" + keywords.join("-") + "發佈的資料" else - keyword = keywords + keyword = "列出由:" + keywords + "發佈的資料" end elsif params[:unit] @@ -32,9 +32,9 @@ class NewsController < ApplicationController keywords = params[:unit].split("-") keywords.delete(keywords.last) if keywords.kind_of?(Array) - keyword = keywords.join("-") + keyword = "列出由:" + keywords.join("-") + "發佈的資料" else - keyword = keywords + keyword = "列出由:" + keywords + "發佈的資料" end elsif params["category"] !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"} @@ -45,9 +45,9 @@ class NewsController < ApplicationController keywords = params[:category].split("-") keywords.delete(keywords.last) if keywords.kind_of?(Array) - keyword = keywords.join("-") + keyword = "搜尋有關 ' " + keywords.join("-") + " '" else - keyword = keywords + keyword = "搜尋有關 ' " + keywords + " '" end end !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"} diff --git a/app/views/admin/news/_form.html.erb b/app/views/admin/news/_form.html.erb index 68af509..9470e2d 100644 --- a/app/views/admin/news/_form.html.erb +++ b/app/views/admin/news/_form.html.erb @@ -214,12 +214,12 @@
+ ※建議使用IE10、IE11、Chrome(最佳)、Firefox等瀏覽器。 +
※內文裡單一圖片大小為1MB以下。
※內文裡單一圖片尺寸的最大寬度600px(滿版),如圖片要縮小,請依比例調整。
- ※新聞及公告發佈後台請增加下列文字:建議使用IE10、IE11、Chrome(最佳)、Firefox等瀏覽器。 -
※如何剪裁新聞圖片。