X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Felements%2Fsvc_devices.html;h=3d4e1bbc5df99c9601a2d39b8c18ad652482f412;hb=6e33e8af0974d49c1c0cf65b1963846d35f6c156;hp=745eabd9dd2007aa852ede3d6146791ac426953f;hpb=7c41eea8dca02a399739c29a0dfbda7efdd6df86;p=freeside.git diff --git a/httemplate/view/elements/svc_devices.html b/httemplate/view/elements/svc_devices.html index 745eabd9d..3d4e1bbc5 100644 --- a/httemplate/view/elements/svc_devices.html +++ b/httemplate/view/elements/svc_devices.html @@ -15,7 +15,7 @@ %if ( @devices || $num_part_device || $table eq 'dsl_device' ) { % my $svcnum = $svc_x->svcnum; - Devices + Devices (Add device)
@@ -30,7 +30,7 @@ <& /elements/table-grid.html &> -% if ( $table eq 'phone_device' || $table eq 'cable_device' ) { +% if ( $table ne 'dsl_device' ) { # ( $table eq 'phone_device' || $table eq 'cable_device' || $table eq 'pbx_device' ) { Type % } MAC Addr @@ -62,7 +62,10 @@ % if ( $table eq 'phone_device' || $svc_x->isa('FS::device_Common') ) { <% $td %><% $device->part_device->devicename |h %> % } - <% $td %><% $device->mac_addr %> + <% $td %><% $device->mac_addr_pretty %> +% my $vendor = Net::MAC::Vendor::lookup($device->mac_addr_formatted('U',':')); + (<% $vendor ? $vendor->[0] : '' %>) + <% $td %><% $export_links %> <% $td %>( % unless ( $opt{'no_edit'} ) { @@ -85,7 +88,7 @@ my $table = $opt{'table'}; #part_device, dsl_device my $svc_x = $opt{'svc_x'}; my $num_part_device = 0; -if ( $table eq 'phone_device' || $table eq 'cable_device' ) { +if ( $table ne 'dsl_device' ) { # ( $table eq 'phone_device' || $table eq 'cable_device' || $table eq 'pbx_device' ) { my $sth = dbh->prepare("SELECT COUNT(*) FROM part_device") #WHERE disabled = '' OR disabled IS NULL;"); or die dbh->errstr; @@ -94,6 +97,7 @@ if ( $table eq 'phone_device' || $table eq 'cable_device' ) { } my @devices = $svc_x->isa('FS::device_Common') ? $svc_x->device_objects() - : $svc_x->$table(); + : $table ? $svc_x->$table() + : ();