[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.6-75-g2620658

Alex Vandiver alexmv at bestpractical.com
Wed Sep 3 14:57:27 EDT 2014


The branch, 4.2-trunk has been updated
       via  2620658dbde62e7b019893c211696e180c50bccc (commit)
       via  f3637f6f4b33418ae018e8486f5dff42cb5a7c3a (commit)
      from  f170ce087f10dba63831b8ae58a7f27de58d6a8e (commit)

Summary of changes:
 etc/RT_Config.pm.in                            | 17 +++++++++++++++++
 share/html/Admin/Articles/Classes/Objects.html |  3 ++-
 share/html/Admin/Articles/Classes/index.html   |  2 ++
 share/html/Admin/CustomFields/Objects.html     |  3 ++-
 share/html/Admin/CustomFields/index.html       |  3 ++-
 share/html/Admin/Elements/EditCustomFields     |  3 ++-
 share/html/Admin/Elements/EditScrips           |  3 ++-
 share/html/Admin/Elements/EditTemplates        |  2 ++
 share/html/Admin/Elements/MembershipsPage      |  5 +++--
 share/html/Admin/Groups/index.html             |  3 ++-
 share/html/Admin/Queues/index.html             |  3 ++-
 share/html/Admin/Scrips/Objects.html           |  3 ++-
 share/html/Admin/Scrips/index.html             |  3 ++-
 share/html/Admin/Users/index.html              |  3 ++-
 14 files changed, 44 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit f3637f6f4b33418ae018e8486f5dff42cb5a7c3a
Author: Christian Loos <cloos at netcologne.de>
Date:   Tue Sep 2 12:31:41 2014 +0200

    add %AdminSearchResultRows config option
    
    This adds a row limit to the Classes and Templates list for the first time.
    
    It also changes the row limit for Groups and Users lists from 100 to 50.
    
    The rows limit for the Membership page for Groups and Users is changed from
    20 to 50. This e.g. helps adding groups to users as it avoids jumping through
    pages if you have many groups.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index bb9bb22..5402c32 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2909,6 +2909,23 @@ Set(%AdminSearchResultFormat,
         .q{,__Description__,__Disabled__},
 );
 
+=item C<%AdminSearchResultRows>
+
+Use C<%AdminSearchResultRows> to define the search result rows in the admin
+interface on a per-RT-class basis.
+
+=cut
+
+Set(%AdminSearchResultRows,
+    Queues       => 50,
+    Groups       => 50,
+    Users        => 50,
+    CustomFields => 50,
+    Scrips       => 50,
+    Templates    => 50,
+    Classes      => 50,
+);
+
 =back
 
 
diff --git a/share/html/Admin/Articles/Classes/Objects.html b/share/html/Admin/Articles/Classes/Objects.html
index 1345e65..8d42ce7 100644
--- a/share/html/Admin/Articles/Classes/Objects.html
+++ b/share/html/Admin/Articles/Classes/Objects.html
@@ -85,7 +85,7 @@
     Order => 'ASC',
     %ARGS,
     Collection => $not_applied,
-    Rows => 50,
+    Rows          => $rows,
     Format        => $format,
     DisplayFormat => "'__CheckBox.{AddClass-". $Class->id ."}__',". $format,
     AllowSorting  => 1,
@@ -143,6 +143,7 @@ $collection_class =~ s/^RT:://;
 
 my $format = RT->Config->Get('AdminSearchResultFormat')->{$collection_class}
     || '__id__,__Name__';
+my $rows = RT->Config->Get('AdminSearchResultRows')->{$collection_class} || 50;
 
 my $title = loc('Modify associated objects for [_1]', $Class->Name);
 
diff --git a/share/html/Admin/Articles/Classes/index.html b/share/html/Admin/Articles/Classes/index.html
index 78b8803..ddf0736 100644
--- a/share/html/Admin/Articles/Classes/index.html
+++ b/share/html/Admin/Articles/Classes/index.html
@@ -56,6 +56,7 @@
 <& /Elements/CollectionList,
     OrderBy => 'Name',
     Order => 'ASC',
+    Rows  => $Rows,
     %ARGS,
     Format => $Format,
     Collection => $Classes,
@@ -84,6 +85,7 @@ if ($FindDisabledClasses) {
 }
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Classes'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Classes'} || 50;
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index e0afa8c..a0516bb 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -87,7 +87,7 @@
     Order => 'ASC',
     %ARGS,
     Collection => $not_added,
