X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Frouter.cgi;h=541e967ddf34ef2b6cebe1fdcaf83b7df4792139;hb=bf4223e554e0eb72f45f82392442780e8af4e0f9;hp=6dcd93a71971bd3b45d529aa0d03f05757f05e73;hpb=15777da47bab33e8f0021e6dd9aa6b434fa9be30;p=freeside.git
diff --git a/httemplate/browse/router.cgi b/httemplate/browse/router.cgi
index 6dcd93a71..541e967dd 100644
--- a/httemplate/browse/router.cgi
+++ b/httemplate/browse/router.cgi
@@ -1,64 +1,52 @@
-<% include("/elements/header.html",'Routers', menubar('Main Menu' => $p)) %>
-%
-%
-%my @router = qsearch('router', {});
-%my $p2 = popurl(2);
-%
-%
-% if ($cgi->param('error')) {
-
- Error: <%$cgi->param('error')%>
-
-% }
-%
-%my $hidecustomerrouters = 0;
-%my $hideurl = '';
-%if ($cgi->param('hidecustomerrouters') eq '1') {
-% $hidecustomerrouters = 1;
-% $cgi->param('hidecustomerrouters', 0);
-% $hideurl = 'Show customer routers';
-%} else {
-% $hidecustomerrouters = 0;
-% $cgi->param('hidecustomerrouters', 1);
-% $hideurl = 'Hide customer routers';
-%}
-%
-
+<% include('elements/browse.html',
+ 'title' => 'Routers',
+ 'menubar' => [ @menubar ],
+ 'name_singular' => 'router',
+ 'query' => { 'table' => 'router',
+ 'hashref' => {},
+ 'extra_sql' => $extra_sql,
+ },
+ 'count_query' => "SELECT count(*) from router $count_sql",
+ 'header' => [ 'Router name',
+ 'Address block(s)',
+ ],
+ 'fields' => [ 'routername',
+ sub { join( '
', map { $_->NetAddr }
+ shift->addr_block
+ );
+ },
+ ],
+ 'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ],
+ '',
+ ],
+ 'agent_virt' => 1,
+ 'agent_null_right'=> "Broadband global configuration",
+ 'agent_pos' => 1,
+ )
+%>
+<%init>
-Add a new router | <%$hideurl%>
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
-<%table()%>
-