diff options
author | ivan <ivan> | 2001-12-27 09:26:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-12-27 09:26:14 +0000 |
commit | cf16b23820da69e3c8d0156ae27e21c635bf1ec5 (patch) | |
tree | 3aaac010a7741957247151074be000f3e8247129 /httemplate/browse/part_svc.cgi | |
parent | fee9bc7edcdd27e7a4e47bc313d05c66cd900073 (diff) |
service and package disable!
Diffstat (limited to 'httemplate/browse/part_svc.cgi')
-rwxr-xr-x | httemplate/browse/part_svc.cgi | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi index 8a564ba9a..da523ca51 100755 --- a/httemplate/browse/part_svc.cgi +++ b/httemplate/browse/part_svc.cgi @@ -1,10 +1,30 @@ -<!-- $Id: part_svc.cgi,v 1.5 2001-09-11 00:08:18 ivan Exp $ --> +<!-- $Id: part_svc.cgi,v 1.6 2001-12-27 09:26:14 ivan Exp $ --> +<% + +my %search; +if ( $cgi->param('showdisabled') ) { + %search = (); +} else { + %search = ( 'disabled' => '' ); +} + +my @part_svc = qsearch('part_svc', \%search ); +my $total = scalar(@part_svc); + +%> <%= header('Service Definition Listing', menubar( 'Main Menu' => $p) ) %> Services are items you offer to your customers.<BR><BR> +<%= $total %> services +<%= $cgi->param('showdisabled') + ? do { $cgi->param('showdisabled', 0); + '( <a href="'. $cgi->self_url. '">hide disabled services</a> )'; } + : do { $cgi->param('showdisabled', 1); + '( <a href="'. $cgi->self_url. '">show disabled services</a> )'; } +%> <TABLE BORDER=1> <TR> - <TH COLSPAN=2>Service</TH> + <TH COLSPAN=<%= $cgi->param('showdisabled') ? 2 : 3 %>>Service</TH> <TH>Table</TH> <TH>Field</TH> <TH COLSPAN=2>Modifier</TH> @@ -12,7 +32,7 @@ <% foreach my $part_svc ( sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') - } qsearch('part_svc',{}) ) { + } @part_svc ) { my($hashref)=$part_svc->hashref; my($svcdb)=$hashref->{svcdb}; my @fields = @@ -26,6 +46,10 @@ <TR> <TD ROWSPAN=<%= $rowspan %>><A HREF="<%= $url %>"> <%= $hashref->{svcpart} %></A></TD> +<% unless ( $cgi->param('showdisabled') ) { %> + <TD ROWSPAN=<%= $rowspan %>> + <%= $hashref->{disabled} ? 'DISABLED' : '' %></TD> +<% } %> <TD ROWSPAN=<%= $rowspan %>><A HREF="<%= $url %>"> <%= $hashref->{svc} %></A></TD> <TD ROWSPAN=<%= $rowspan %>> |