summaryrefslogtreecommitdiff
path: root/modules/user/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-04-26 09:48:21 -0700
committerBharat Mediratta <bharat@menalto.com>2011-04-26 09:48:21 -0700
commit5cf38ed816006af52fa08475d2957a6f18846887 (patch)
treeafc496762fad5527ef6b17508096ec38601b0f34 /modules/user/controllers
parentc6d1d6a6aed96f772690b74ac0be482bc2128a8d (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/controllers')
-rw-r--r--modules/user/controllers/admin_users.php8
1 files changed, 8 insertions, 0 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",