summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormark <mark>2010-05-28 07:51:01 +0000
committermark <mark>2010-05-28 07:51:01 +0000
commit4ba00d7b85f35b6297cf8d96a05949cf1c067ce0 (patch)
treed6815f02c4bab4fee70d5541fc6706cf6d9c4e69
parent5cd82978f42b9f5e59b1f609be613b148600add2 (diff)
RT#8465: add service label to downloadable package reports
-rwxr-xr-xhttemplate/search/cust_pkg.cgi17
1 files changed, 15 insertions, 2 deletions
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index adbec7a74..74a3a6d1e 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -80,6 +80,18 @@
# '</table>';
# },
sub {
+ my $cust_pkg = shift;
+ my $type = $cgi->param('_type') || '';
+ if ($type =~ /xls|csv/) {
+ my $cust_svc = $cust_pkg->primary_cust_svc;
+ if($cust_svc) {
+ return join ": ",($cust_svc->label)[0,1];
+ }
+ else {
+ return '';
+ }
+ }
+ else {
[ map {
[
{ 'data' => $_->[0]. ':',
@@ -91,9 +103,10 @@
$_->[2]. '.cgi?'. $_->[3],
},
];
- } shift->labels
+ } $cust_pkg->labels
];
- },
+ }
+ }
],
'color' => [
'',