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',
14 'fields' => [ 'routername',
15 sub { join( '<BR>', map { $_->NetAddr }
21 'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ],
23 [ "${p}misc/delete-router.html?", 'routernum' ],
26 'agent_null_right'=> "Broadband global configuration",
33 unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
34 || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
39 my @menubar = ( 'Add a new router', "${p2}edit/router.cgi" );
41 if ($cgi->param('hidecustomerrouters') eq '1') {
42 $extra_sql = 'WHERE svcnum > 0';
43 $cgi->param('hidecustomerrouters', 0);
44 push @menubar, 'Show customer routers', $cgi->self_url();
46 $cgi->param('hidecustomerrouters', 1);
47 push @menubar, 'Hide customer routers', $cgi->self_url();
50 my $count_sql = $extra_sql. ( $extra_sql =~ /WHERE/ ? ' AND' : 'WHERE' ).
51 $FS::CurrentUser::CurrentUser->agentnums_sql(
52 'null_right' => 'Broadband global configuration',