% include("/elements/header.html", "Export Listing") %>
Provisioning services to external machines, databases and APIs.
Add a new export
<% include('/elements/table-grid.html') %>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
Export |
Options |
% foreach my $part_export ( sort {
% $a->getfield('exportnum') <=> $b->getfield('exportnum')
% } qsearch('part_export',{})
% ) {
% if ( $bgcolor eq $bgcolor1 ) {
% $bgcolor = $bgcolor2;
% } else {
% $bgcolor = $bgcolor1;
% }
<% $part_export->exportnum %> |
% if( $part_export->exportname ) {
<% $part_export->exportname %>:
% }
<% $part_export->exporttype %> to <% $part_export->machine %> (edit | delete) |
<% itable() %>
% my %opt = $part_export->options;
% my $defs = $part_export->info->{options};
% my %multiples;
% foreach my $opt (keys %$defs) { # is a Tie::IxHash
% my $group = $defs->{$opt}->{multiple};
% if ( $group ) {
% my @values = split("\n", $opt{$opt});
% $multiples{$group} ||= [];
% push @{ $multiples{$group} }, [ $opt, @values ] if @values;
% delete $opt{$opt};
% } elsif (length($opt{$opt})) { # the normal case
%# foreach my $opt ( keys %opt ) {
|
<% $opt %>: |
<% encode_entities($opt{$opt}) %> |
% delete $opt{$opt};
% }
% }
% # now any that are somehow not in the options list
% foreach my $opt (keys %opt) {
% if ( length($opt{$opt}) ) {
<% $opt %>: |
<% encode_entities($opt{$opt}) %> |
% }
% }
% # now show any multiple-option groups
% foreach (sort keys %multiples) {
% my $set = $multiples{$_};
% foreach my $col (@$set) {
<% shift @$col %> |
% }
% while ( 1 ) {
% my $end = 1;
% foreach my $col (@$set) {
<% shift @$col %> |
% $end = 0 if @$col;
% }
% last if $end;
% }
|
% } #foreach keys %multiples
% }
<% include('/elements/footer.html') %>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
%init>