enable CardFortress in test database, #71513
[freeside.git] / httemplate / browse / part_device.html
1 <% include( 'elements/browse.html',
2                  'title'       => 'Phone device types',
3                  'name'        => 'phone device types',
4                  'menubar'     => [ 'Add a new device type' =>
5                                       $p.'edit/part_device.html',
6                                     'Import device types' =>
7                                       $p.'misc/part_device-import.html',
8                                   ],
9                  'query'       => { 'table' => 'part_device', },
10                  'count_query' => 'SELECT COUNT(*) FROM part_device',
11                  'header'      => [ '#',
12                                     'Device type',
13                                     'Inventory Class',
14                                     'External name', ],
15                  'fields'      => [ 'devicepart',
16                                     'devicename',
17                                     sub {
18                                         my $part_device = shift;
19                                         my $inventory_class = $part_device->inventory_class;
20                                         return $inventory_class->classname 
21                                             if $inventory_class;
22                                         '';
23                                     },
24                                     'title',
25                                   ],
26                  'links'       => [ $link,
27                                     $link,
28                                     '',
29                                     '',
30                                   ],
31              )
32 %>
33 <%init>
34
35 die "access denied"
36   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
37
38 my $link = [ "${p}edit/part_device.html?", 'devicepart' ];
39
40 </%init>