Commit 8d276c65d6f6fc2a6a40d5fc65b31a628597a0b9
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'stable' of gitlab.com:participa/noosfero into stable
Showing
2 changed files
with
4 additions
and
12 deletions
Show diff stats
lib/noosfero/plugin.rb
| @@ -720,7 +720,7 @@ class Noosfero::Plugin | @@ -720,7 +720,7 @@ class Noosfero::Plugin | ||
| 720 | elsif method.to_s =~ /^content_expire_(#{content_actions.join('|')})$/ | 720 | elsif method.to_s =~ /^content_expire_(#{content_actions.join('|')})$/ |
| 721 | nil | 721 | nil |
| 722 | elsif context.respond_to?(method) | 722 | elsif context.respond_to?(method) |
| 723 | - context.send(method) | 723 | + context.send(method, *args) |
| 724 | else | 724 | else |
| 725 | super | 725 | super |
| 726 | end | 726 | end |
plugins/video/lib/video_plugin.rb
| @@ -9,9 +9,7 @@ class VideoPlugin < Noosfero::Plugin | @@ -9,9 +9,7 @@ class VideoPlugin < Noosfero::Plugin | ||
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | def self.extra_blocks | 11 | def self.extra_blocks |
| 12 | - { | ||
| 13 | - VideoPlugin::VideoBlock => {} | ||
| 14 | - } | 12 | + { VideoPlugin::VideoBlock => {}, VideoPlugin::VideoGalleryBlock => {:position=>['1']} } |
| 15 | end | 13 | end |
| 16 | 14 | ||
| 17 | def stylesheet? | 15 | def stylesheet? |
| @@ -36,14 +34,8 @@ class VideoPlugin < Noosfero::Plugin | @@ -36,14 +34,8 @@ class VideoPlugin < Noosfero::Plugin | ||
| 36 | 34 | ||
| 37 | def article_extra_toolbar_buttons(content) | 35 | def article_extra_toolbar_buttons(content) |
| 38 | if content.kind_of?(VideoPlugin::VideoGallery) | 36 | if content.kind_of?(VideoPlugin::VideoGallery) |
| 39 | - proc do | ||
| 40 | - content_tag('a', _("New Video"), | ||
| 41 | - { :id=>"new-video-btn", | ||
| 42 | - :class=>"button with-text icon-new", | ||
| 43 | - :href=>url_for(:action => 'new', :type=>'VideoPlugin::Video', :controller=>'cms', :parent_id => content.id), | ||
| 44 | - :title=>_("New Video") | ||
| 45 | - }) | ||
| 46 | - end | 37 | + url = url_for(:action => 'new', :type=>'VideoPlugin::Video', :controller=>'cms', :parent_id => content.id) |
| 38 | + {:title => _('New Video'), :url => url, :icon => 'button with-text icon-new'} | ||
| 47 | end | 39 | end |
| 48 | end | 40 | end |
| 49 | 41 |