9593be6b5346df20fe87d1b2d8385591febe959b
[squirrelmail.git] / templates / default / paginator.tpl
1 <?php
2
3 /**
4 * paginator.tpl
5 *
6 * Template to create a message list paginator
7 *
8 * The following variables are available in this template:
9 //FIXME: need to clean (and document) this list, it is just a dump of the array keys of $t
10 * $sTemplateID
11 * $icon_theme_path
12 * $javascript_on
13 * $delayed_errors
14 * $frames
15 * $lang
16 * $page_title
17 * $header_tags
18 * $plugin_output
19 * $header_sent
20 * $body_tag_js
21 * $shortBoxName
22 * $sm_attribute_str
23 * $frame_top
24 * $urlMailbox
25 * $startMessage
26 * $hide_sm_attributions
27 * $uri
28 * $text
29 * $onclick
30 * $class
31 * $id
32 * $target
33 * $color
34 * $form_name
35 * $form_id
36 * $page_selector
37 * $page_selector_max
38 * $messagesPerPage
39 * $showall
40 * $end_msg
41 * $align
42 * $iNumberOfMessages
43 * $aOrder
44 * $aFormElements
45 * $sort
46 * $pageOffset
47 * $baseurl
48 * $aMessages
49 * $trash_folder
50 * $sent_folder
51 * $draft_folder
52 * $thread_link_str
53 * $php_self
54 * $mailbox
55 * $enablesort
56 * $icon_theme
57 * $use_icons
58 * $alt_index_colors
59 * $fancy_index_highlite
60 * $aSortSupported
61 * $show_label_columns
62 * $compact_paginator
63 * $aErrors
64 *
65 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
66 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
67 * @version $Id$
68 * @package squirrelmail
69 * @subpackage templates
70 */
71
72 /** include functions */
73 include_once(SM_PATH . 'functions/template/paginator_util.php');
74
75 static $bScriptAdded;
76
77 extract($t);
78
79 if ($javascript_on && $compact_paginator && !isset($bScriptAdded)) {
80 $bScriptAdded = true;
81 ?>
82
83 <!-- start of compact paginator javascript -->
84 <script type="text/javascript">
85 function SubmitOnSelect(select, URL)
86 {
87 URL += select.options[select.selectedIndex].value;
88 window.location.href = URL;
89 }
90 </script>
91 <!-- end of compact paginator javascript -->
92
93 <?php
94 }
95
96 if (isset($compact_paginator) && $compact_paginator) {
97 $sPaginator = get_compact_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $javascript_on, $page_selector);
98 } else {
99 $sPaginator = get_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $page_selector, $page_selector_max);
100 }
101 // display the paginator string.
102 echo $sPaginator;