freeside/httemplate/search cust_main.cgi,1.54,1.55

ivan ivan at pouncequick.420.am
Thu Dec 9 14:20:48 PST 2004


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory pouncequick:/tmp/cvs-serv19266

Modified Files:
	cust_main.cgi 
Log Message:
UI: dont link to empty lists

Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_main.cgi,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- cust_main.cgi	9 Dec 2004 22:06:41 -0000	1.54
+++ cust_main.cgi	9 Dec 2004 22:20:42 -0000	1.55
@@ -398,36 +398,47 @@
     }
 
     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)='';




More information about the freeside-commits mailing list