[Rt-commit] r3156 - in rt/branches/QUEBEC-EXPERIMENTAL: . html/Admin/CustomFields

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Jun 14 23:24:19 EDT 2005


Author: alexmv
Date: Tue Jun 14 23:24:19 2005
New Revision: 3156

Modified:
   rt/branches/QUEBEC-EXPERIMENTAL/   (props changed)
   rt/branches/QUEBEC-EXPERIMENTAL/html/Admin/CustomFields/index.html
Log:
 r4230 at zoq-fot-pik:  chmrr | 2005-06-14 23:22:31 -0400
  * Allow filtering of custom fields


Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Admin/CustomFields/index.html
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Admin/CustomFields/index.html	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Admin/CustomFields/index.html	Tue Jun 14 23:24:19 2005
@@ -48,6 +48,7 @@
     current_tab => 'Admin/CustomFields/', 
     Title => loc('Select a Custom Field') &>
 
+% my @types;
 % my $prev_lookup = '';
 % while (my $CustomFieldObj = $CustomFields->Next) { 
 %    $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next;
@@ -59,6 +60,7 @@
 <H2><% loc("Custom Fields for [_1]", $lookup) %></H2>
 <UL>
 %        $prev_lookup = $lookup;
+%        push @types, [$lookup, $CustomFieldObj->LookupType];
 %    }
 %    
 <LI>
@@ -69,8 +71,22 @@
 </UL>
 % }
 
+<form action="/Admin/CustomFields/index.html" method="GET">
+Filter to fields that apply to: 
+<select name="type">
+% for (@types) {
+<option value="<% $_->[1] %>"><% $_->[0] %></option>
+% }
+</select> 
+<input type="submit" value="Filter" />
+</form>
+
+<%args>
+$type => undef
+</%args>
 <%INIT>
 my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
 $CustomFields->UnLimit();
+$CustomFields->LimitToLookupType($type) if defined $type;
 $CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } );
 </%INIT>


More information about the Rt-commit mailing list