diff --git a/plugins/comment_paragraph/lib/comment_paragraph_plugin.rb b/plugins/comment_paragraph/lib/comment_paragraph_plugin.rb index 1129dad..b7e5b02 100644 --- a/plugins/comment_paragraph/lib/comment_paragraph_plugin.rb +++ b/plugins/comment_paragraph/lib/comment_paragraph_plugin.rb @@ -47,18 +47,19 @@ class CommentParagraphPlugin < Noosfero::Plugin def article_extra_toolbar_buttons(article) user = context.send :user return [] if !article.comment_paragraph_plugin_enabled? || !article.allow_edit?(user) - [ + buttons = [ { :title => article.comment_paragraph_plugin_activated? ? _('Deactivate Comments') : _('Activate Comments'), :url => {:controller => 'comment_paragraph_plugin_myprofile', :profile => article.profile.identifier, :action => 'toggle_activation', :id => article.id}, :icon => :toggle_comment_paragraph - }, - { + } + ] + buttons << { :title => _('Export Comments'), :url => {:controller => 'comment_paragraph_plugin_profile', :profile => article.profile.identifier, :action => 'export_comments', :id => article.id}, :icon => :toggle_comment_paragraph - } - ] + } if article.comment_paragraph_plugin_activated? + buttons end end -- libgit2 0.21.2