From 262fb4e602b7198dc571af696df24ffcaf00451b Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Mon, 2 Mar 2015 17:41:56 -0300 Subject: [PATCH] adding article toolbar hotspot --- app/views/content_viewer/_article_toolbar.html.erb | 2 ++ lib/noosfero/plugin.rb | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/app/views/content_viewer/_article_toolbar.html.erb b/app/views/content_viewer/_article_toolbar.html.erb index 5d4d508..87da0a9 100644 --- a/app/views/content_viewer/_article_toolbar.html.erb +++ b/app/views/content_viewer/_article_toolbar.html.erb @@ -46,6 +46,8 @@ <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> <% end %> + <%= @plugins.dispatch(:article_toolbar_actions, @page).collect { |content| instance_exec(&content) }.join("")%> + <%= report_abuse(profile, :link, @page) %> diff --git a/lib/noosfero/plugin.rb b/lib/noosfero/plugin.rb index a98643e..0e65133 100644 --- a/lib/noosfero/plugin.rb +++ b/lib/noosfero/plugin.rb @@ -426,6 +426,12 @@ class Noosfero::Plugin [] end + # -> Adds aditional actions to article + # returns = lambda block that creates html code + def article_toolbar_actions article + nil + end + # -> Adds adicional content to article # returns = lambda block that creates html code def article_extra_contents(article) -- libgit2 0.21.2