From 0a51b87d75f8c93de863f729ef1ca568ca227e32 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 25 Oct 2010 22:22:42 +0000 Subject: summary display of bulk packages with many services, RT#9821 --- httemplate/view/cust_main/packages.html | 1 + httemplate/view/cust_main/packages/services.html | 44 ++++++++++++++++++++++-- httemplate/view/elements/svc_Common.html | 16 +++++---- 3 files changed, 51 insertions(+), 10 deletions(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index f0f156bf8..660d0ef86 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -163,6 +163,7 @@ my %conf_opt = ( 'legacy_link' => $conf->exists('legacy_link'), 'svc_broadband-manage_link' => scalar($conf->config('svc_broadband-manage_link')), 'maestro-status_test' => $conf->exists('maestro-status_test'), + 'cust_pkg-large_pkg_size' => $conf->config('cust_pkg-large_pkg_size'), ); #subroutines diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index 6e30922c5..512efccc4 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -4,12 +4,40 @@ + % #foreach my $svcpart (sort {$a->{svcpart} <=> $b->{svcpart}} @{$pkg->{svcparts}}) { % foreach my $part_svc ( $cust_pkg->part_svc ) { -% #foreach my $service (@{$svcpart->{services}}) { -% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) { +% if ( $opt{'cust_pkg-large_pkg_size'} > 0 and +% $opt{'cust_pkg-large_pkg_size'} <= $cust_pkg->num_svcs ) { +% # summarize + + + +% } +% else { +% foreach my $cust_svc ( @{ $part_svc->cust_pkg_svc } ) { @@ -65,7 +93,8 @@ -% } +% } #foreach $cust_svc +% } % if ( ! $cust_pkg->get('cancel') % && $curuser->access_right('Provision customer service') @@ -137,4 +166,13 @@ sub svc_unprovision_link { qq!', 'Permanently unprovision and delete this service?')">Unprovision!; } +my %hints = ( +svc_acct => '(user or email)', +svc_domain => '(domain)', +svc_broadband => '(ip or mac)', +svc_forward => '(email)', +svc_phone => '(phone)', +svc_pbx => '(phone)', +); + diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 852640e0c..8a352f3fa 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -21,6 +21,13 @@ ) + + % if ( $custnum ) { <% include("/elements/header.html","View $label: $value") %> @@ -36,18 +43,13 @@ "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" )) %> - - % } Service #<% $svcnum %> % my $url = $opt{'edit_url'} || $p. 'edit/'. $opt{'table'}. '.cgi?'; | Edit this <% $label %> +| +Unprovision this Service
<% ntable("#cccccc") %>
+% my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart. +% ";pkgnum=".$cust_pkg->pkgnum; + <% $part_svc->svc %>  + (view all <% $cust_pkg->num_svcs %>) +% my $hint = $hints{$part_svc->svcdb}; +% if ( $hint ) { +
+
+ + + +
+% } #$hint +
<% FS::UI::Web::svc_link($m, $part_svc, $cust_svc) %>
<% ntable("#cccccc",2) %> -- cgit v1.2.1