ref: master
plugins/comment_paragraph/lib/comment_paragraph_plugin/discussion.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
class CommentParagraphPlugin::Discussion < Event def self.type_name _('Comments Discussion') end def self.short_description _('Comments Discussion') end def self.description _('Article with paragraph comments') end def accept_comments? current_time = Time.now super && (start_date.nil? || current_time >= start_date) && (end_date.nil? || current_time <= end_date) end def comment_paragraph_plugin_activated? environment.plugin_enabled?(CommentParagraphPlugin) end def comment_paragraph_plugin_activation_mode "auto" end end |