X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_device.html;h=146070fd98dc6a186d566f3446cb60dd504be2f6;hb=d6741df87df9e3352d7ae47a02d0e3f46154fef9;hp=4f2fe93b4eb256c1de55de53b2e3400ae74df99d;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/httemplate/edit/part_device.html b/httemplate/edit/part_device.html index 4f2fe93b4..146070fd9 100644 --- a/httemplate/edit/part_device.html +++ b/httemplate/edit/part_device.html @@ -6,6 +6,7 @@ 'devicename' => 'Device name', }, 'viewall_dir' => 'browse', + 'html_bottom' => $html_bottom_sub, ) %> <%init> @@ -13,4 +14,32 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my $extra_sql = + join( ' OR ', map { "exporttype = '$_'" } + keys %{FS::part_export::export_info('part_device')} + ); +$extra_sql = $extra_sql ? " WHERE ( $extra_sql ) " : " WHERE 0 = 1 "; + +my $html_bottom_sub = sub { + my $part_device = shift; + + '
'. + 'Exports
'. + + ''. + '
'. + include( '/elements/checkboxes-table.html', + 'source_obj' => $part_device, + 'link_table' => 'export_device', + 'target_table' => 'part_export', + 'extra_sql' => $extra_sql, + 'name_callback' => sub { my $o = shift; + $o->exporttype. ' to '. $o->machine; + }, + ). + '
'; + +}; + +