summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/cust_main.cgi5
-rwxr-xr-xhttemplate/view/cust_main/locations.html10
-rwxr-xr-xhttemplate/view/cust_main/packages.html35
-rw-r--r--httemplate/view/cust_main/packages/contact.html6
-rw-r--r--httemplate/view/cust_main/packages/location.html6
-rw-r--r--httemplate/view/cust_main/packages/package.html25
-rwxr-xr-xhttemplate/view/cust_main/packages/section.html7
-rw-r--r--httemplate/view/cust_main/packages/status.html8
8 files changed, 67 insertions, 35 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index be0100fb3..1f9e0f904 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -162,11 +162,6 @@ function areyousure(href, message) {
<BR><BR>
% }
-%if ( $conf->exists('maestro-status_test') ) {
- <A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $custnum %>"><% mt('Test maestro status') |h %></A>
- <BR><BR>
-% }
-
<A NAME="cust_main"></A>
<TABLE BORDER=0>
<TR>
diff --git a/httemplate/view/cust_main/locations.html b/httemplate/view/cust_main/locations.html
index 689c9a390..7eb52ca46 100755
--- a/httemplate/view/cust_main/locations.html
+++ b/httemplate/view/cust_main/locations.html
@@ -28,15 +28,19 @@ STYLE="padding-bottom: 0px;
% }
<% $loc->location_label %></SPAN>
<SPAN STYLE="float:right;">
-% if ( $locationnum and !$loc->disabled ) {
+% if ( $locationnum && !$loc->disabled && ! $opt{no_links} ) {
<% edit_location_link($locationnum) %>
% }
-% if ( $locationnum and !$loc->disabled and !$active{$locationnum} ) {
+% if ( $locationnum && !$loc->disabled && !$active{$locationnum} && ! $opt{no_links} ) {
&nbsp;<% disable_location_link($locationnum) %>
% }
</SPAN></TH></TR>
% if (@$packages) {
-<& packages/section.html, 'packages' => $packages, 'cust_main' => $cust_main &>
+ <& packages/section.html,
+ 'packages' => $packages,
+ 'cust_main' => $cust_main,
+ 'no_links' => $opt{no_links}
+ &>
% }
</TABLE><BR>
% } #foreach $locationnum
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 546dd89c3..e32fe4c03 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -24,7 +24,10 @@ table.usage {
.row1 { background-color: #ffffff; }
</STYLE>
-% my $s = 0;
+
+% unless ( $opt{no_links} ) {
+
+% my $s = 0;
% if ( $curuser->access_right('Qualify service') ) {
<% $s++ ? ' | ' : '' %>
@@ -43,21 +46,33 @@ table.usage {
<& one_time_charge_link.html, $cust_main &>
% }
+% if ( $curuser->access_right('Bulk move customer services') ) {
+ <% $s++ ? ' | ' : '' %>
+
+ <& /elements/popup_link-cust_main.html,
+ 'label' => emt('Move services between packages'),
+ 'action' => "${p}edit/bulk-cust_svc-pkgnum.html",
+ 'cust_main' => $cust_main,
+ 'actionlabel' => emt('Move services'),
+ 'width' => 968, #763,
+ 'height' => 575,
+ &>
+
+% }
+
% if ( $curuser->access_right('Bulk change customer packages') ) {
<% $s++ ? ' | ' : '' %>
- <A HREF="<% $p %>edit/cust_pkg.cgi?<% $cust_main->custnum %>"><% mt('Bulk order and cancel packages') |h %></A> (<% mt('preserves services') |h %>)
+ <A HREF="<% $p %>edit/cust_pkg.cgi?<% $cust_main->custnum %>"><% mt('Bulk order and cancel packages') |h %></A>
% }
<BR><BR>
+% } # unless $opt{no_links}
+
<TABLE>
<TR>
<TD ALIGN="left" VALIGN="top">
-% if ( @$packages ) {
-
-<% mt('Current packages') |h %>
-% }
% if ( $cust_main->num_cancelled_pkgs ) {
% if ( $cgi->param('showcancelledpackages') eq '0' #see if it was set by me
% || ( $conf->exists('hidecancelledpackages')
@@ -86,6 +101,9 @@ table.usage {
% }
</TD>
+
+% unless ( $opt{no_links} ) {
+
<TD ALIGN="right">
<A HREF="<%$p%>search/report_cust_pkg.html?custnum=<% $cust_main->custnum %>"><% mt('Package reports') |h %></A>
% if ( $curuser->access_right('Qualify service') ) {
@@ -97,6 +115,9 @@ table.usage {
<% mt('Usage reports:') |h %>
<A HREF="<%$p%>search/report_cdr.html?custnum=<% $cust_main->custnum %>"><% mt('CDRs') |h %></A>
</TD>
+
+% } # unless $opt{no_links}
+
</TR>
<TR>
@@ -105,6 +126,7 @@ table.usage {
<& locations.html,
'cust_main' => $cust_main,
'packages' => $packages,
+ %opt,
&>
% }
% else {
@@ -113,6 +135,7 @@ table.usage {
<& packages/section.html,
'cust_main' => $cust_main,
'packages' => $packages,
+ %opt,
&>
</TABLE>
% }
diff --git a/httemplate/view/cust_main/packages/contact.html b/httemplate/view/cust_main/packages/contact.html
index fe8b71534..93985e404 100644
--- a/httemplate/view/cust_main/packages/contact.html
+++ b/httemplate/view/cust_main/packages/contact.html
@@ -1,16 +1,16 @@
% if ( $contact ) {
<% $contact->line |h %>
-% if ( $show_change_link ) {
+% if ( $show_change_link && ! $opt{no_links} ) {
<FONT SIZE=-1>
(&nbsp;<%pkg_change_contact_link($cust_pkg)%>&nbsp;)
</FONT>
% }
-% if ( $show_detach_link ) {
+% if ( $show_detach_link && ! $opt{no_links} ) {
<FONT SIZE=-1>
(&nbsp;<%pkg_detach_link($cust_pkg)%>&nbsp;)
</FONT>
% }
-% } elsif ( $show_contact_link ) {
+% } elsif ( $show_contact_link && ! $opt{no_links} ) {
<FONT SIZE=-1>
(&nbsp;<%pkg_add_contact_link($cust_pkg)%>&nbsp;)
</FONT>
diff --git a/httemplate/view/cust_main/packages/location.html b/httemplate/view/cust_main/packages/location.html
index f2d379841..470fad0f1 100644
--- a/httemplate/view/cust_main/packages/location.html
+++ b/httemplate/view/cust_main/packages/location.html
@@ -32,8 +32,10 @@
% {
<BR>
<FONT SIZE=-1>
- (&nbsp;<%pkg_change_location_link($cust_pkg)%>&nbsp;)
-% if ( $cust_pkg->locationnum ) {
+% unless ( $opt{no_links} ) {
+ (&nbsp;<%pkg_change_location_link($cust_pkg)%>&nbsp;)
+% }
+% if ( $cust_pkg->locationnum && ! $opt{no_links} ) {
(&nbsp;<%edit_location_link($cust_pkg->locationnum)%>&nbsp;)
% }
</FONT>
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index 2267294b3..78d3a885d 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -3,6 +3,10 @@
<TABLE CLASS="inv package">
<TR>
<TD COLSPAN=2>
+ <% $opt{before_pkg_callback}
+ ? &{ $opt{before_pkg_callback} }( $cust_pkg )
+ : ''
+ %>
<A NAME="cust_pkg<% $cust_pkg->pkgnum %>"
ID ="cust_pkg<% $cust_pkg->pkgnum %>"
><% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B></A>
@@ -24,7 +28,7 @@
<TD COLSPAN=2>
<FONT SIZE=-1>
-% unless ( $cust_pkg->get('cancel') ) {
+% unless ( $cust_pkg->get('cancel') || $opt{no_links} ) {
%
% if ( $supplemental or $part_pkg->freq eq '0' ) {
% # Supplemental packages can't be changed independently.
@@ -91,7 +95,7 @@
<TH BGCOLOR="#dddddd" STYLE="border-bottom: dashed 1px black; padding-bottom: 1px">
<FONT SIZE="-1">
<% mt('Invoice details') |h %>
-% if ( $editi && ! $cust_pkg->get('cancel') ) {
+% if ( $editi && ! $cust_pkg->get('cancel') && ! $opt{no_links} ) {
(<& /elements/popup_link.html, {
'action' => $editlink. 'I',
'label' => emt('edit'),
@@ -113,7 +117,7 @@
</TD>
% } else {
<TD>
-% if ( $editi && ! $cust_pkg->get('cancel') ) {
+% if ( $editi && ! $cust_pkg->get('cancel') && ! $opt{no_links} ) {
<FONT SIZE="-1">
(&nbsp;<% include('/elements/popup_link.html', {
'action' => $editlink. 'I',
@@ -135,7 +139,7 @@
<TH BGCOLOR="#dddddd" STYLE="border-bottom: dashed 1px black; padding-bottom: 1px">
<FONT SIZE="-1">
<% mt('Comments') |h %>
-% if ( $editc ) {
+% if ( $editc && ! $opt{no_links} ) {
(<& /elements/popup_link.html, {
'action' => $editlink. 'C',
'label' => emt('edit'),
@@ -157,7 +161,7 @@
</TD>
% } else {
<TD>
-% if ( $editc ) {
+% if ( $editc && ! $opt{no_links} ) {
<FONT SIZE="-1">
(&nbsp;<& /elements/popup_link.html, {
'action' => $editlink. 'C',
@@ -173,10 +177,13 @@
% }
</TR>
-% if ( $curuser->access_right('Change customer package') and
-% !$cust_pkg->get('cancel') and
-% !$supplemental and
-% $part_pkg->freq ne '0' ) {
+% if ( $curuser->access_right('Change customer package')
+% && ! $cust_pkg->get('cancel')
+% && ! $supplemental
+% && $part_pkg->freq ne '0'
+% && ! $opt{no_links}
+% )
+% {
<TR>
% if ( FS::Conf->new->exists('invoice-unitprice') ) {
<TD><FONT SIZE="-1">
diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html
index 391a13b5f..82d06203b 100755
--- a/httemplate/view/cust_main/packages/section.html
+++ b/httemplate/view/cust_main/packages/section.html
@@ -10,8 +10,10 @@
% #$FS::cust_pkg::DEBUG = 2;
% foreach my $cust_pkg (@$packages) {
<& .packagerow, $cust_pkg,
- 'cust_main' => $opt{'cust_main'},
- 'bgcolor' => $opt{'bgcolor'},
+ ( map { $_ => $opt{$_} } qw(
+ cust_main bgcolor
+ no_links before_pkg_callback before_svc_callback after_svc_callback
+ )),
%conf_opt
&>
% }
@@ -92,7 +94,6 @@ my %conf_opt = (
'manage_link_text' => scalar($conf->config('svc_broadband-manage_link_text')),
'manage_link_loc' => scalar($conf->config('svc_broadband-manage_link_loc')),
'manage_link-new_window' => $conf->exists('svc_broadband-manage_link-new_window'),
- 'maestro-status_test' => $conf->exists('maestro-status_test'),
'cust_pkg-large_pkg_size' => scalar($conf->config('cust_pkg-large_pkg_size')),
);
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index c0213e90b..ed360cca4 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -36,7 +36,7 @@
<TR>
<TD COLSPAN=<%$opt{colspan}%>>
<FONT SIZE=-1>
-% if ( $curuser->access_right('Un-cancel customer package') ) {
+% if ( $curuser->access_right('Un-cancel customer package') && ! $opt{no_links} ) {
(&nbsp;<% pkg_uncancel_link($cust_pkg) %>&nbsp;)
% }
<FONT>
@@ -79,7 +79,7 @@
<% pkg_status_row_if( $cust_pkg, emt('Expires'), 'expire', %opt, curuser=>$curuser ) %>
<% pkg_status_row_if( $cust_pkg, emt('Contract ends'), 'contract_end', %opt ) %>
-% if ( !$supplemental ) {
+% if ( !$supplemental && ! $opt{no_links} ) {
<TR>
<TD COLSPAN=<%$opt{colspan}%>>
<FONT SIZE=-1>
@@ -117,7 +117,7 @@
<% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
-% if (!$supplemental) {
+% if ( !$supplemental && ! $opt{no_links} ) {
<TR>
<TD COLSPAN=<%$opt{colspan}%>>
<FONT SIZE=-1>
@@ -210,7 +210,7 @@
<% pkg_status_row_if( $cust_pkg, emt('Expires'), 'expire', %opt, curuser=>$curuser ) %>
<% pkg_status_row_if( $cust_pkg, emt('Contract ends'), 'contract_end', %opt ) %>
-% if ( $part_pkg->freq and !$supplemental ) {
+% if ( $part_pkg->freq and !$supplemental && ! $opt{no_links} ) {
<TR>
<TD COLSPAN=<%$opt{colspan}%>>