[freeside-commits] freeside/httemplate/browse router.cgi, 1.14, 1.15 addr_block.cgi, 1.12, 1.13
Erik Levinson
levinse at wavetail.420.am
Wed Jun 22 16:39:38 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv17439/httemplate/browse
Modified Files:
router.cgi addr_block.cgi
Log Message:
add router and addr_block delete features, RT13197
Index: router.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/router.cgi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -d -r1.14 -r1.15
--- router.cgi 3 Sep 2008 19:08:28 -0000 1.14
+++ router.cgi 22 Jun 2011 23:39:36 -0000 1.15
@@ -9,15 +9,18 @@
'count_query' => "SELECT count(*) from router $count_sql",
'header' => [ 'Router name',
'Address block(s)',
+ 'Action',
],
'fields' => [ 'routername',
sub { join( '<BR>', map { $_->NetAddr }
shift->addr_block
);
},
+ sub { 'Delete' },
],
'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ],
'',
+ [ "${p}misc/delete-router.html?", 'routernum' ],
],
'agent_virt' => 1,
'agent_null_right'=> "Broadband global configuration",
Index: addr_block.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/addr_block.cgi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- addr_block.cgi 14 Feb 2009 00:41:24 -0000 1.12
+++ addr_block.cgi 22 Jun 2011 23:39:36 -0000 1.13
@@ -14,6 +14,7 @@
'Action(s)',
'',
'',
+ '',
],
'fields' => [ 'NetAddr',
sub { my $block = shift;
@@ -28,22 +29,37 @@
$allocate_text,
sub { shift->router ? '' : '<FONT SIZE="-2">(split)</FONT>' },
sub { '<FONT SIZE="-2">('. (shift->manual_flag ? 'allow' : 'prevent'). ' automatic ip assignment)</FONT>' },
+ sub {
+ my $block = shift;
+ if(!$block->router && scalar($block->svc_broadband) == 0) {
+ return '<FONT SIZE="-2">(delete)</FONT>';
+ }
+ '';
+ },
],
'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',
@@ -142,4 +158,7 @@
[ "$url;blocknum=", 'blocknum' ];
};
+my $delete_link = sub {
+};
+
</%init>
More information about the freeside-commits
mailing list