Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / share / html / Elements / RT__Ticket / ColumnMap
index 7efc4b4..787862d 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -220,26 +220,31 @@ $COLUMN_MAP = {
     Starts => {
         title     => 'Starts', # loc
         attribute => 'Starts',
+        date      => sub { return $_[0]->StartsObj },
         value     => sub { return $_[0]->StartsObj->AsString }
     },
     Started => {
         title     => 'Started', # loc
         attribute => 'Started',
+        date      => sub { return $_[0]->StartedObj },
         value     => sub { return $_[0]->StartedObj->AsString }
     },
     Told => {
         title     => 'Told', # loc
         attribute => 'Told',
+        date      => sub { return $_[0]->ToldObj },
         value     => sub { return $_[0]->ToldObj->AsString }
     },
     Due => {
         title     => 'Due', # loc
         attribute => 'Due',
+        date      => sub { return $_[0]->DueObj },
         value     => sub { return $_[0]->DueObj->AsString }
     },
     Resolved => {
         title     => 'Resolved', # loc
         attribute => 'Resolved',
+        date      => sub { return $_[0]->ResolvedObj },
         value     => sub { return $_[0]->ResolvedObj->AsString }
     },
     UpdateStatus => {
@@ -261,10 +266,10 @@ $COLUMN_MAP = {
             {
                 my %key = RT::Crypt::GnuPG::GetKeyInfo($email);
                 if (!defined $key{'info'}) {
-                    $email .= loc(" (no pubkey!)");
+                    $email .= ' ' . loc("(no pubkey!)");
                 }
                 elsif ($key{'info'}{'TrustLevel'} == 0) {
-                    $email .= loc(" (untrusted!)");
+                    $email .= ' ' . loc("(untrusted!)");
                 }
             }
             return join ', ', @requestors;
@@ -313,25 +318,10 @@ $COLUMN_MAP = {
             return \$bookmark;
         },
     },
-
-    Customer => {
-        title     => 'Customer', #loc
-        attribute => 'Customer', #title/attribute/name... what does it all mean?
-        value     => sub {
-          my $Ticket = shift;
-          my @Customers = @{ $Ticket->Customers->ItemsArrayRef };
-          my @CustResolvers = map $_->TargetURI->Resolver, @Customers;
-          my @return = ();
-          for ( 0 .. $#CustResolvers ) {
-            my $c = @CustResolvers[$_];
-            push @return, \'<A HREF="', $c->HREF, \'">', $c->AsString, \'</A>';
-            push @return, \'<BR>' if scalar(@CustResolvers) > 1
-                                  && $_ != $#CustResolvers;
-          }
-          @return;
-        },
-    },
-
+    
+    #freeside
+    $m->comp('/Elements/CustomerFields', 'ColumnMap'),
+    $m->comp('/Elements/ServiceFields', 'ColumnMap'),
 };
 
 # if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular