From 0857cba67d87cdbfac318f8912b9e8147600a2a2 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 9 Dec 2004 22:20:42 +0000 Subject: [PATCH] UI: dont link to empty lists --- httemplate/search/cust_main.cgi | 43 ++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 16 deletions(-) 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)=''; -- 2.11.0