X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=e87fe36d7985cc3e7a816176c73ec600685770f7;hb=a5d36cfea18a4cdb756a9270587c15946a6fd1e5;hp=509fb294dc52882a6e0f99c6ed6cdcc70a8b3e48;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 509fb294d..e87fe36d7 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -1,4 +1,5 @@ -% +%die "access denied" +% unless $FS::CurrentUser::CurrentUser->access_right('List customers'); % %my $conf = new FS::Conf; %my $maxrecords = $conf->config('maxsearchrecordsperpage'); @@ -84,6 +85,8 @@ % } % % if ( $cgi->param('otaker_on') ) { +% die "access denied" +% unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); % $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n"; % $search{otaker} = $1; % } elsif ( $cgi->param('agentnum_on') ) { @@ -238,33 +241,13 @@ <% $total %> matching customers found -% -% #begin pager -% my $pager = ''; -% if ( $total != scalar(@cust_main) && $maxrecords ) { -% unless ( $offset == 0 ) { -% $cgi->param('offset', $offset - $maxrecords); -% $pager .= 'Previous '; -% } -% my $poff; -% my $page; -% for ( $poff = 0; $poff < $total; $poff += $maxrecords ) { -% $page++; -% if ( $offset == $poff ) { -% $pager .= qq!$page !; -% } else { -% $cgi->param('offset', $poff); -% $pager .= qq!$page !; -% } -% } -% unless ( $offset + $maxrecords > $total ) { -% $cgi->param('offset', $offset + $maxrecords); -% $pager .= 'Next '; -% } -% } -% #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 @@ -327,7 +310,8 @@ % % print "

". $pager. include('/elements/table-grid.html'). < -% +% # +% Status % (bill) name % company %END @@ -391,10 +375,12 @@ % ? qq!$company! % : ' '; % - +% my $status = $cust_main->status; +% my $statuscol = $FS::cust_main::statuscolor{$status}; - ><% $custnum %> + ><% $custnum %> + >><% ucfirst($status) %> ><% "$last, $first" %> ><% $pcompany %> % @@ -506,8 +492,9 @@ % my($label, $value, $svcdb) = $cust_svc->label; % my($svcnum) = $cust_svc->svcnum; % my($sview) = $p.'view'; -% print $n2,qq!$label!, -% qq!$value!; +% print $n2, +% qq!!. FS::UI::Web::svc_link($m, $cust_svc->part_svc, $cust_svc) . qq! !. +% qq!!. FS::UI::Web::svc_label_link($m, $cust_svc->part_svc, $cust_svc) . qq! !; % $n2=""; % } % @@ -739,6 +726,3 @@ % % \@cust_main; %} -% -% -