[% main_block = 'pager_main'; start_block = 'pager_start'; prev_block = 'pager_prev'; current_block = 'pager_current'; next_block = 'pager_next'; end_block = 'pager_end'; list_block = 'pager_list'; start_label_block = 'pager_start_label'; prev_label_block = 'pager_prev_label'; current_label_block = 'pager_current_label'; next_label_block = 'pager_next_label'; end_label_block = 'pager_end_label'; list_label_block = 'pager_list_label'; BLOCK pager_main; '
[ '; data = []; str = BLOCK; include( 'start_block' ); END; data.push(str) IF str; str = BLOCK; include( 'prev_block' ); END; data.push(str) IF str; str = BLOCK; include( 'current_block' ); END; data.push(str) IF str; str = BLOCK; include( 'next_block' ); END; data.push(str) IF str; str = BLOCK; include( 'end_block' ); END; data.push(str) IF str; data.join(" |\n"); " ]
\n"; END; BLOCK pager_start; %] self.pager.first_page); process_attrs(attrs) %]>[% include( 'start_label_block' ) %][% END; BLOCK pager_start_label; loc('Start'); ' ('; self.pager.first_page; ')'; END; BLOCK pager_prev; IF self.pager.current_page != 1; %] self.pager.previous_page); process_attrs(attrs) %]>[% include( 'prev_label_block' ) %][% END; END; BLOCK pager_prev_label; loc('Previous'); ' ('; self.pager.previous_page; ')'; END; BLOCK pager_current; %] self.pager.current_page); process_attrs(attrs) %]>[% include( 'current_label_block' ) %][% END; BLOCK pager_current_label; loc('Current'); ' ('; self.pager.current_page; ')'; END; BLOCK pager_next; IF self.pager.current_page != self.pager.last_page; %] self.pager.next_page); process_attrs(attrs) %]>[% include( 'next_label_block' ) %][% END; END; BLOCK pager_next_label; loc('Next'); ' ('; self.pager.next_page; ')'; END; BLOCK pager_end; %] self.pager.last_page); process_attrs(attrs) %]>[% include( 'end_label_block' ) %][% END; BLOCK pager_end_label; loc('End'); ' ('; self.pager.last_page; ')'; END; BLOCK pager_list; FOREACH page IN self.pager.list; ' page); process_attrs(attrs); '>'; include( 'list_label_block' ); "\n"; END; END; BLOCK pager_list_label; page; END; %]