-    Rows => 50,
+    Rows          => $rows,
     Format        => $format,
     DisplayFormat => "'__CheckBox.{AddCustomField-". $CF->id ."}__',". $format,
     AllowSorting  => 1,
@@ -149,6 +149,7 @@ $collection_class =~ s/^RT:://;
 
 my $format = RT->Config->Get('AdminSearchResultFormat')->{$collection_class}
     || '__id__,__Name__';
+my $rows = RT->Config->Get('AdminSearchResultRows')->{$collection_class} || 50;
 
 my $title = loc('Modify associated objects for [_1]', $CF->Name);
 
diff --git a/share/html/Admin/CustomFields/index.html b/share/html/Admin/CustomFields/index.html
index 3d5e564..a991f4a 100644
--- a/share/html/Admin/CustomFields/index.html
+++ b/share/html/Admin/CustomFields/index.html
@@ -72,7 +72,7 @@
 <& /Elements/CollectionList,
     OrderBy       => 'LookupType|Name',
     Order         => 'ASC|ASC',
-    Rows          => 50,
+    Rows          => $Rows,
     %ARGS,
     Collection    => $CustomFields,
     Format        => $Format,
@@ -101,5 +101,6 @@ $CustomFields->LimitToLookupType( $Type ) if $Type;
 $m->callback(CallbackName => 'MassageCustomFields', CustomFields => $CustomFields);
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'CustomFields'} || 50;
 
 </%INIT>
diff --git a/share/html/Admin/Elements/EditCustomFields b/share/html/Admin/Elements/EditCustomFields
index e35d2a2..264f4d3 100644
--- a/share/html/Admin/Elements/EditCustomFields
+++ b/share/html/Admin/Elements/EditCustomFields
@@ -74,7 +74,7 @@
     Order         => 'ASC',
     %ARGS,
     Collection    => $not_added_cfs,
-    Rows          => 50,
+    Rows          => $rows,
     Format        => $format,
     DisplayFormat => "'__CheckBox.{AddCustomField}__',". $format,
     AllowSorting  => 1,
@@ -163,6 +163,7 @@ $not_added_cfs->LimitToLookupType($lookup);
 $not_added_cfs->LimitToNotAdded( $id ? ($id, 0) : (0) );
 
 my $format = RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'};
+my $rows = RT->Config->Get('AdminSearchResultRows')->{'CustomFields'} || 50;
 
 my $display_format = $id
             ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
diff --git a/share/html/Admin/Elements/EditScrips b/share/html/Admin/Elements/EditScrips
index c13f687..8e07863 100644
--- a/share/html/Admin/Elements/EditScrips
+++ b/share/html/Admin/Elements/EditScrips
@@ -75,7 +75,7 @@
 <h2><&|/l&>Not applied scrips</&></h2>
 % $scrips = $find_scrips->(Added => 0);
 <& /Elements/CollectionList,
-    Rows => 50,
+    Rows => $Rows,
     Page => 1,
     %ARGS,
     Collection => $scrips,
@@ -121,6 +121,7 @@ my $find_scrips = sub {
 };
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Scrips'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Scrips'} || 50;
 my $DisplayFormat = $Format;
 if ( $id ) {
     $DisplayFormat = "__RemoveCheckBox__, $DisplayFormat";
diff --git a/share/html/Admin/Elements/EditTemplates b/share/html/Admin/Elements/EditTemplates
index e713e9d..7efdfa0 100644
--- a/share/html/Admin/Elements/EditTemplates
+++ b/share/html/Admin/Elements/EditTemplates
@@ -58,6 +58,7 @@
 <& /Elements/CollectionList,
     OrderBy       => 'id',
     Order         => 'ASC',
+    Rows          => $Rows,
     %ARGS,
     DisplayFormat => '__CheckBox.{DeleteTemplates}__,'. $Format,
     Format        => $Format,
@@ -74,6 +75,7 @@
 
 <%INIT>
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Templates'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Templates'} || 50;
 
 my $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
 $QueueObj->Load( $id ) if $id;
diff --git a/share/html/Admin/Elements/MembershipsPage b/share/html/Admin/Elements/MembershipsPage
index 1388f36..2bdae76 100644
--- a/share/html/Admin/Elements/MembershipsPage
+++ b/share/html/Admin/Elements/MembershipsPage
@@ -58,7 +58,7 @@
     OrderBy => 'Name',
     Order   => 'ASC',
     %ARGS,
-    Rows    => 20,
+    Rows          => $Rows,
     DisplayFormat => "__CheckBox.{Delete}__,$Format",
     Format => $Format,
     Collection => $is_member,
