X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fbrowse%2Fpart_export.cgi;h=91238a0fd2de4d381716f0e86cc059874f324c87;hb=c2e126583354b58ef54ffa7f580b115b8eed1dd3;hp=8e28f4fc685c668ae7a86d0cef215cba6855dc4f;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git
diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi
index 8e28f4fc6..91238a0fd 100755
--- a/httemplate/browse/part_export.cgi
+++ b/httemplate/browse/part_export.cgi
@@ -36,22 +36,63 @@ function part_export_areyousure(href) {
<% $part_export->exportnum %> |
-% if( $part_export->exportname ) {
- <% $part_export->exportname %>:
-% }
-<% $part_export->exporttype %> to <% $part_export->machine %> (edit | delete) |
+ <% $part_export->label_html %>
+ (edit | delete)
+
<% itable() %>
% my %opt = $part_export->options;
-% foreach my $opt ( keys %opt ) {
+% 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
+