From: ivan Date: Thu, 9 Dec 2004 22:20:42 +0000 (+0000) Subject: UI: dont link to empty lists X-Git-Tag: BEFORE_FINAL_MASONIZE~798 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0857cba67d87cdbfac318f8912b9e8147600a2a2 UI: dont link to empty lists --- diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 32ce10d94..8dd38991f 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -398,36 +398,47 @@ END } foreach my $addl_col ( @addl_cols ) { - print ""; + print ""; if ( $addl_col eq 'tickets' ) { if ( @custom_priorities ) { print &itable('', 0); foreach my $priority ( @custom_priorities, '' ) { - my $ahref = - ''; - print "$ahref". - FS::TicketSystem->num_customer_tickets($custnum,$priority). - "". + + my $num = + FS::TicketSystem->num_customer_tickets($custnum,$priority); + my $ahref = ''; + $aref = ''; + if $num; + + print ''. + " $ahref$num". "$ahref". ( $priority || '(none)' ). ""; + } print ''. - ''; + ''; } - my $ahref = - ''; + + my $ahref = ''; + my $ahref = ''; + if $cust_main->get($addl_col); + print $ahref. $cust_main->get($addl_col). ''; - print "${ahref}Total" + print "". + "${ahref}Total". + "" if @custom_priorities; + } else { - print ''. $cust_main->get($addl_col). ''; + print $cust_main->get($addl_col); } - print ""; + print ""; } my($n1)='';