4fe67ca6 |
1 | <?php |
2 | |
3 | /** |
4 | * addressbook_paginator.tpl |
5 | * |
6 | * Template to create an address book list paginator |
7 | * |
8 | * The following variables are available in this template: |
9 | * |
10 | * boolean $abook_compact_paginator Whether or not to show smaller paginator |
11 | * boolean $abook_page_selector Whether or not to use the paginator |
12 | * int $abook_page_selector_max How many page links to show on screen |
13 | * in the non-compact paginator format |
14 | * int $page_number What page is being viewed - 0 if not used |
15 | * int $page_size Maximum number of addresses to be shown |
16 | * per page |
17 | * int $total_addresses The total count of addresses in the backend |
18 | * boolean $show_all Whether or not all addresses are being shown |
19 | * boolean $abook_compact_paginator Whether or not pagination should be shown |
20 | * using the smaller, "compact" paginator |
21 | * array $current_page_args All known query string arguments for the |
22 | * current page request, for use when constructing |
23 | * links pointing back to same page (possibly |
24 | * changing one of them); structured as an |
25 | * associative array of key/value pairs |
26 | * |
c4faef33 |
27 | * @copyright 1999-2020 The SquirrelMail Project Team |
4fe67ca6 |
28 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
01144ffd |
29 | * @version $Id$ |
4fe67ca6 |
30 | * @package squirrelmail |
31 | * @subpackage templates |
32 | */ |
33 | |
34 | /** add required includes **/ |
35 | include_once(SM_PATH . 'functions/template/abook_util.php'); |
36 | |
37 | static $bAlreadyExecuted; |
38 | |
39 | /** extract template variables **/ |
40 | extract($t); |
41 | |
42 | /** Begin template **/ |
43 | |
44 | if (!isset($bAlreadyExecuted)) { |
45 | $bAlreadyExecuted = true; |
43e5d0e1 |
46 | ?><input type="hidden" name="current_page_number" value="<?php echo $page_number; ?>" /> |
47 | <input type="hidden" name="show_all" value="<?php echo $show_all; ?>" /><?php |
4fe67ca6 |
48 | |
49 | if ($javascript_on && $abook_compact_paginator) { |
50 | ?> |
51 | |
52 | <!-- start of compact paginator javascript --> |
53 | <script type="text/javascript"> |
54 | function SubmitOnSelect(select, URL) |
55 | { |
56 | URL += select.options[select.selectedIndex].value; |
57 | window.location.href = URL; |
58 | } |
59 | </script> |
60 | <!-- end of compact paginator javascript --> |
61 | |
62 | <?php |
63 | } |
64 | } |
65 | |
66 | //FIXME: added <small> tag just to buy needed space on crowded nav bar -- should we remove <small> and find another solution for un-crowding the nav bar? |
67 | echo '<small>' . get_abook_paginator($abook_page_selector, $abook_page_selector_max, $page_number, $page_size, $total_addresses, $show_all, $current_page_args, $abook_compact_paginator) . '</small>'; |
68 | |