From e70abd21bab68b23488f7ef1ee2e693a3b365691 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 18 May 2010 18:49:59 +0000 Subject: import rt 3.8.8 --- rt/share/html/Admin/CustomFields/index.html | 58 +++++++++++++++-------------- 1 file changed, 31 insertions(+), 27 deletions(-) (limited to 'rt/share/html/Admin/CustomFields/index.html') diff --git a/rt/share/html/Admin/CustomFields/index.html b/rt/share/html/Admin/CustomFields/index.html index 139b8ebd6..16fb593f6 100644 --- a/rt/share/html/Admin/CustomFields/index.html +++ b/rt/share/html/Admin/CustomFields/index.html @@ -45,40 +45,38 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => loc('Select a Custom Field') &> +<& /Admin/Elements/Header, Title => $title &> <& /Admin/Elements/CustomFieldTabs, current_tab => 'Admin/CustomFields/', - Title => loc('Select a Custom Field') &> + Title => $title, +&> -% my @types; -% my $prev_lookup = ''; -% while (my $CustomFieldObj = $CustomFields->Next) { -% next unless $CustomFieldObj->CurrentUserHasRight('AdminCustomField'); -% my $lookup = $CustomFieldObj->FriendlyLookupType; -% if ($lookup ne $prev_lookup) { -% if ($prev_lookup) { - -% } -

<% loc("Custom Fields for [_1]", $lookup) %>

- +% my $tmp = RT::CustomField->new( $session{'CurrentUser'} ); +% if ( $Type ) { +

<% loc("Custom Fields for [_1]", $tmp->FriendlyLookupType( $Type )) %>

% } +<& /Elements/CollectionList, + OrderBy => 'LookupType|Name', + Order => 'ASC|ASC', + Rows => 50, + %ARGS, + Collection => $CustomFields, + Format => $Format, + DisplayFormat => ($Type? '' : '__FriendlyLookupType__,'). $Format, + AllowSorting => 1, + PassArguments => [ + qw(Format Rows Page Order OrderBy), + qw(Type ShowDisabled) + ], +&> +
<&|/l&>Only show custom fields for:
@@ -92,8 +90,12 @@ <%args> $Type => '' $ShowDisabled => 0 + +$Format => undef <%INIT> +my $title = loc('Select a Custom Field'); + $Type ||= $ARGS{'type'} || ''; if ( !$Type && $ARGS{'type'} ) { $Type ||= $ARGS{'type'}; @@ -102,7 +104,9 @@ if ( !$Type && $ARGS{'type'} ) { my $CustomFields = RT::CustomFields->new($session{'CurrentUser'}); $CustomFields->UnLimit; -$CustomFields->{'find_disabled_rows'} = 1 if $ShowDisabled; +$CustomFields->FindAllRows if $ShowDisabled; $CustomFields->LimitToLookupType( $Type ) if $Type; -$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } ); + +$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'}; + -- cgit v1.2.1