mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-09 21:19:11 -04:00
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.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user