File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 5454my $Transactions = RT::Transactions-> new($session{CurrentUser});
5555$Transactions-> Limit(FIELD => 'ObjectType', VALUE => 'RT::Configuration');
5656$Transactions-> OrderBy(FIELD => 'Created', ORDER => 'DESC');
57+ $Transactions-> RowsPerPage($PerPage);
58+
59+ my $TotalFound = $Transactions-> CountAll();
60+ my $Pages;
61+ if ( $TotalFound && $TotalFound > $PerPage ) {
62+ $Pages = int( $TotalFound / $PerPage ) + ( $TotalFound % $PerPage ? 1 : 0 );
63+ $Page = $Pages if $Page > $Pages;
64+ }
65+ else {
66+ $Page = 1;
67+ }
68+ $Transactions-> GotoPage($Page - 1);
69+
5770</ %INIT>
5871< & /Admin/Elements/Header, Title => $title &>
5972< & /Elements/Tabs &>
7386 RowNum => $i
7487 &>
7588% $i++;
89+ % }
90+
91+ % if ( $TotalFound > $PerPage ) {
92+ < & /Elements/CollectionListPaging,
93+ BaseURL => '?',
94+ Rows => $PerPage,
95+ TotalFound => $TotalFound,
96+ CurrentPage => $Page,
97+ Pages => $Pages,
98+ URLParams => { map { $_ => $ARGS{$_} } qw/PerPage Page/ },
99+ &>
76100% }
77101 </ div >
78102 </ &>
79103</ div >
104+
105+ < %ARGS>
106+ $PerPage => 50
107+ $Page => 1
108+ </ %ARGS>
You can’t perform that action at this time.
0 commit comments