X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_export.cgi;h=91238a0fd2de4d381716f0e86cc059874f324c87;hb=a72a10f754f7465121d6137bb3dcee0a21ea6443;hp=1cd201360880f368fd6a9d6aa9c7a2ddc8b7c3b7;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git
diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi
index 1cd201360..91238a0fd 100755
--- a/httemplate/browse/part_export.cgi
+++ b/httemplate/browse/part_export.cgi
@@ -35,19 +35,64 @@ function part_export_areyousure(href) {
<% $part_export->exportnum %> |
- <% $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
+