Commit c5cb748c11584042b3cf4838c828462f57c24c43
1 parent
67ab8c92
Exists in
master
and in
28 other branches
ActionItem158: adding a delete action for articles
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1796 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
app/views/cms/view.rhtml
... | ... | @@ -39,6 +39,7 @@ |
39 | 39 | <td> |
40 | 40 | <%= link_to _('Properties'), :action => 'edit', :id => folder.id %> |
41 | 41 | <%= link_to _('Public view'), folder.url %> |
42 | + <%= link_to _('Delete'), { :action => 'destroy', :id => folder.id }, :method => :post, :confirm => _('Are you sure that you want to remove this folder? Note that all the items inside it will also be removed!') %> | |
42 | 43 | </td> |
43 | 44 | </tr> |
44 | 45 | <% end %> |
... | ... | @@ -51,9 +52,6 @@ |
51 | 52 | </td> |
52 | 53 | </tr> |
53 | 54 | <% end %> |
54 | - <% if @subitems.empty? %> | |
55 | - <tr><td colspan='2' align='center'><em><%= _('None') %></em></td></tr> | |
56 | - <% end %> | |
57 | 55 | <% for item in @subitems %> |
58 | 56 | <tr> |
59 | 57 | <td> |
... | ... | @@ -66,9 +64,14 @@ |
66 | 64 | <td> |
67 | 65 | <%= link_to _('Edit'), :action => 'edit', :id => item.id %> |
68 | 66 | <%= link_to _('Public view'), item.url %> |
67 | + <%= link_to _('Delete'), { :action => 'destroy', :id => item.id }, :method => :post, :confirm => _('Are you sure that you want to remove this item?') %> | |
69 | 68 | </td> |
70 | 69 | </tr> |
71 | 70 | <% end %> |
72 | 71 | |
72 | + <% if @subitems.empty? || @folders.empty? %> | |
73 | + <tr><td colspan='3' align='center'><em><%= _('None') %></em></td></tr> | |
74 | + <% end %> | |
75 | + | |
73 | 76 | |
74 | 77 | </table> | ... | ... |
test/functional/cms_controller_test.rb