summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_main.cgi
diff options
context:
space:
mode:
authorivan <ivan>2006-10-25 17:36:28 +0000
committerivan <ivan>2006-10-25 17:36:28 +0000
commit5eb3dab3ea20a9861074a41bef19c9ac4dcb2336 (patch)
treeaa65377cb8b9f0f32f2d05b3a441b828ef2a3d7b /httemplate/search/cust_main.cgi
parent3a060deb9ca28876b17b4f6781abee3d1e233ba0 (diff)
pagination patch from UNTD - limit the number of page links displayed and have a drop-down option for selecting number of entries per page
Diffstat (limited to 'httemplate/search/cust_main.cgi')
-rwxr-xr-xhttemplate/search/cust_main.cgi34
1 files changed, 7 insertions, 27 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 509fb294d..1b6b52675 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -238,33 +238,13 @@
<% $total %> matching customers found
-%
-% #begin pager
-% my $pager = '';
-% if ( $total != scalar(@cust_main) && $maxrecords ) {
-% unless ( $offset == 0 ) {
-% $cgi->param('offset', $offset - $maxrecords);
-% $pager .= '<A HREF="'. $cgi->self_url.
-% '"><B><FONT SIZE="+1">Previous</FONT></B></A> ';
-% }
-% my $poff;
-% my $page;
-% for ( $poff = 0; $poff < $total; $poff += $maxrecords ) {
-% $page++;
-% if ( $offset == $poff ) {
-% $pager .= qq!<FONT SIZE="+2">$page</FONT> !;
-% } else {
-% $cgi->param('offset', $poff);
-% $pager .= qq!<A HREF="!. $cgi->self_url. qq!">$page</A> !;
-% }
-% }
-% unless ( $offset + $maxrecords > $total ) {
-% $cgi->param('offset', $offset + $maxrecords);
-% $pager .= '<A HREF="'. $cgi->self_url.
-% '"><B><FONT SIZE="+1">Next</FONT></B></A> ';
-% }
-% }
-% #end pager
+
+% my $pager = include( '/elements/pager.html',
+% 'offset' => $offset,
+% 'num_rows' => scalar(@cust_main),
+% 'total' => $total,
+% 'maxrecords' => $maxrecords,
+% );
%
% unless ( $cgi->param('cancelled') ) {
% if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me