[freeside-commits] freeside/httemplate/browse hardware_class.html, 1.1, 1.1.2.1

Mark Wells mark at wavetail.420.am
Wed Feb 15 18:13:41 PST 2012


Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv1487/httemplate/browse

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	hardware_class.html 
Log Message:
svc_hardware revision number, #16266

Index: hardware_class.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/hardware_class.html,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -w -d -r1.1 -r1.1.2.1
--- hardware_class.html	1 Apr 2011 02:52:13 -0000	1.1
+++ hardware_class.html	16 Feb 2012 02:13:38 -0000	1.1.2.1
@@ -33,7 +33,17 @@
   my $hardware_class = shift;
   my @rows = map { 
       my $type_link = $p.'edit/hardware_type.html?'.$_->typenum;
-      [ { 'data' => $_->model, 'link' => $type_link }, ] 
+      my $num_svcs = FS::svc_hardware->count("typenum = ".$_->typenum);
+      $num_svcs = $num_svcs > 0 ? 
+        mt('<B>[_1]</B> [numerate,_1,service]',$num_svcs) : '';
+      my $search_link = $p.'search/svc_hardware.cgi?typenum='.$_->typenum;
+
+      [ 
+        { 'data' => $_->model, 'link' => $type_link },
+        { 'data' => $_->revision, 'link' => $type_link },
+        { 'data' => $num_svcs, 'link' => $search_link, 'size' => -1 }
+      ]
+
     } $hardware_class->hardware_type;
 
   \@rows;



More information about the freeside-commits mailing list