@@ -71,7 +71,7 @@
 <& /Elements/CollectionList,
     OrderBy => 'Name',
     Order   => 'ASC',
-    Rows    => 20,
+    Rows    => $Rows,
     %ARGS,
     DisplayFormat => "__CheckBox.{Add}__,'__HasMemberRecursively.{$id}__/TITLE:Recursive member',$Format",
     Format => $Format,
@@ -129,6 +129,7 @@ $is_not_member->WithoutMember( PrincipalId => $id );
 $is_not_member->Limit( FIELD => 'id', OPERATOR => '!=', VALUE => $id );
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Groups'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Groups'} || 50;
 
 my $title;
 if ( $principal->IsUser ) {
diff --git a/share/html/Admin/Groups/index.html b/share/html/Admin/Groups/index.html
index ca1df9c..993f45d 100644
--- a/share/html/Admin/Groups/index.html
+++ b/share/html/Admin/Groups/index.html
@@ -79,7 +79,7 @@ jQuery(function(){
 <& /Elements/CollectionList,
     OrderBy => 'Name',
     Order => 'ASC',
-    Rows  => 100,
+    Rows  => $Rows,
     %ARGS,
     Format => $Format,
     Collection => $Groups,
@@ -122,6 +122,7 @@ else {
 }
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Groups'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Groups'} || 50;
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/Admin/Queues/index.html b/share/html/Admin/Queues/index.html
index 8bfb691..c5911a8 100644
--- a/share/html/Admin/Queues/index.html
+++ b/share/html/Admin/Queues/index.html
@@ -77,7 +77,7 @@
 <& /Elements/CollectionList,
     OrderBy => 'Name',
     Order => 'ASC',
-    Rows => 50,
+    Rows  => $Rows,
     %ARGS,
     Format => $Format,
     Collection => $queues,
@@ -113,6 +113,7 @@ if ( defined $QueueString && length $QueueString ) {
 }
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Queues'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Queues'} || 50;
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/Admin/Scrips/Objects.html b/share/html/Admin/Scrips/Objects.html
index 7cb681a..1c3858e 100644
--- a/share/html/Admin/Scrips/Objects.html
+++ b/share/html/Admin/Scrips/Objects.html
@@ -95,7 +95,7 @@
     Order   => 'ASC',
     %ARGS,
     Collection    => $not_added,
-    Rows          => 50,
+    Rows          => $rows,
     Format        => $format,
     DisplayFormat => "'__CheckBox.{AddScrip-". $id ."}__',". $format,
     AllowSorting  => 1,
@@ -165,6 +165,7 @@ my $added = $scrip->AddedTo;
 my $not_added = $scrip->NotAddedTo;
 
 my $format = RT->Config->Get('AdminSearchResultFormat')->{'Queues'};
+my $rows = RT->Config->Get('AdminSearchResultRows')->{'Queues'} || 50;
 
 my $title = loc('Modify associated objects for scrip #[_1]', $id);
 
diff --git a/share/html/Admin/Scrips/index.html b/share/html/Admin/Scrips/index.html
index 8e77836..5a20cd6 100644
--- a/share/html/Admin/Scrips/index.html
+++ b/share/html/Admin/Scrips/index.html
@@ -51,7 +51,7 @@
 <& /Elements/CollectionList,
     OrderBy       => 'Description',
     Order         => 'ASC',
-    Rows          => 50,
+    Rows          => $Rows,
     %ARGS,
     Collection    => $scrips,
     Format        => $Format,
@@ -68,4 +68,5 @@ $scrips->UnLimit;
 $m->callback(CallbackName => 'Massage', Scrips => $scrips);
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Scrips'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Scrips'} || 50;
 </%INIT>
diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
index 916a251..308d264 100644
--- a/share/html/Admin/Users/index.html
+++ b/share/html/Admin/Users/index.html
@@ -89,7 +89,7 @@ jQuery(function(){
 <& /Elements/CollectionList,
     OrderBy => 'Name',
     Order => 'ASC',
-    Rows  => 100,
+    Rows  => $Rows,
     %ARGS,
     Format => $Format,
     Collection => $users,
@@ -129,6 +129,7 @@ else {
 }
 
 $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Users'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Users'} || 50;
 
 # Build up the list of fields to display for searching
 my $i = 0;

commit 2620658dbde62e7b019893c211696e180c50bccc
Merge: f170ce0 f3637f6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Sep 3 14:45:52 2014 -0400

    Merge branch '4.2/new-admin-search-result-rows-config' into 4.2-trunk


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


More information about the rt-commit mailing list