X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Faddr_block.cgi;h=46b12e65f155de0525c49cc798c857dfbb16874f;hb=b79a8cb932946c849328a3c117c35821d9d21e66;hp=241bb937ff36f5593e25b02cfb39325129eb3c07;hpb=4b5d4c82766ef1869d03df63fa1e2f0dd050cb6a;p=freeside.git
diff --git a/httemplate/browse/addr_block.cgi b/httemplate/browse/addr_block.cgi
index 241bb937f..46b12e65f 100644
--- a/httemplate/browse/addr_block.cgi
+++ b/httemplate/browse/addr_block.cgi
@@ -14,6 +14,7 @@
'Action(s)',
'',
'',
+ '',
],
'fields' => [ 'NetAddr',
sub { my $block = shift;
@@ -28,22 +29,37 @@
$allocate_text,
sub { shift->router ? '' : '(split)' },
sub { '('. (shift->manual_flag ? 'allow' : 'prevent'). ' automatic ip assignment)' },
+ sub {
+ my $block = shift;
+ if(!$block->router && scalar($block->svc_broadband) == 0) {
+ return '(delete)';
+ }
+ '';
+ },
],
'links' => [ '',
'',
[ 'javascript:void(0)', '' ],
$split_link,
$autoassign_link,
+ sub {
+ my $block = shift;
+ if(!$block->router && scalar($block->svc_broadband) == 0) {
+ [ "${p}misc/delete-addr_block.html?", 'blocknum' ];
+ }
+ },
],
'link_onclicks' => [ '',
'',
$allocate_link,
'',
+ '',
],
'cell_styles' => [ '',
'',
'border-right:none;',
'border-left:none;',
+ '',
],
'agent_virt' => 1,
'agent_null_right' => 'Broadband global configuration',
@@ -92,8 +108,7 @@ my $html_foot = qq(
/
);
$html_foot .= include( '/elements/select-agent.html',
- 'agent_virt' => 1,
- 'agent_null_right' => 'Broadband global configuration',
+ 'agent_null_right' => 'Broadband global configuration',
);
$html_foot .= qq(