%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
\'<a href="',
$_->$mode_uri->Resolver->HREF,
\'">',
- ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ),
+ ( $_->$mode_uri->IsLocal && $_->$local_type ? $_->$local_type : $_->$mode_uri->Resolver->AsString ),
\'</a><br />',
} @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef }
}
}
}
},
+ WillResolveRelative => {
+ title => 'Will Resolve',
+ attribute => 'WillResolve',
+ value => sub { return $_[0]->WillResolveObj->AgeAsString },
+ },
ResolvedRelative => {
title => 'Resolved', # loc
attribute => 'Resolved',
Starts => {
title => 'Starts', # loc
attribute => 'Starts',
- date => sub { return $_[0]->StartsObj },
- value => sub { return $_[0]->StartsObj->AsString }
+ value => sub { return $_[0]->StartsObj }
},
Started => {
title => 'Started', # loc
attribute => 'Started',
- date => sub { return $_[0]->StartedObj },
- value => sub { return $_[0]->StartedObj->AsString }
+ value => sub { return $_[0]->StartedObj },
},
Told => {
title => 'Told', # loc
attribute => 'Told',
- date => sub { return $_[0]->ToldObj },
- value => sub { return $_[0]->ToldObj->AsString }
+ value => sub { return $_[0]->ToldObj },
},
Due => {
title => 'Due', # loc
attribute => 'Due',
- date => sub { return $_[0]->DueObj },
- value => sub { return $_[0]->DueObj->AsString }
+ value => sub { return $_[0]->DueObj },
+ },
+ WillResolve => {
+ title => 'Will Resolve',
+ attribute => 'WillResolve',
+ value => sub { return $_[0]->WillResolveObj },
},
Resolved => {
title => 'Resolved', # loc
attribute => 'Resolved',
- date => sub { return $_[0]->ResolvedObj },
- value => sub { return $_[0]->ResolvedObj->AsString }
+ value => sub { return $_[0]->ResolvedObj }
},
UpdateStatus => {
title => 'New messages', # loc
{
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;
return \$bookmark;
},
},
-
- Customer => {
- title => 'Customer', #loc
- attribute => 'Customer.Number', #title/attribute/name... what does it all mean?
- value => sub {
- my $Ticket = shift;
- my @return = ();
- foreach my $c (ticket_cust_resolvers($Ticket)) {
- push @return, \'<A HREF="', $c->HREF, \'">',
- $c->AsString,
- \'</A>',
- \'<BR>';
- }
- pop @return;
- @return;
- },
- },
- # For future reference:
- # hash key = name of the column in the format string
- # (see /Search/Elements/BuildFormatString)
- # title = displayed name in the table header
- # attribute = the field to ORDER BY when sorting on this column
- Agent => {
- title => 'Agent',
- attribute => 'Customer.Agent',
- value => sub {
- my $Ticket = shift;
- my @return = ();
- foreach my $c (ticket_cust_resolvers($Ticket)) {
- push @return, $c->AgentName, \'<BR>';
- }
- pop @return;
- @return;
- },
- },
- CustomerClass => {
- title => 'Class',
- attribute => 'Customer.Class',
- value => sub {
- my $Ticket = shift;
- my @return = ();
- foreach my $c (ticket_cust_resolvers($Ticket)) {
- push @return, $c->CustomerClass, \'<BR>';
- }
- pop @return;
- @return;
- },
- },
- CustomerTags => {
- title => '',
- attribute => '',
- value => sub {
- my $Ticket = shift;
- my @return = ();
- foreach my $c (ticket_cust_resolvers($Ticket)) {
- my @tags = sort { $a->{'name'} cmp $b->{'name'} }
- $c->CustomerTags;
- foreach my $t (@tags) {
- push @return, \'<SPAN style="background-color:#',
- $t->{'color'},
- \';"> ',
- $t->{'name'},
- \' </SPAN>',
- \' '
- ;
- }
- pop @return;
- push @return, \'<BR>';
- }
- pop @return;
- @return;
- },
- },
+
+ #freeside
+ $m->comp('/Elements/CustomerFields', 'ColumnMap'),
+ $m->comp('/Elements/ServiceFields', 'ColumnMap'),
};
-sub ticket_cust_resolvers {
- my $Ticket = shift;
- my @Customers = @{ $Ticket->Customers->ItemsArrayRef };
- return map $_->TargetURI->Resolver, @Customers;
-}
-
# if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular
# versions
if (RT->Config->Get('GnuPG')->{'Enable'}) {