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 ";
25 my $html_bottom_sub = sub {
26 my $part_device = shift;
29 '<FONT SIZE="+1">Exports</FONT><BR>'.
31 '<TABLE BGCOLOR="#cccccc" WIDTH=100%>'.
33 include( '/elements/checkboxes-table.html',
34 'source_obj' => $part_device,
35 'link_table' => 'export_device',
36 'target_table' => 'part_export',
37 'extra_sql' => $extra_sql,
38 'name_callback' => sub { my $o = shift;
39 $o->exporttype. ' to '. $o->machine;