ref: master
plugins/comment_group/lib/comment_group_plugin.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 31 32 33 34 |
class CommentGroupPlugin < Noosfero::Plugin def self.plugin_name "Comment Group" end def self.plugin_description _("A plugin that display comment groups.") end def unavailable_comments(scope) scope.without_group end def comment_form_extra_contents(args) comment = args[:comment] group_id = comment.group_id || args[:group_id] proc { hidden_field_tag('comment[group_id]', group_id) if group_id } end def js_files 'comment_group_macro.js' end def stylesheet? true end end require_dependency 'comment_group_plugin/macros/allow_comment' |