[freeside-commits] freeside/httemplate/search cust_main.cgi, 1.69,
1.70
Ivan,,,
ivan at wavetail.420.am
Wed Oct 25 10:36:30 PDT 2006
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv4189/httemplate/search
Modified Files:
cust_main.cgi
Log Message:
pagination patch from UNTD - limit the number of page links displayed and have a drop-down option for selecting number of entries per page
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_main.cgi,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- cust_main.cgi 12 Sep 2006 21:27:06 -0000 1.69
+++ cust_main.cgi 25 Oct 2006 17:36:28 -0000 1.70
@@ -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
More information about the freeside-commits
mailing list