Commit 4d7446b107cc4ae0f5947efbbeac48f3df7220eb
Exists in
master
and in
29 other branches
Merge branch 'fix-id-passing-content-viewer' into 'stable'
Fix id passing on content viewer See merge request !329
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
app/views/content_viewer/_article_toolbar.rhtml
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | 10 | ||
11 | <% if @page != profile.home_page && !@page.has_posts? && @page.allow_delete?(user) && !remove_content_button(:delete)%> | 11 | <% if @page != profile.home_page && !@page.has_posts? && @page.allow_delete?(user) && !remove_content_button(:delete)%> |
12 | <% content = content_tag( 'span', _('Delete') ) %> | 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 | <% options = {:method => :post, :confirm => delete_article_message(@page)} %> | 14 | <% options = {:method => :post, :confirm => delete_article_message(@page)} %> |
15 | <%= expirable_button @page, :delete, content, url, options %> | 15 | <%= expirable_button @page, :delete, content, url, options %> |
16 | <% end %> | 16 | <% end %> |
@@ -19,9 +19,9 @@ | @@ -19,9 +19,9 @@ | ||
19 | <% content = content_tag( 'span', _('Spread this') ) %> | 19 | <% content = content_tag( 'span', _('Spread this') ) %> |
20 | <% url = nil %> | 20 | <% url = nil %> |
21 | <% if profile.kind_of?(Person) %> | 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 | <% elsif profile.kind_of?(Community) && environment.portal_community %> | 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 | <% end %> | 25 | <% end %> |
26 | <%= expirable_button @page, :spread, content, url if url %> | 26 | <%= expirable_button @page, :spread, content, url if url %> |
27 | <% end %> | 27 | <% end %> |