Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
best-practical
rt
Commits
2620658d
Commit
2620658d
authored
Sep 03, 2014
by
Alex Vandiver
Browse files
Merge branch '4.2/new-admin-search-result-rows-config' into 4.2-trunk
parents
f170ce08
f3637f6f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
44 additions
and
12 deletions
+44
-12
etc/RT_Config.pm.in
etc/RT_Config.pm.in
+17
-0
share/html/Admin/Articles/Classes/Objects.html
share/html/Admin/Articles/Classes/Objects.html
+2
-1
share/html/Admin/Articles/Classes/index.html
share/html/Admin/Articles/Classes/index.html
+2
-0
share/html/Admin/CustomFields/Objects.html
share/html/Admin/CustomFields/Objects.html
+2
-1
share/html/Admin/CustomFields/index.html
share/html/Admin/CustomFields/index.html
+2
-1
share/html/Admin/Elements/EditCustomFields
share/html/Admin/Elements/EditCustomFields
+2
-1
share/html/Admin/Elements/EditScrips
share/html/Admin/Elements/EditScrips
+2
-1
share/html/Admin/Elements/EditTemplates
share/html/Admin/Elements/EditTemplates
+2
-0
share/html/Admin/Elements/MembershipsPage
share/html/Admin/Elements/MembershipsPage
+3
-2
share/html/Admin/Groups/index.html
share/html/Admin/Groups/index.html
+2
-1
share/html/Admin/Queues/index.html
share/html/Admin/Queues/index.html
+2
-1
share/html/Admin/Scrips/Objects.html
share/html/Admin/Scrips/Objects.html
+2
-1
share/html/Admin/Scrips/index.html
share/html/Admin/Scrips/index.html
+2
-1
share/html/Admin/Users/index.html
share/html/Admin/Users/index.html
+2
-1
No files found.
etc/RT_Config.pm.in
View file @
2620658d
...
...
@@ -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
...
...
share/html/Admin/Articles/Classes/Objects.html
View file @
2620658d
...
...
@@ -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);
...
...
share/html/Admin/Articles/Classes/index.html
View file @
2620658d
...
...
@@ -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
>
...
...
share/html/Admin/CustomFields/Objects.html
View file @
2620658d
...
...
@@ -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);
...
...
share/html/Admin/CustomFields/index.html
View file @
2620658d
...
...
@@ -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>
share/html/Admin/Elements/EditCustomFields
View file @
2620658d
...
...
@@ -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}__'")
...
...
share/html/Admin/Elements/EditScrips
View file @
2620658d
...
...
@@ -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";
...
...
share/html/Admin/Elements/EditTemplates
View file @
2620658d
...
...
@@ -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;
...
...
share/html/Admin/Elements/MembershipsPage
View file @
2620658d
...
...
@@ -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 ) {
...
...
share/html/Admin/Groups/index.html
View file @
2620658d
...
...
@@ -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
>
...
...
share/html/Admin/Queues/index.html
View file @
2620658d
...
...
@@ -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
>
...
...
share/html/Admin/Scrips/Objects.html
View file @
2620658d
...
...
@@ -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);
...
...
share/html/Admin/Scrips/index.html
View file @
2620658d
...
...
@@ -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>
share/html/Admin/Users/index.html
View file @
2620658d
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment