From 5cf38ed816006af52fa08475d2957a6f18846887 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 26 Apr 2011 09:48:21 -0700 Subject: Stop using Pagination() and instead use $theme->pager() in views. Move the pager() function up to Gallery_View and replace themes/admin_wind/views/pager.html.php (Pagination based) with a modified version from the wind theme in themes/admin_wind/views/paginator.html.php. Fixes #1718. --- modules/comment/controllers/admin_manage_comments.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/comment/controllers/admin_manage_comments.php') diff --git a/modules/comment/controllers/admin_manage_comments.php b/modules/comment/controllers/admin_manage_comments.php index 9bd1d7f6..effefcbb 100644 --- a/modules/comment/controllers/admin_manage_comments.php +++ b/modules/comment/controllers/admin_manage_comments.php @@ -45,6 +45,8 @@ class Admin_Manage_Comments_Controller extends Admin_Controller { $view = new Admin_View("admin.html"); $view->page_title = t("Manage comments"); + $view->page_type = "collection"; + $view->page_subtype = "admin_comments"; $view->content = new View("admin_manage_comments.html"); $view->content->counts = $this->_counts(); $view->content->menu = $this->_menu($view->content->counts); @@ -56,13 +58,12 @@ class Admin_Manage_Comments_Controller extends Admin_Controller { ->limit(self::$items_per_page) ->offset(($page - 1) * self::$items_per_page) ->find_all(); - $view->content->pager = new Pagination(); - $view->content->pager->initialize( - array("query_string" => "page", - "total_items" => $view->content->counts->$state, - "items_per_page" => self::$items_per_page, - "style" => "classic")); + // Pagination info + $view->page = $page; + $view->page_size = self::$items_per_page; + $view->children_count = $this->_counts()->$state; + $view->max_pages = ceil($view->children_count / $view->page_size); print $view; } -- cgit v1.2.3