diff options
author | Bharat Mediratta <bharat@menalto.com> | 2011-04-26 09:48:21 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2011-04-26 09:48:21 -0700 |
commit | 5cf38ed816006af52fa08475d2957a6f18846887 (patch) | |
tree | afc496762fad5527ef6b17508096ec38601b0f34 /modules/user | |
parent | c6d1d6a6aed96f772690b74ac0be482bc2128a8d (diff) |
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.
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/controllers/admin_users.php | 8 | ||||
-rw-r--r-- | modules/user/views/admin_users.html.php | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index a3633b52..41be6c03 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -21,6 +21,8 @@ class Admin_Users_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); $view->page_title = t("Users and groups"); + $view->page_type = "collection"; + $view->page_subtype = "admin_users"; $view->content = new View("admin_users.html"); // @todo: add this as a config option @@ -29,6 +31,12 @@ class Admin_Users_Controller extends Admin_Controller { $builder = db::build(); $user_count = $builder->from("users")->count_records(); + // Pagination info + $view->page = $page; + $view->page_size = $page_size; + $view->children_count = $user_count; + $view->max_pages = ceil($view->children_count / $view->page_size); + $view->content->pager = new Pagination(); $view->content->pager->initialize( array("query_string" => "page", diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index a7bd6b27..033c9dae 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -110,7 +110,7 @@ </table> <div class="g-paginator"> - <?= $pager ?> + <?= $theme->paginator() ?> </div> </div> |