fix search word & back page notice word
This commit is contained in:
parent
7369b72f3e
commit
d95d58ea72
|
@ -8,7 +8,7 @@ class NewsController < ApplicationController
|
||||||
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}
|
!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 = 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
|
news_count = news.count
|
||||||
keyword = params[:keywords]
|
keyword = "搜尋標題有關 ' " + params[:keywords] + " '"
|
||||||
elsif params[:department]
|
elsif params[:department]
|
||||||
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}
|
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}
|
||||||
dept = Department.find_by(:uid => params["department"].split("-").last) rescue nil
|
dept = Department.find_by(:uid => params["department"].split("-").last) rescue nil
|
||||||
|
@ -18,9 +18,9 @@ class NewsController < ApplicationController
|
||||||
keywords = params[:department].split("-")
|
keywords = params[:department].split("-")
|
||||||
keywords.delete(keywords.last)
|
keywords.delete(keywords.last)
|
||||||
if keywords.kind_of?(Array)
|
if keywords.kind_of?(Array)
|
||||||
keyword = keywords.join("-")
|
keyword = "列出由:" + keywords.join("-") + "發佈的資料"
|
||||||
else
|
else
|
||||||
keyword = keywords
|
keyword = "列出由:" + keywords + "發佈的資料"
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif params[:unit]
|
elsif params[:unit]
|
||||||
|
@ -32,9 +32,9 @@ class NewsController < ApplicationController
|
||||||
keywords = params[:unit].split("-")
|
keywords = params[:unit].split("-")
|
||||||
keywords.delete(keywords.last)
|
keywords.delete(keywords.last)
|
||||||
if keywords.kind_of?(Array)
|
if keywords.kind_of?(Array)
|
||||||
keyword = keywords.join("-")
|
keyword = "列出由:" + keywords.join("-") + "發佈的資料"
|
||||||
else
|
else
|
||||||
keyword = keywords
|
keyword = "列出由:" + keywords + "發佈的資料"
|
||||||
end
|
end
|
||||||
elsif params["category"]
|
elsif params["category"]
|
||||||
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}
|
!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 = params[:category].split("-")
|
||||||
keywords.delete(keywords.last)
|
keywords.delete(keywords.last)
|
||||||
if keywords.kind_of?(Array)
|
if keywords.kind_of?(Array)
|
||||||
keyword = keywords.join("-")
|
keyword = "搜尋有關 ' " + keywords.join("-") + " '"
|
||||||
else
|
else
|
||||||
keyword = keywords
|
keyword = "搜尋有關 ' " + keywords + " '"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}
|
!params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:postdate=>"desc"}
|
||||||
|
|
|
@ -214,12 +214,12 @@
|
||||||
<label class="control-label muted"><%= t(:content) %></label>
|
<label class="control-label muted"><%= t(:content) %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="image_note" style="color:red; font-size:14px;">
|
<div class="image_note" style="color:red; font-size:14px;">
|
||||||
|
<span style="font-weight: bolder;">※建議使用IE10、IE11、Chrome(最佳)、Firefox等瀏覽器。</span>
|
||||||
|
<br />
|
||||||
※內文裡單一圖片大小為1MB以下。
|
※內文裡單一圖片大小為1MB以下。
|
||||||
<br />
|
<br />
|
||||||
※內文裡單一圖片尺寸的最大寬度600px(滿版),如圖片要縮小,請依比例調整。
|
※內文裡單一圖片尺寸的最大寬度600px(滿版),如圖片要縮小,請依比例調整。
|
||||||
<br />
|
<br />
|
||||||
※新聞及公告發佈後台請增加下列文字:建議使用IE10、IE11、Chrome(最佳)、Firefox等瀏覽器。
|
|
||||||
<br />
|
|
||||||
<a href="https://www.safesync.nccu.edu.tw/HWwc/%E5%A6%82%E4%BD%95%E8%A3%81%E5%89%AA%E6%96%B0%E8%81%9E%E5%9C%96%E7%89%87.pdf?a=tAdpdijUy1U" target="_blank" style="color:red;">※如何剪裁新聞圖片。</a>
|
<a href="https://www.safesync.nccu.edu.tw/HWwc/%E5%A6%82%E4%BD%95%E8%A3%81%E5%89%AA%E6%96%B0%E8%81%9E%E5%9C%96%E7%89%87.pdf?a=tAdpdijUy1U" target="_blank" style="color:red;">※如何剪裁新聞圖片。</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
|
|
Loading…
Reference in New Issue