X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_export.cgi;h=bbb723dbfac79428a886871fe6dfa174ba32d170;hb=4d77cd40a01ff3526aa92adccca89d305f232eea;hp=beed70887e40bd5c6b1ce8876b3454d34e49e394;hpb=1ad547a47f16b4230762e752fbe48d460ed997e1;p=freeside.git
diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi
index beed70887..bbb723dbf 100755
--- a/httemplate/browse/part_export.cgi
+++ b/httemplate/browse/part_export.cgi
@@ -36,31 +36,87 @@ function part_export_areyousure(href) {
<% $part_export->exportnum %> |
-% if( $part_export->exportname ) {
- <% $part_export->exportname %>:
-% }
- <% $part_export->exporttype %>
- <% $part_export->machine
- ? 'to '. ( $part_export->machine eq '_SVC_MACHINE'
- ? 'per-service hostname'
- : $part_export->machine
- )
- : ''
- %>
+ <% $part_export->label_html %>
(edit | delete)
+% if ( $part_export->no_suspend ) {
+
+ This export will not suspend services.
+
+% }
+% if ( my @actions = $part_export->actions ) {
+
+ Management:
+% while (@actions) {
+% my $label = shift @actions;
+% my $path = shift @actions;
+ <& /elements/popup_link.html,
+ 'label' => $label,
+ 'action' => $fsurl.$path.'?'.$part_export->exportnum,
+ 'actionlabel' => $label,
+ &><% @actions ? ' | ' : '' %>
+% }
+
+% } #if @actions
+
|
<% itable() %>
% my %opt = $part_export->options;
-% foreach my $opt ( keys %opt ) {
+% my $defs = $part_export->info->{options};
+% my %multiples;
+% foreach my $optname (keys %$defs) { # is a Tie::IxHash
+% my $def = $defs->{$optname};
+% my $group = $def->{multiple};
+% if ( $group ) {
+% my @values = split("\n", $opt{$optname});
+% $multiples{$group} ||= [];
+% push @{ $multiples{$group} }, [ $def->{label} || $optname, @values ] if @values;
+% delete $opt{$optname};
+% } elsif (length($opt{$optname})) { # the normal case
+% my $value = $opt{$optname};
+% if ( $def->{option_labels} ) {
+% $value = $def->{option_labels}->{$value} || $value;
+% }
+ |
+ <% $optname %>: |
+ <% encode_entities($value) %> |
+
+% delete $opt{$optname};
+% }
+% }
+% # 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
+