Commit 262fb4e602b7198dc571af696df24ffcaf00451b
1 parent
c5b5a296
Exists in
master
and in
29 other branches
adding article toolbar hotspot
Showing
2 changed files
with
8 additions
and
0 deletions
Show diff stats
app/views/content_viewer/_article_toolbar.html.erb
@@ -46,6 +46,8 @@ | @@ -46,6 +46,8 @@ | ||
46 | <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> | 46 | <%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> |
47 | <% end %> | 47 | <% end %> |
48 | 48 | ||
49 | + <%= @plugins.dispatch(:article_toolbar_actions, @page).collect { |content| instance_exec(&content) }.join("")%> | ||
50 | + | ||
49 | <%= report_abuse(profile, :link, @page) %> | 51 | <%= report_abuse(profile, :link, @page) %> |
50 | 52 | ||
51 | </div> | 53 | </div> |
lib/noosfero/plugin.rb
@@ -426,6 +426,12 @@ class Noosfero::Plugin | @@ -426,6 +426,12 @@ class Noosfero::Plugin | ||
426 | [] | 426 | [] |
427 | end | 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 | # -> Adds adicional content to article | 435 | # -> Adds adicional content to article |
430 | # returns = lambda block that creates html code | 436 | # returns = lambda block that creates html code |
431 | def article_extra_contents(article) | 437 | def article_extra_contents(article) |