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',
13 'fields' => [ 'routername',
14 sub { join( '<BR>', map { $_->NetAddr }
19 'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ],
23 'agent_null_right'=> "Broadband global configuration",
30 unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
31 || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
36 my @menubar = ( 'Add a new router', "${p2}edit/router.cgi" );
38 if ($cgi->param('hidecustomerrouters') eq '1') {
39 $extra_sql = 'WHERE svcnum > 0';
40 $cgi->param('hidecustomerrouters', 0);
41 push @menubar, 'Show customer routers', $cgi->self_url();
43 $cgi->param('hidecustomerrouters', 1);
44 push @menubar, 'Hide customer routers', $cgi->self_url();
47 my $count_sql = $extra_sql. ( $extra_sql =~ /WHERE/ ? ' AND' : 'WHERE' ).
48 $FS::CurrentUser::CurrentUser->agentnums_sql(
49 'null_right' => 'Broadband global configuration',