diff options
Diffstat (limited to 'rt/share/html/Elements/RT__Queue/ColumnMap')
-rw-r--r-- | rt/share/html/Elements/RT__Queue/ColumnMap | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/rt/share/html/Elements/RT__Queue/ColumnMap b/rt/share/html/Elements/RT__Queue/ColumnMap index 5c56004..f44ab32 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() }, + }, +} + </%ONCE> <%INIT> $m->callback( COLUMN_MAP => $COLUMN_MAP, CallbackName => 'ColumnMap', CallbackOnce => 1 ); |