diff options
author | ivan <ivan> | 2004-03-22 10:16:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-22 10:16:43 +0000 |
commit | 351b0af13ba6c449151c1bec2303294051c073d1 (patch) | |
tree | a406faa651e90a9beab090ed5248bab020a33ac9 /httemplate/view | |
parent | 5a5242465520ef7a64a715496c31a3c17c95cc57 (diff) |
yay! remove package view entirely (closes: Bug#569)
Diffstat (limited to 'httemplate/view')
-rwxr-xr-x | httemplate/view/cust_main.cgi | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 229362e6c..8d8af63d6 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -20,7 +20,6 @@ print header("Customer View", menubar( <STYLE TYPE="text/css"> .package TH { font-size: medium } .package TR { font-size: smaller } -.package .pkgnum { font-size: medium } .package .provision { font-weight: bold } </STYLE> @@ -382,7 +381,7 @@ if ( @$packages ) { %> <TABLE CLASS="package" BORDER=1 CELLSPACING=0 CELLPADDING=2 BORDERCOLOR="#999999"> <TR> - <TH COLSPAN=2>Package</TH> + <TH>Package</TH> <TH>Status</TH> <TH COLSPAN=2>Services</TH> </TR> @@ -402,9 +401,9 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) { %> <!--pkgnum: <%=$pkg->{pkgnum}%>--> <TR> - <TD ROWSPAN=<%=$rowspan%> CLASS="pkgnum"><%=$pkg->{pkgnum}%></TD> <TD ROWSPAN=<%=$rowspan%>> - <%=$pkg->{pkg}%> - <%=$pkg->{comment}%> ( <%=pkg_details_link($pkg)%> )<BR> + <%=$pkg->{pkgnum}%>: + <%=$pkg->{pkg}%> - <%=$pkg->{comment}%><BR> <% unless ($pkg->{cancel}) { %> ( <%=pkg_change_link($pkg)%> ) ( <%=pkg_dates_link($pkg)%> | <%=pkg_customize_link($pkg,$custnum)%> ) @@ -538,7 +537,7 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) { } if ($svcpart->{count} < $svcpart->{quantity}) { print qq!<TR>\n! if ($cnt > 0); - print qq! <TD COLSPAN=2>!.svc_provision_link($pkg,$svcpart).qq!</TD>\n</TR>\n!; + print qq! <TD COLSPAN=2>!.svc_provision_link($pkg, $svcpart, $conf).qq!</TD>\n</TR>\n!; } } } @@ -946,13 +945,21 @@ sub svc_label_link { } sub svc_provision_link { - my ($pkg, $svcpart) = (shift,shift) or return ''; + my ($pkg, $svcpart, $conf) = @_; ( my $svc_nbsp = $svcpart->{svc} ) =~ s/\s+/ /g; - return qq!<A CLASS="provision" HREF="${p}edit/$svcpart->{svcdb}.cgi?! . - qq!pkgnum$pkg->{pkgnum}-svcpart$svcpart->{svcpart}">! . - "Provision $svc_nbsp (". - ($svcpart->{quantity} - $svcpart->{count}). - ')</A>'; + my $pkgnum_svcpart = "pkgnum$pkg->{pkgnum}-svcpart$svcpart->{svcpart}"; + my $num_left = $svcpart->{quantity} - $svcpart->{count}; + + my $link = qq!<A CLASS="provision" HREF="${p}edit/$svcpart->{svcdb}.cgi?!. + qq!$pkgnum_svcpart">!. + "Provision $svc_nbsp ($num_left)</A>"; + if ( $conf->exists('legacy_link') ) { + $link .= '<BR>'. + qq!<A CLASS="provision" HREF="${p}misc/link.cgi?!. + qq!$pkgnum_svcpart">!. + "Link to legacy $svc_nbsp ($num_left)</A>"; + } + $link; } sub svc_unprovision_link { @@ -983,10 +990,10 @@ sub pkg_datestr { $strip; } -sub pkg_details_link { - my $pkg = shift or return ''; - return qq!<a href="${p}view/cust_pkg.cgi?$pkg->{pkgnum}">Details</a>!; -} +#sub pkg_details_link { +# my $pkg = shift or return ''; +# return qq!<a href="${p}view/cust_pkg.cgi?$pkg->{pkgnum}">Details</a>!; +#} sub pkg_change_link { my $pkg = shift or return ''; @@ -1005,7 +1012,8 @@ sub pkg_unsuspend_link { sub pkg_cancel_link { my $pkg = shift or return ''; - return qq!<A HREF="javascript:cust_pkg_areyousure('${p}misc/cancel_pkg.cgi?$pkg->{pkgnum}')">Cancel</A>!; + qq!<A HREF="javascript:cust_pkg_areyousure('${p}misc/cancel_pkg.cgi?$pkg->{pkgnum}')">Cancel now</A> | !. + qq!<A HREF="${p}misc/expire_pkg.cgi?$pkg->{pkgnum}">Cancel later</A>!; } sub pkg_dates_link { |