optimize CDR rating after timed rate perf regression, RT#15739
[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'      => [ '#', 'Device type', 'Inventory Class', ],
12                  'fields'      => [ 'devicepart',
13                                     'devicename',
14                                     sub {
15                                         my $part_device = shift;
16                                         my $inventory_class = $part_device->inventory_class;
17                                         return $inventory_class->classname 
18                                             if $inventory_class;
19                                         '';
20                                     },
21                                   ],
22                  'links'       => [ $link,
23                                     $link,
24                                     '',
25                                   ],
26              )
27 %>
28 <%init>
29
30 die "access denied"
31   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
32
33 my $link = [ "${p}edit/part_device.html?", 'devicepart' ];
34
35 </%init>