Commit 7a99f216a3af45b1871dd570858104a79f6ff38d

Authored by Leandro Santos
2 parents 1e0000df 262fb4e6

Merge branch 'add_hotspot_article_toolbar' into AI3205-comment-paragraph

app/views/content_viewer/_article_toolbar.html.erb
... ... @@ -46,6 +46,8 @@
46 46 <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %>
47 47 <% end %>
48 48  
  49 + <%= @plugins.dispatch(:article_toolbar_actions, @page).collect { |content| instance_exec(&content) }.join("")%>
  50 +
49 51 <%= report_abuse(profile, :link, @page) %>
50 52  
51 53 </div>
... ...
lib/noosfero/plugin.rb
... ... @@ -426,6 +426,12 @@ class Noosfero::Plugin
426 426 []
427 427 end
428 428  
  429 + # -> Adds aditional actions to article
  430 + # returns = lambda block that creates html code
  431 + def article_toolbar_actions article
  432 + nil
  433 + end
  434 +
429 435 # -> Adds adicional content to article
430 436 # returns = lambda block that creates html code
431 437 def article_extra_contents(article)
... ...