summaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-24 11:31:15 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-24 11:31:15 +0000
commitc9906480d3f279977720dc3f61534f4a5b77d1d2 (patch)
tree23d1ad1fc0a9435bcb703033dd7b5069ac565005 /app/controllers/admin_controller.rb
parent51b745470c1d71b92072210a008f29c5d5a945d1 (diff)
downloadredmine-c9906480d3f279977720dc3f61534f4a5b77d1d2.tar.gz
redmine-c9906480d3f279977720dc3f61534f4a5b77d1d2.zip
Merged nested projects branch. Removes limit on subproject nesting (#594).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2304 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r--app/controllers/admin_controller.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 45a20bf05..61d1eada7 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -26,9 +26,6 @@ class AdminController < ApplicationController
end
def projects
- sort_init 'name', 'asc'
- sort_update %w(name is_public created_on)
-
@status = params[:status] ? params[:status].to_i : 1
c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status])
@@ -37,14 +34,8 @@ class AdminController < ApplicationController
c << ["LOWER(identifier) LIKE ? OR LOWER(name) LIKE ?", name, name]
end
- @project_count = Project.count(:conditions => c.conditions)
- @project_pages = Paginator.new self, @project_count,
- per_page_option,
- params['page']
- @projects = Project.find :all, :order => sort_clause,
- :conditions => c.conditions,
- :limit => @project_pages.items_per_page,
- :offset => @project_pages.current.offset
+ @projects = Project.find :all, :order => 'lft',
+ :conditions => c.conditions
render :action => "projects", :layout => false if request.xhr?
end