X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fhardware_class.html;h=0bf314e3f688bc1c1a573d10f32a88140351aecb;hb=cd254e04ba204b5d0b4a69b65c392fb175dd1e97;hp=aef0fa39e9b3049a5e502cd2f624c73f005d86fc;hpb=b65b8096089410001dfbcd35f9a56f9405b9f5f1;p=freeside.git 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('[_1] [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;