This commit was generated by cvs2svn to compensate for changes in r10640,
[freeside.git] / rt / share / html / Elements / RT__Ticket / ColumnMap
index 7df4710..e848939 100644 (file)
@@ -303,26 +303,6 @@ $COLUMN_MAP = {
         value     => sub { return \('<input type="checkbox" class="checkbox" name="UpdateTicket'.$_[0]->id.'" value="1" checked="checked" />') }
     },
 
-    CustomField => {
-        attribute => sub { return shift @_ },
-        title     => sub { return pop @_ },
-        value     => sub {
-            # Display custom field contents, separated by newlines.
-            # For Image custom fields we also show a thumbnail here.
-
-            my $values = $_[0]->CustomFieldValues( $_[-1] );
-            my @values = map {
-                (
-                    ($_->CustomFieldObj->Type eq 'Image')
-                        ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ ))
-                        : $_->Content
-                ),
-                \'<br />',
-            } @{ $values->ItemsArrayRef };
-            pop @values; # Remove that last <br />
-            return @values;
-        },
-    },
     Bookmark => {
         title => ' ',
         value => sub {
@@ -333,9 +313,26 @@ $COLUMN_MAP = {
             return \$bookmark;
         },
     },
-};
 
-$COLUMN_MAP->{'CF'} = $COLUMN_MAP->{'CustomField'};
+    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;
+        },
+    },
+
+};
 
 # if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular
 # versions