X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_device.html;h=aa626b3797a869929ee1893e3c328738e7e140b2;hp=4f2fe93b4eb256c1de55de53b2e3400ae74df99d;hb=d0221fabd4656b3a04251ca6168cc45f54d23574;hpb=942c8b05b17b119a3dad84d7035c76b481dc5b99 diff --git a/httemplate/edit/part_device.html b/httemplate/edit/part_device.html index 4f2fe93b4..aa626b379 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,33 @@ 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; + }, + ). + '
'. + '
'; + +}; + +