diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e9a63b25e..0def99733 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -392,6 +392,11 @@ class AdminController < ApplicationController def organization @organizations = Organization.find_by_sql("SELECT * FROM organizations ORDER BY created_at DESC") #@organizations = Organization.all.order("created_at desc") + @organization_count = @organizations.count + @organization_pages = Paginator.new @organization_count, 30, params['page'] || 1 + @organizations = paginateHelper @organizations,30 + + @page = (params['page'] || 1).to_i - 1 respond_to do |format| format.html end @@ -403,8 +408,8 @@ class AdminController < ApplicationController @schools = School.find_by_sql("SELECT * FROM schools ORDER BY created_at DESC") @school_count = @schools.count - @school_pages = Paginator.new @school_count, 50, params['page'] || 1 - @schools = paginateHelper @schools,50 + @school_pages = Paginator.new @school_count, 30, params['page'] || 1 + @schools = paginateHelper @schools,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format| diff --git a/app/views/admin/organization.html.erb b/app/views/admin/organization.html.erb index fe5fdb391..02b897f80 100644 --- a/app/views/admin/organization.html.erb +++ b/app/views/admin/organization.html.erb @@ -40,4 +40,8 @@ +