projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1cbe920
)
fix sorting by a column advancing a page, RT#25740
author
Ivan Kohler
<ivan@freeside.biz>
Fri, 15 Nov 2013 23:14:49 +0000
(15:14 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Fri, 15 Nov 2013 23:14:49 +0000
(15:14 -0800)
httemplate/elements/pager.html
patch
|
blob
|
history
diff --git
a/httemplate/elements/pager.html
b/httemplate/elements/pager.html
index
a53300f
..
d360e64
100644
(file)
--- a/
httemplate/elements/pager.html
+++ b/
httemplate/elements/pager.html
@@
-1,13
+1,8
@@
-% my %opt = @_;
-% my $pager = '';
-%
% if ( $opt{'total'} != $opt{'num_rows'} && $opt{'maxrecords'} ) {
%
% unless ( $opt{'offset'} == 0 ) {
% $cgi->param('offset', $opt{'offset'} - $opt{'maxrecords'});
% if ( $opt{'total'} != $opt{'num_rows'} && $opt{'maxrecords'} ) {
%
% unless ( $opt{'offset'} == 0 ) {
% $cgi->param('offset', $opt{'offset'} - $opt{'maxrecords'});
-
<A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Previous</FONT></B></A>
<A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Previous</FONT></B></A>
-
% }
%
% my $page = 0;
% }
%
% my $page = 0;
@@
-47,9
+42,17
@@
%
% unless ( $opt{'offset'} + $opt{'maxrecords'} > $opt{'total'} ) {
% $cgi->param('offset', $opt{'offset'} + $opt{'maxrecords'});
%
% unless ( $opt{'offset'} + $opt{'maxrecords'} > $opt{'total'} ) {
% $cgi->param('offset', $opt{'offset'} + $opt{'maxrecords'});
-
<A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Next</FONT></B></A>
<A HREF="<% $cgi->self_url %>"><B><FONT SIZE="+1">Next</FONT></B></A>
-%
% }
%
% }
%
+% $cgi->param('offset', $orig_offset); #so future $self_url invocations don't advance a page
+%
% }
% }
+<%init>
+
+my %opt = @_;
+
+my $orig_offset = $opt{'offset'};
+
+</%init>
+