1 <% include( 'elements/edit.html',
2 'name' => 'Phone device type',
3 'table' => 'part_device',
5 'devicepart' => 'Part number',
6 'devicename' => 'Device name',
8 'viewall_dir' => 'browse',
9 'html_bottom' => $html_bottom_sub,
15 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
18 join( ' OR ', map { "exporttype = '$_'" }
19 keys %{FS::part_export::export_info('part_device')}
21 $extra_sql = $extra_sql ? " WHERE ( $extra_sql ) " : " WHERE 0 = 1 ";
23 my $html_bottom_sub = sub {
24 my $part_device = shift;
27 '<FONT SIZE="+1">Exports</FONT><BR>'.
29 '<TABLE BGCOLOR="#cccccc" WIDTH=100%>'.
31 include( '/elements/checkboxes-table.html',
32 'source_obj' => $part_device,
33 'link_table' => 'export_device',
34 'target_table' => 'part_export',
35 'extra_sql' => $extra_sql,
36 'name_callback' => sub { my $o = shift;
37 $o->exporttype. ' to '. $o->machine;