Commit 93403758c27e323ad74b0f9a230db6c37635132e
1 parent
390bcf53
Exists in
new_video_plugin
Fixes new video for gallery
Showing
1 changed file
with
8 additions
and
4 deletions
Show diff stats
plugins/video/lib/video_plugin.rb
... | ... | @@ -33,10 +33,14 @@ class VideoPlugin < Noosfero::Plugin |
33 | 33 | end |
34 | 34 | |
35 | 35 | def article_extra_toolbar_buttons(content) |
36 | - if content.kind_of?(VideoPlugin::VideoGallery) | |
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'} | |
39 | - end | |
36 | + return [] if !content.kind_of?(VideoPlugin::VideoGallery) | |
37 | + { | |
38 | + :id=>"new-video-btn", | |
39 | + :class=>"button with-text icon-new", | |
40 | + :url=> {:action => 'new', :type=>'VideoPlugin::Video', :controller=>'cms', :parent_id => content.id}, | |
41 | + :title=>_("New Video"), | |
42 | + :icon => :new | |
43 | + } | |
40 | 44 | end |
41 | 45 | |
42 | 46 | end | ... | ... |