announcement init default_widget add a style & field

This commit is contained in:
Spen 2013-07-08 17:47:11 +08:00 committed by chris
parent ea5d89e0e1
commit 837dc3ea7b
3 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ en:
bulletin_category_with_title: Bulletin Category with Title
postdate: Post Date
title: Title
subtitle: SubTitle
editing_announcement: Edit Announcement
editing_announcement_category: Edit Category
error:

View File

@ -16,6 +16,7 @@ zh_tw:
bulletin_category_with_title: 公告類別及標題
postdate: 張貼日期
title: 標題
subtitle: 副標題
editing_announcement: 編輯類別
editing_announcement_category: 編輯類別
error:

View File

@ -30,11 +30,12 @@ module Announcement
widgets do
default_widget do
query 'Bulletin.any_of( {deadline: nil,:postdate.lte => Time.now} , {:deadline.gte => Time.now,:postdate.lte => Time.now} )'
enable ["typeA","typeC"]
enable ["typeA","typeB_style3","typeC"]
image :image
field :postdate
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self,:preview=>true}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}}
field :subtitle
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end