3 main_block = 'pager_main';
5 start_block = 'pager_start';
6 prev_block = 'pager_prev';
7 current_block = 'pager_current';
8 next_block = 'pager_next';
9 end_block = 'pager_end';
10 list_block = 'pager_list';
12 start_label_block = 'pager_start_label';
13 prev_label_block = 'pager_prev_label';
14 current_label_block = 'pager_current_label';
15 next_label_block = 'pager_next_label';
16 end_label_block = 'pager_end_label';
17 list_label_block = 'pager_list_label';
24 str = BLOCK; include( 'start_block' ); END;
25 data.push(str) IF str;
27 str = BLOCK; include( 'prev_block' ); END;
28 data.push(str) IF str;
30 str = BLOCK; include( 'current_block' ); END;
31 data.push(str) IF str;
33 str = BLOCK; include( 'next_block' ); END;
34 data.push(str) IF str;
36 str = BLOCK; include( 'end_block' ); END;
37 data.push(str) IF str;
46 %]<a [% connect_href(self, 'page' => self.pager.first_page); process_attrs(attrs) %]>[%
47 include( 'start_label_block' ) %]</a>[%
51 BLOCK pager_start_label;
53 loc('Start'); ' ('; self.pager.first_page; ')';
59 IF self.pager.current_page != 1;
60 %]<a [% connect_href(self, 'page' => self.pager.previous_page); process_attrs(attrs) %]>[%
61 include( 'prev_label_block' ) %]</a>[%
66 BLOCK pager_prev_label;
68 loc('Previous'); ' ('; self.pager.previous_page; ')';
74 %]<a [% connect_href(self, 'page' => self.pager.current_page); process_attrs(attrs) %]>[%
75 include( 'current_label_block' ) %]</a>[%
79 BLOCK pager_current_label;
81 loc('Current'); ' ('; self.pager.current_page; ')';
87 IF self.pager.current_page != self.pager.last_page;
88 %]<a [% connect_href(self, 'page' => self.pager.next_page); process_attrs(attrs) %]>[%
89 include( 'next_label_block' ) %]</a>[%
94 BLOCK pager_next_label;
96 loc('Next'); ' ('; self.pager.next_page; ')';
102 %]<a [% connect_href(self, 'page' => self.pager.last_page); process_attrs(attrs) %]>[%
103 include( 'end_label_block' ) %]</a>[%
107 BLOCK pager_end_label;
109 loc('End'); ' ('; self.pager.last_page; ')';
115 FOREACH page IN self.pager.list;
116 '<a'; connect_href(self, 'page' => page); process_attrs(attrs); '>';
117 include( 'list_label_block' ); "</a>\n";
122 BLOCK pager_list_label;