From a3314525f23203089b893e3f266fd26a7d4eb98f Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Mon, 2 Mar 2015 17:41:20 -0300 Subject: [PATCH] put comment paragraph in article toolbar hotspot --- lib/comment_paragraph_plugin.rb | 4 ++-- public/style.css | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/comment_paragraph_plugin.rb b/lib/comment_paragraph_plugin.rb index b51a89d..9bfb920 100644 --- a/lib/comment_paragraph_plugin.rb +++ b/lib/comment_paragraph_plugin.rb @@ -44,10 +44,10 @@ class CommentParagraphPlugin < Noosfero::Plugin 'manual' end - def article_header_extra_contents(article) + def article_toolbar_actions(article) return unless article.comment_paragraph_plugin_enabled? proc do - button :toggle_comment_paragraph, article.comment_paragraph_plugin_activated? ? _('Deactivate Comment Paragraph') : _('Activate Comment Paragraph'), :controller => 'comment_paragraph_plugin_myprofile', :action => 'toggle_activation', :id => article.id if article.allow_edit?(user) + button :toggle_comment_paragraph, article.comment_paragraph_plugin_activated? ? _('Deactivate Comments') : _('Activate Comments'), :controller => 'comment_paragraph_plugin_myprofile', :action => 'toggle_activation', :id => article.id if article.allow_edit?(user) end end diff --git a/public/style.css b/public/style.css index 67eb9fb..595bdfe 100644 --- a/public/style.css +++ b/public/style.css @@ -1,15 +1,17 @@ #content #article-toolbar .icon-toggle_comment_paragraph { - position: relative; top: -71px; border: 0; background-color: transparent; - padding-left: 0; color: gray; } #content #article-toolbar .icon-toggle_comment_paragraph:hover { color: black; } +.icon-toggle_comment_paragraph{ + background-image: url('/plugins/comment_paragraph/images/internet-group-chat.png'); +} + #comment-bubble.visible { visibility: visible; } -- libgit2 0.21.2