summaryrefslogtreecommitdiff
path: root/httemplate/browse/hardware_class.html
diff options
context:
space:
mode:
authormark <mark>2012-02-16 02:13:00 +0000
committermark <mark>2012-02-16 02:13:00 +0000
commit825422583d2d510c0f552c513bef4cc1ac921950 (patch)
treeb48078d8a2347212fbb5ad8eb92c99c5782afb2b /httemplate/browse/hardware_class.html
parenta7edb84851d2238c7ec449483f5bd34e40813ccd (diff)
svc_hardware revision number, #16266
Diffstat (limited to 'httemplate/browse/hardware_class.html')
-rw-r--r--httemplate/browse/hardware_class.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/httemplate/browse/hardware_class.html b/httemplate/browse/hardware_class.html
index aef0fa39e..0bf314e3f 100644
--- a/httemplate/browse/hardware_class.html
+++ b/httemplate/browse/hardware_class.html
@@ -33,7 +33,17 @@ my $types_sub = sub {
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;