summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_main.cgi
diff options
context:
space:
mode:
authorivan <ivan>2004-12-09 22:20:42 +0000
committerivan <ivan>2004-12-09 22:20:42 +0000
commit0857cba67d87cdbfac318f8912b9e8147600a2a2 (patch)
tree8ad0e1459a653da29e39f3e7f512629f02d9f07d /httemplate/search/cust_main.cgi
parent6b977f1223bba92d5723d9fd898d8ebe682b6424 (diff)
UI: dont link to empty lists
Diffstat (limited to 'httemplate/search/cust_main.cgi')
-rwxr-xr-xhttemplate/search/cust_main.cgi43
1 files 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 "<TD ROWSPAN=$rowspan ALIGN=right>";
+ print "<TD ROWSPAN=$rowspan ALIGN=right><FONT SIZE=-1>";
if ( $addl_col eq 'tickets' ) {
if ( @custom_priorities ) {
print &itable('', 0);
foreach my $priority ( @custom_priorities, '' ) {
- my $ahref =
- '<A HREF="'.
- FS::TicketSystem->href_customer_tickets($custnum,$priority).
- '">';
- print "<TR><TD ALIGN=right><FONT SIZE=-1>$ahref".
- FS::TicketSystem->num_customer_tickets($custnum,$priority).
- "</A></FONT></TD>".
+
+ my $num =
+ FS::TicketSystem->num_customer_tickets($custnum,$priority);
+ my $ahref = '';
+ $aref = '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum,$priority).
+ '">';
+ if $num;
+
+ print '<TR>'.
+ " <TD ALIGN=right><FONT SIZE=-1>$ahref$num</A></FONT></TD>".
"<TD ALIGN=left><FONT SIZE=-1>$ahref".
( $priority || '<i>(none)</i>' ).
"</A></FONT></TD></TR>";
+
}
print '<TR><TD BGCOLOR="#000000" COLSPAN=2></TD></TR>'.
- '<TR><TD ALIGN=right>';
+ '<TR><TD ALIGN=right><FONT SIZE=-1>';
}
- my $ahref =
- '<A HREF="'.
- FS::TicketSystem->href_customer_tickets($custnum).
- '">';
+
+ my $ahref = '';
+ my $ahref = '<A HREF="'.
+ FS::TicketSystem->href_customer_tickets($custnum).
+ '">';
+ if $cust_main->get($addl_col);
+
print $ahref. $cust_main->get($addl_col). '</A>';
- print "</TD><TD ALIGN=left>${ahref}Total</A></TD></TR></TABLE>"
+ print "</FONT></TD><TD ALIGN=left>".
+ "<FONT SIZE=-1>${ahref}Total</A><FONT>".
+ "</TD></TR></TABLE>"
if @custom_priorities;
+
} else {
- print '<FONT SIZE=-1>'. $cust_main->get($addl_col). '</FONT>';
+ print $cust_main->get($addl_col);
}
- print "</TD>";
+ print "</FONT></TD>";
}
my($n1)='';