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 = [EMAIL PROTECTED];
+        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;

Reply via email to