[Rt-commit] rt branch, admin_collections_formats, updated. rt-3.8.7-165-gf176f4f

Ruslan Zakirov ruz at bestpractical.com
Tue Mar 16 14:24:41 EDT 2010


The branch, admin_collections_formats has been updated
       via  f176f4ff5eb4ee1ec41f956a29566d79a8848794 (commit)
      from  cbf4d082c62406d71b19d40c83a3c7daae5f3dcf (commit)

Summary of changes:
 share/html/Elements/RT__Queue/ColumnMap |   54 ++++++++++++------------------
 1 files changed, 22 insertions(+), 32 deletions(-)

- Log -----------------------------------------------------------------
commit f176f4ff5eb4ee1ec41f956a29566d79a8848794
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Mar 16 21:24:08 2010 +0300

    more columns in queues' map

diff --git a/share/html/Elements/RT__Queue/ColumnMap b/share/html/Elements/RT__Queue/ColumnMap
index 5c56004..f44ab32 100644
--- a/share/html/Elements/RT__Queue/ColumnMap
+++ b/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 );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list