X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Frouter.cgi;h=ef8ad3160e02a99215b6ef22ae2d9b245650e49d;hb=7d34aacffa38c4cac09b54080487a66c264e4668;hp=9d856f67c8b1d9297764f78b7dcf94cea0ce33ca;hpb=2eda79fb265b3acdde85881f1160f6daa73f2d84;p=freeside.git diff --git a/httemplate/browse/router.cgi b/httemplate/browse/router.cgi index 9d856f67c..ef8ad3160 100644 --- a/httemplate/browse/router.cgi +++ b/httemplate/browse/router.cgi @@ -6,25 +6,35 @@ 'hashref' => {}, 'extra_sql' => $extra_sql, }, - 'count_query' => "SELECT count(*) from router $extra_sql", + 'count_query' => "SELECT count(*) from router $count_sql", 'header' => [ 'Router name', 'Address block(s)', + 'IP addressing', + 'Action', ], 'fields' => [ 'routername', sub { join( '
', map { $_->NetAddr } shift->addr_block ); }, + sub { shift->manual_addr ? 'Manual' : 'Automatic' }, + sub { 'Delete' }, ], 'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ], '', + '', + [ "${p}misc/delete-router.html?", 'routernum' ], ], + 'agent_virt' => 1, + 'agent_null_right'=> "Broadband global configuration", + 'agent_pos' => 1, ) %> <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration') + || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration'); my $p2 = popurl(2); my $extra_sql = ''; @@ -40,4 +50,10 @@ if ($cgi->param('hidecustomerrouters') eq '1') { push @menubar, 'Hide customer routers', $cgi->self_url(); } +my $count_sql = $extra_sql. ( $extra_sql =~ /WHERE/ ? ' AND' : 'WHERE' ). + $FS::CurrentUser::CurrentUser->agentnums_sql( + 'null_right' => 'Broadband global configuration', + ); + +