summaryrefslogtreecommitdiff
path: root/httemplate/search/svc_fiber.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/svc_fiber.html')
-rw-r--r--httemplate/search/svc_fiber.html18
1 files changed, 17 insertions, 1 deletions
diff --git a/httemplate/search/svc_fiber.html b/httemplate/search/svc_fiber.html
index 0cb735c96..3960a1635 100644
--- a/httemplate/search/svc_fiber.html
+++ b/httemplate/search/svc_fiber.html
@@ -10,6 +10,7 @@
'ONT',
'Model',
'Serial',
+ emt('Pkg. Status'),
FS::UI::Web::cust_header($cgi->param('cust_fields')),
],
'fields' => [ 'svcnum',
@@ -20,6 +21,10 @@
'ont_id',
'ont_description',
'ont_serial',
+ sub {
+ $cust_pkg_cache{$_[0]->svcnum} ||= $_[0]->cust_svc->cust_pkg;
+ $cust_pkg_cache{$_[0]->svcnum}->ucfirst_status
+ },
\&FS::UI::Web::cust_fields,
],
'links' => [ $link,
@@ -28,15 +33,21 @@
$link,
$link,
$link,
+ '', # pkg status
FS::UI::Web::cust_links($cgi->param('cust_fields')),
],
- 'align' => 'rlllll'. FS::UI::Web::cust_aligns(),
+ 'align' => 'rlllllr'. FS::UI::Web::cust_aligns(),
'color' => [
('') x 6,
+ sub {
+ my $c = FS::cust_pkg::statuscolors;
+ $c->{$cust_pkg_cache{$_[0]->svcnum}->status };
+ }, # pkg status
FS::UI::Web::cust_colors(),
],
'style' => [
('') x 6,
+ 'b',
FS::UI::Web::cust_styles(),
],
@@ -48,6 +59,8 @@ die "access denied" unless
'List services'
]);
+my %cust_pkg_cache;
+
my $conf = new FS::Conf;
my %search_hash;
@@ -58,6 +71,9 @@ if ( $cgi->param('magic') eq 'unlinked' ) {
ont_typenum oltnum shelf olt_port card vlan )) {
$search_hash{$_} = $cgi->param($_) if defined($cgi->param($_));
}
+ if ( defined($cgi->param('cancelled')) ) {
+ $search_hash{'cancelled'} = $cgi->param('cancelled') ? 1 : 0;
+ }
}
my $query = FS::svc_fiber->search(\%search_hash);