diff --git a/app/controllers/admin/news_controller.rb b/app/controllers/admin/news_controller.rb index 1d8de08..533b33a 100644 --- a/app/controllers/admin/news_controller.rb +++ b/app/controllers/admin/news_controller.rb @@ -29,7 +29,7 @@ class Admin::NewsController < OrbitAdminController end - @news_bulletin = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil]) + @news_bulletin = NewsBulletin.where(:is_preview.in=>[false,nil]) .order_by(sort) .with_categories(filters("category")) .with_tags(filters("tag")) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 68ffdac..120dffb 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -107,7 +107,7 @@ class NewsController < ApplicationController def widget params = OrbitHelper.params !params[:sort].blank? ? sort = {params[:sort].to_sym=>params[:order]} : sort = {:is_top=>"desc",:postdate=>"desc"} - news = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:is_hot => true).is_approved.order_by(sort).filter_by_widget_categories if news.nil? + news = NewsBulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:is_hot => true).can_display.is_approved.order_by(sort).filter_by_widget_categories if news.nil? page = Page.where(:module => "news").first rescue nil ma = ModuleApp.find_by_key("news") rescue nil diff --git a/app/views/admin/news/_form.html.erb b/app/views/admin/news/_form.html.erb index b540f1a..0330759 100644 --- a/app/views/admin/news/_form.html.erb +++ b/app/views/admin/news/_form.html.erb @@ -7,7 +7,7 @@ } .thumbnail{ width: 310px; - height: 130px; + /*height: 130px;*/ } .thumbnail img{ width: 100%; @@ -475,7 +475,7 @@ } } if(!validate){ - alert("請於封面圖片中的頁籤,設定您圖片上傳方式"); + alert("您還沒有上傳封面圖片"); fileupload_alert.text("<%= t("news.file_size")%>: "+file_size.toFixed(1)+"MB <%= t("news.file_size_exceed_limitation") %>, <%= t("news.file_size_limit") %>: "+fileupload_size_limit_mb+"MB"); fileupload_alert.show(); $("#basic").removeClass("active"); diff --git a/app/views/admin/news/_index.html.erb b/app/views/admin/news/_index.html.erb index ea66bfd..eaf4533 100644 --- a/app/views/admin/news/_index.html.erb +++ b/app/views/admin/news/_index.html.erb @@ -19,13 +19,36 @@