[svn:p5ee] r8033 - p5ee/trunk/App-Repository/lib/App/ValueDomain
[email protected] Thu, 9 Nov 2006 09:46:38 -0800 (PST)
Newsgroups
perl.cvs.p5ee
Message-ID
<[email protected] >
Author: spadkins
Date: Thu Nov 9 09:46:37 2006
New Revision: 8033
Modified:
p5ee/trunk/App-Repository/lib/App/ValueDomain/RepositoryTableColumns.pm
Log:
enable {extra_values}, {extra_labels} for App::ValueDomain::RepositoryTableColumns
Modified: p5ee/trunk/App-Repository/lib/App/ValueDomain/RepositoryTableColumns.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/ValueDomain/RepositoryTableColumns.pm (original)
+++ p5ee/trunk/App-Repository/lib/App/ValueDomain/RepositoryTableColumns.pm Thu Nov 9 09:46:37 2006
@@ -93,6 +93,25 @@
}
}
$values = \@values;
+ if ($self->{extra_values}) {
+ my $key;
+ my @each = @$values;
+ my $extra_values = $self->{extra_values};
+ my $extra_labels = $self->{extra_labels} || {};
+
+ for (my $i = $#$extra_values; $i >= 0; $i--) {
+ if ($extra_values->[$i] eq "EACH") {
+ $key = join(",", @each) || -99999;
+ unshift(@$values, $key);
+ $labels->{$key} = $extra_labels->{EACH};
+ }
+ else {
+ $key = $extra_values->[$i];
+ unshift(@$values, $key);
+ $labels->{$key} = $extra_labels->{$key};
+ }
+ }
+ }
}
$self->{values} = $values;
$self->{labels} = $labels;