mirror of
https://github.com/redmine/redmine.git
synced 2026-07-01 00:30:14 +02:00
Adds pagination to admin project list.
git-svn-id: http://svn.redmine.org/redmine/trunk@15755 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -34,7 +34,10 @@ class AdminController < ApplicationController
|
||||
|
||||
scope = Project.status(@status).sorted
|
||||
scope = scope.like(params[:name]) if params[:name].present?
|
||||
@projects = scope.to_a
|
||||
|
||||
@project_count = scope.count
|
||||
@project_pages = Paginator.new @project_count, per_page_option, params['page']
|
||||
@projects = scope.limit(@project_pages.per_page).offset(@project_pages.offset).to_a
|
||||
|
||||
render :action => "projects", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user