Fix approval
This commit is contained in:
parent
d9dd08e678
commit
24ef9c848c
|
@ -41,6 +41,9 @@ class Bulletin
|
||||||
field :email_sentdate , :type => DateTime
|
field :email_sentdate , :type => DateTime
|
||||||
field :email_group, :type => Array
|
field :email_group, :type => Array
|
||||||
field :other_mailaddress
|
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
|
mount_uploader :image, ImageUploader
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,13 @@ module Announcement
|
||||||
data_count 1..10
|
data_count 1..10
|
||||||
|
|
||||||
authorizable
|
authorizable
|
||||||
# approvable
|
approvable
|
||||||
categorizable
|
categorizable
|
||||||
taggable
|
taggable
|
||||||
|
|
||||||
widgets do
|
widgets do
|
||||||
default_widget 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"]
|
enable ["typeA", "typeB_style3", "typeC"]
|
||||||
image :image
|
image :image
|
||||||
field :postdate
|
field :postdate
|
||||||
|
|
Loading…
Reference in New Issue