Fix approval
This commit is contained in:
parent
d9dd08e678
commit
24ef9c848c
|
@ -42,6 +42,9 @@ class Bulletin
|
|||
field :email_group, :type => Array
|
||||
field :other_mailaddress
|
||||
|
||||
scope :can_display, where(is_checked: true, is_rejected: false, is_pending: false)
|
||||
scope :available_for_lang, ->(locale){ where("available_for_#{locale}".to_sym => true) }
|
||||
|
||||
mount_uploader :image, ImageUploader
|
||||
|
||||
has_many :bulletin_links, :autosave => true, :dependent => :destroy
|
||||
|
|
|
@ -28,13 +28,13 @@ module Announcement
|
|||
data_count 1..10
|
||||
|
||||
authorizable
|
||||
# approvable
|
||||
approvable
|
||||
categorizable
|
||||
taggable
|
||||
|
||||
widgets do
|
||||
default_widget do
|
||||
query 'Bulletin'
|
||||
query 'Bulletin.can_display.available_for_lang(I18n.locale).any_of( {deadline: nil,:postdate.lte => Time.now} , {:deadline.gte => Time.now,:postdate.lte => Time.now} )'
|
||||
enable ["typeA", "typeB_style3", "typeC"]
|
||||
image :image
|
||||
field :postdate
|
||||
|
|
Loading…
Reference in New Issue