Commit 44bdd77795f4b3eeb4e22dbb0656f0a1c2dd5202
1 parent
b6ec7ab0
Exists in
master
and in
27 other branches
[community-track-plugin] Fixes remove_content_button arguments
We now need to pass content explicitly as a parameter in `remove_content_button`
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/community_track/views/content_viewer/_step_item.html.erb
| @@ -28,14 +28,14 @@ | @@ -28,14 +28,14 @@ | ||
| 28 | </div> | 28 | </div> |
| 29 | </div> | 29 | </div> |
| 30 | <div class="step_actions"> | 30 | <div class="step_actions"> |
| 31 | - <% if step_item.allow_edit?(user) && !remove_content_button(:edit) %> | 31 | + <% if step_item.allow_edit?(user) && !remove_content_button(:edit, step_item) %> |
| 32 | <%= button('eyes', _('View'), step_item.url) %> | 32 | <%= button('eyes', _('View'), step_item.url) %> |
| 33 | <% content = content_tag('span', label_for_edit_article(step_item)) %> | 33 | <% content = content_tag('span', label_for_edit_article(step_item)) %> |
| 34 | <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => step_item.id, :success_back_to => url_for(step_item.parent.view_url) }) %> | 34 | <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => step_item.id, :success_back_to => url_for(step_item.parent.view_url) }) %> |
| 35 | <%= expirable_button step_item, :edit, content, url %> | 35 | <%= expirable_button step_item, :edit, content, url %> |
| 36 | <% end %> | 36 | <% end %> |
| 37 | <% if step_item.accept_uploads? && step_item.allow_create?(user) %> | 37 | <% if step_item.accept_uploads? && step_item.allow_create?(user) %> |
| 38 | - <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => step_item)) unless remove_content_button(:upload)%> | 38 | + <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => step_item)) unless remove_content_button(:upload, step_item)%> |
| 39 | <% end %> | 39 | <% end %> |
| 40 | </div> | 40 | </div> |
| 41 | </li> | 41 | </li> |