Commit 1d8ee3ac8b16f5f20a58fe6f728f950388698167
1 parent
4651cf61
Exists in
master
and in
29 other branches
ActionItem918: make it possible to upload files again
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
| @@ -27,7 +27,6 @@ class CmsController < MyProfileController | @@ -27,7 +27,6 @@ class CmsController < MyProfileController | ||
| 27 | parent_id = params ? params[:parent_id] : nil | 27 | parent_id = params ? params[:parent_id] : nil |
| 28 | if !parent_id or !Article.find(parent_id).blog? | 28 | if !parent_id or !Article.find(parent_id).blog? |
| 29 | articles += [ | 29 | articles += [ |
| 30 | - Folder, | ||
| 31 | RssFeed | 30 | RssFeed |
| 32 | ] | 31 | ] |
| 33 | end | 32 | end |
| @@ -38,7 +37,7 @@ class CmsController < MyProfileController | @@ -38,7 +37,7 @@ class CmsController < MyProfileController | ||
| 38 | end | 37 | end |
| 39 | 38 | ||
| 40 | def special_article_types | 39 | def special_article_types |
| 41 | - [Blog, UploadedFile] | 40 | + [Folder, Blog, UploadedFile] |
| 42 | end | 41 | end |
| 43 | 42 | ||
| 44 | def view | 43 | def view |
app/views/cms/view.rhtml
| @@ -18,6 +18,7 @@ | @@ -18,6 +18,7 @@ | ||
| 18 | <%= button :add, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %> | 18 | <%= button :add, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %> |
| 19 | <% end %> | 19 | <% end %> |
| 20 | <%= lightbox_button('new', label_for_new_article(@article), :action => 'new', :parent_id => parent_id) %> | 20 | <%= lightbox_button('new', label_for_new_article(@article), :action => 'new', :parent_id => parent_id) %> |
| 21 | + <%= button('save', _('Upload file'), :action => 'new', :parent_id => parent_id, :type => 'UploadedFile') %> | ||
| 21 | <% end %> | 22 | <% end %> |
| 22 | 23 | ||
| 23 | <table class='cms-articles'> | 24 | <table class='cms-articles'> |