Commit 0988fe9d5c48995fce0023ffaa4a10a5544ff519

Authored by Ábner Silva de Oliveira
1 parent 8476dfd0

added attribute_accebibles in video_block and fixed bug on article toolbar (dele…

…te, spread actions) when showing upload file in content_viewer
app/views/content_viewer/_article_toolbar.html.erb
... ... @@ -10,7 +10,7 @@
10 10  
11 11 <% if @page != profile.home_page && !@page.has_posts? && @page.allow_delete?(user) && !remove_content_button(:delete)%>
12 12 <% content = content_tag( 'span', _('Delete') ) %>
13   - <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page}) %>
  13 + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page.id}) %>
14 14 <% options = {:method => :post, :confirm => delete_article_message(@page)} %>
15 15 <%= expirable_button @page, :delete, content, url, options %>
16 16 <% end %>
... ... @@ -19,9 +19,9 @@
19 19 <% content = content_tag( 'span', _('Spread this') ) %>
20 20 <% url = nil %>
21 21 <% if profile.kind_of?(Person) %>
22   - <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }) %>
  22 + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page.id }) %>
23 23 <% elsif profile.kind_of?(Community) && environment.portal_community %>
24   - <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }) %>
  24 + <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page.id }) %>
25 25 <% end %>
26 26 <%= expirable_button @page, :spread, content, url if url %>
27 27 <% end %>
... ...
plugins/video/lib/video_block.rb
1 1 class VideoBlock < Block
2 2  
  3 + attr_accessible :url, :width, :height
  4 +
3 5 settings_items :url, :type => :string, :default => ""
4 6 settings_items :width, :type => :integer, :default => 400
5 7 settings_items :height, :type => :integer, :default => 315
... ...