diff options
| author | Joe7 <jozsef.rnagy@site.hu> | 2011-01-09 20:52:31 +0100 |
|---|---|---|
| committer | Joe7 <jozsef.rnagy@site.hu> | 2011-01-09 21:05:28 +0100 |
| commit | 89737c09d572efe35014e668cdd06407c2c19d62 (patch) | |
| tree | ea3c7fb00ea5dba5b476f040a92490b205e89277 /modules/user/views | |
| parent | d74aad072d8ccca70efb1c8b673e8368566a1974 (diff) | |
Paginator for user manager admin view
Closes ticket #1557
Note: also optimizes the way item count is retrieved for users, saving <user_count>-1 queries when displaying this page
Diffstat (limited to 'modules/user/views')
| -rw-r--r-- | modules/user/views/admin_users.html.php | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index f067cae8..028d44eb 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -88,7 +88,7 @@ <?= ($user->last_login == 0) ? "" : gallery::date($user->last_login) ?> </td> <td> - <?= db::build()->from("items")->where("owner_id", "=", $user->id)->count_records() ?> + <?= $user->item_count ?> </td> <td> <a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>" @@ -108,6 +108,35 @@ </tr> <? endforeach ?> </table> + + <div class="g-right"> + <? if (isset($previous_page_url)): ?> + <a href="<?= $previous_page_url ?>" + class="g-button ui-icon-left ui-state-default ui-corner-all" + title="<?= t("Previous page")->for_html_attr() ?>"> + <? else: ?> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all" + title="<?= t("Previous page")->for_html_attr() ?>"> + <? endif ?> + <span class="ui-icon ui-icon-circle-plus"></span> + <?= t("Previous") ?> + </a> + + <?= t("Page %current of %total", array("current"=>$page, "total"=>$max_pages)) ?> + + <? if (isset($next_page_url)): ?> + <a href="<?= $next_page_url ?>" + class="g-button ui-icon-left ui-state-default ui-corner-all" + title="<?= t("Next page")->for_html_attr() ?>"> + <? else: ?> + <a class="g-button ui-icon-left ui-state-disabled ui-corner-all" + title="<?= t("Next page")->for_html_attr() ?>"> + <? endif ?> + <span class="ui-icon ui-icon-circle-plus"></span> + <?= t("Next") ?> + </a> + </div> + </div> </div> |
