summaryrefslogtreecommitdiff
path: root/httemplate/browse/nas.html
blob: 5ce729b65750e88ccab78a83a751daa28538be3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<& elements/browse.html,
     'title'              => 'RADIUS clients',
     'name_singular'      => 'RADIUS client',
     'query'              => { 'table' => 'nas', },
     'count_query'        => 'SELECT COUNT(*) FROM nas',
     'header'             => [ 'Hostname', 'Short name', #'Shared secret',
                               'Type', 'Ports', 'Server', 'Community',
                               'Description',
                             ],
     'fields'             => [ 'nasname',
                               'shortname',
                               #'secret',
                               'type',
                               'ports',
                               'server',
                               'community',
                               'description',
                             ],
     'links'               => [ $link, $link ],
     'align'               => 'lllrlll',
     'add_link'            => 1,
     #'disableable'        => 1,
     #'disabled_statuspos' => 2,
     #All options from /search/elements/search.html are available.
&>
<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my $link = sub {
  my $nas = shift;
  if ( $nas->svcnum ) {
    return [ $p.'view/svc_broadband.cgi?', 'svcnum' ];
  }
  else {
    return [ $p.'edit/nas.html?', 'nasnum' ];
  }
};

</%init>