1 <% include('elements/browse.html',
3 'menubar' => [ @menubar ],
4 'name_singular' => 'router',
5 'query' => { 'table' => 'router',
7 'extra_sql' => $extra_sql,
9 'count_query' => "SELECT count(*) from router $count_sql",
10 'header' => [ 'Router name',
15 'fields' => [ 'routername',
16 sub { join( '<BR>', map { $_->NetAddr }
20 sub { shift->manual_addr ? 'Manual' : 'Automatic' },
23 'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ],
26 [ "${p}misc/delete-router.html?", 'routernum' ],
29 'agent_null_right'=> "Broadband global configuration",
36 unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
37 || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
42 my @menubar = ( 'Add a new router', "${p2}edit/router.cgi" );
44 if ($cgi->param('hidecustomerrouters') eq '1') {
45 $extra_sql = 'WHERE svcnum > 0';
46 $cgi->delete('hidecustomerrouters');
47 push @menubar, 'Show customer routers', $cgi->self_url();
48 $cgi->param('hidecustomerrouters', 1);
50 $cgi->param('hidecustomerrouters', 1);
51 push @menubar, 'Hide customer routers', $cgi->self_url();
52 $cgi->delete('hidecustomerrouters');
55 my $count_sql = $extra_sql. ( $extra_sql =~ /WHERE/ ? ' AND' : 'WHERE' ).
56 $FS::CurrentUser::CurrentUser->agentnums_sql(
57 'null_right' => 'Broadband global configuration',