Commit 358d87c74781ff68e8a5facaeaf2cccc455ce425
1 parent
30dbf4d7
Exists in
master
and in
29 other branches
ActionItem937: being more flexible when selecting folders
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/controllers/admin/admin_panel_controller.rb
@@ -51,7 +51,7 @@ class AdminPanelController < AdminController | @@ -51,7 +51,7 @@ class AdminPanelController < AdminController | ||
51 | end | 51 | end |
52 | 52 | ||
53 | def set_portal_folders | 53 | def set_portal_folders |
54 | - @portal_folders = environment.portal_community.articles.find_all_by_type('Folder') | 54 | + @portal_folders = environment.portal_community.folders |
55 | if request.post? | 55 | if request.post? |
56 | env = environment | 56 | env = environment |
57 | folders = params[:folders].map{|fid| Folder.find(:first, :conditions => {:profile_id => env.portal_community, :id => fid})} | 57 | folders = params[:folders].map{|fid| Folder.find(:first, :conditions => {:profile_id => env.portal_community, :id => fid})} |
app/models/environment.rb
@@ -553,7 +553,7 @@ class Environment < ActiveRecord::Base | @@ -553,7 +553,7 @@ class Environment < ActiveRecord::Base | ||
553 | end | 553 | end |
554 | 554 | ||
555 | def portal_folders | 555 | def portal_folders |
556 | - (settings[:portal_folders] || []).map{|fid| Folder.find(:first, :conditions => {:profile_id => portal_community.id, :id => fid})} | 556 | + (settings[:portal_folders] || []).map{|fid| portal_community.articles.find(fid) } |
557 | end | 557 | end |
558 | 558 | ||
559 | def portal_folders=(folders) | 559 | def portal_folders=(folders) |