summaryrefslogtreecommitdiff
path: root/httemplate/browse/torrus_srvderive.html
blob: 92cbb692895586225ff8a4eeec9f24e6ed2fcd3b (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
<% include( 'elements/browse.html',
              'title'          => 'Virtual network ports',
              'name_singular'  => 'port',
              'menubar'        => [ 'Add a new virtual port' =>
                                      $p.'edit/torrus_srvderive.html',
                                  ],
              'query'          => { 'table' => 'torrus_srvderive' },
              'count_query'    => 'SELECT COUNT(*) FROM torrus_srvderive',
              'header'         => [ 'Virtual Port', 'Components', ],
              'fields'         => [ 'serviceid', $components_sub, ],
              'links'          => [ $link, '', ],
          )
%>
<%init>

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

my $link = [ $p.'edit/torrus_srvderive.html?', 'derivenum' ];

my $components_sub = sub {
  my $torrus_srvderive = shift;
  join('<BR>', $torrus_srvderive->component_serviceids);
};

</%init>