X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FRT__Queue%2FColumnMap;h=f44ab32c3b532d1ff4b81c5ac3717b9b81742489;hb=e70abd21bab68b23488f7ef1ee2e693a3b365691;hp=5c56004d1694489d3b815eba4add7ec0989585b9;hpb=b4b0c7e72d7eaee2fbfc7022022c9698323203dd;p=freeside.git diff --git a/rt/share/html/Elements/RT__Queue/ColumnMap b/rt/share/html/Elements/RT__Queue/ColumnMap index 5c56004d1..f44ab32c3 100644 --- a/rt/share/html/Elements/RT__Queue/ColumnMap +++ b/rt/share/html/Elements/RT__Queue/ColumnMap @@ -70,43 +70,33 @@ my $COLUMN_MAP = { title => 'Address', # loc value => sub { return ($_[0]->CorrespondAddress||'-') .'/'. ($_[0]->CommentAddress||'-') }, }, - Name => { - title => 'Name', # loc - attribute => 'Name', - value => sub { return $_[0]->Name() }, - }, - Description => { - title => 'Description', # loc - attribute => 'Description', - value => sub { return $_[0]->Description() }, - }, - CorrespondAddress => { - title => 'CorrespondAddress', # loc - attribute => 'CorrespondAddress', - value => sub { return $_[0]->CorrespondAddress() }, - }, - CommentAddress => { - title => 'CommentAddress', # loc - attribute => 'CommentAddress', - value => sub { return $_[0]->CommentAddress() }, - }, - InitialPriority => { - title => 'InitialPriority', # loc - attribute => 'InitialPriority', - value => sub { return $_[0]->InitialPriority() }, + + # SubjectTag is special as we can not sort + SubjectTag => { + title => 'SubjectTag', # loc + value => sub { return $_[0]->SubjectTag }, }, - FinalPriority => { - title => 'FinalPriority', # loc - attribute => 'FinalPriority', - value => sub { return $_[0]->FinalPriority() }, + Sign => { + title => 'Sign', # loc + value => sub { return $_[0]->Sign? $_[0]->loc('yes') : $_[0]->loc('no') }, }, - DefaultDueIn => { - title => 'DefaultDueIn', # loc - attribute => 'DefaultDueIn', - value => sub { return $_[0]->DefaultDueIn() }, + Encrypt => { + title => 'Encrypt', # loc + value => sub { return $_[0]->Encrypt? $_[0]->loc('yes') : $_[0]->loc('no') }, }, }; +foreach my $field (qw( + Name Description CorrespondAddress CommentAddress + InitialPriority FinalPriority DefaultDueIn +)) { + $COLUMN_MAP->{$field} = { + title => $field, + attribute => $field, + value => sub { return $_[0]->$field() }, + }, +} + <%INIT> $m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 );