Commit 15d5e0e5 authored by Steven Jones's avatar Steven Jones

Issue #1437856 by Steven Jones: Fixed Display of Client Quota missing pager navigation bar.

parent c07487b1
......@@ -3,9 +3,9 @@
* Page callback for admin/hosting/quotas
*/
function hosting_quota_admin_client_list() {
$items_per_page = 25;
$all_resources = module_invoke_all('hosting_quota_resource');
$result = pager_query('SELECT q.*, n.title FROM {hosting_client_quota} q INNER JOIN {node} n ON n.nid = q.client', 23);
$result = pager_query('SELECT q.*, n.title FROM {hosting_client_quota} q INNER JOIN {node} n ON n.nid = q.client', $items_per_page);
$output = array();
while ($row = db_fetch_object($result)) {
......@@ -24,7 +24,7 @@ function hosting_quota_admin_client_list() {
$output[$row->client]['name'] = $row->title;
}
return theme_hosting_quota_admin_list ($output, $all_resources);
return theme('hosting_quota_admin_list', $output, $all_resources, $items_per_page);
}
/**
......
......@@ -348,10 +348,16 @@ function hosting_quota_numeric_value($form, $form_state) {
function hosting_quota_theme($existing, $resource, $theme, $path) {
return array(
'hosting_quota_client' => array(
'arguments' => array('node' => NULL),
'arguments' => array(
'node' => NULL
),
),
'hosting_quota_admin_list' => array(
'arguments' => array('client_quotas' => array(), 'resources' => array()),
'arguments' => array(
'client_quotas' => array(),
'resources' => array(),
'items_per_page' => 25,
),
),
);
}
......@@ -364,7 +370,7 @@ function hosting_quota_theme($existing, $resource, $theme, $path) {
* @param $resources array
* The array of info about resources
*/
function theme_hosting_quota_admin_list ($client_quotas, $resources) {
function theme_hosting_quota_admin_list($client_quotas, $resources, $items_per_page = 25) {
$header = array(t('Client'));
$rows = array();
......@@ -389,7 +395,7 @@ function theme_hosting_quota_admin_list ($client_quotas, $resources) {
}
$rows[] = $row;
}
return '<p>' . t('Usage information for the last month.') . '</p>' . theme('table', $header, $rows) . theme('pager', NULL, 23, 0);
return '<p>' . t('Usage information for the last month.') . '</p>' . theme('table', $header, $rows) . theme('pager', array(), $items_per_page);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment