summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-05-06 06:04:33 -0700
committerIvan Kohler <ivan@freeside.biz>2014-05-06 06:04:33 -0700
commitf9587ba36d31c9992005a359c74c88d703877194 (patch)
tree0bae49e6f35bfc878ca0c294d7cac6108b4edff2 /httemplate/view
parent28ba028563d62f19f1cc2bd1160dd8c5d7e9d960 (diff)
optimize package list with lots of packages, RT#28526
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_main/packages/section.html1
-rw-r--r--httemplate/view/cust_main/packages/services.html16
2 files changed, 9 insertions, 8 deletions
diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html
index a02bf594f..57ea378e0 100755
--- a/httemplate/view/cust_main/packages/section.html
+++ b/httemplate/view/cust_main/packages/section.html
@@ -107,6 +107,7 @@ my %conf_opt = (
'manage_link_loc' => scalar($conf->config('svc_broadband-manage_link_loc')),
'manage_link-new_window' => $conf->exists('svc_broadband-manage_link-new_window'),
'cust_pkg-large_pkg_size' => scalar($conf->config('cust_pkg-large_pkg_size')),
+ 'cust_pkg-hide_discontinued-part_svc' => $conf->exists('cust_pkg-hide_discontinued-part_svc'),
);
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index 7dfc0049e..bb676e8ab 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -10,13 +10,15 @@ function clearhint_search_cust_svc(obj, str) {
}
</SCRIPT>
-% foreach my $part_svc ( $cust_pkg->part_svc(
-% 'summarize_size' => $opt{'cust_pkg-large_pkg_size'}
-% ) )
-% {
-
+% foreach my $part_svc (
+% $cust_pkg->part_svc(
+% 'summarize_size' => $opt{'cust_pkg-large_pkg_size'},
+% 'hide_discontinued' => $opt{'cust_pkg-hide_discontinued-part_svc'},
+% )
+% ) {
+%
% my $num_cust_svc = $cust_pkg->num_cust_svc( $part_svc->svcpart );
-
+%
% if ( $opt{'cust_pkg-large_pkg_size'} > 0 and
% $opt{'cust_pkg-large_pkg_size'} <= $num_cust_svc ) { # summarize
%
@@ -116,8 +118,6 @@ my $cust_pkg = $opt{'cust_pkg'};
my $part_pkg = $opt{'part_pkg'};
my $curuser = $FS::CurrentUser::CurrentUser;
-my $conf = new FS::Conf;
-
sub svc_provision_link {
my ($cust_pkg, $part_svc, $opt, $curuser) = @_;