[Rt-commit] r3310 - in rt/branches/CHALDEA-EXPERIMENTAL: . html/Admin/CustomFields html/Elements

jesse at bestpractical.com jesse at bestpractical.com
Sun Jul 3 18:06:54 EDT 2005


Author: jesse
Date: Sun Jul  3 18:06:53 2005
New Revision: 3310

Modified:
   rt/branches/CHALDEA-EXPERIMENTAL/   (props changed)
   rt/branches/CHALDEA-EXPERIMENTAL/html/Admin/CustomFields/index.html
   rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform
Log:
 r22125 at hualien:  jesse | 2005-07-03 17:47:04 -0400
  r20540 at hualien:  jesse | 2005-06-15 14:46:19 -0400
   r20162 at hualien (orig r3156):  alexmv | 2005-06-14 23:24:19 -0400
    r4230 at zoq-fot-pik:  chmrr | 2005-06-14 23:22:31 -0400
     * Allow filtering of custom fields
   
   r20163 at hualien (orig r3157):  alexmv | 2005-06-14 23:24:23 -0400
   
   r20165 at hualien (orig r3159):  alexmv | 2005-06-15 00:47:27 -0400
    r4236 at zoq-fot-pik:  chmrr | 2005-06-15 00:46:57 -0400
     * <input> tags don't like newlines in them
   
  
 


Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Admin/CustomFields/index.html
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Admin/CustomFields/index.html	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Admin/CustomFields/index.html	Sun Jul  3 18:06:53 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>

Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform	(original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform	Sun Jul  3 18:06:53 2005
@@ -50,10 +50,12 @@
 % }
 <%INIT>
 if ($Multiple and $Values) {
-    $Default = '';
-    while (my $value = $Values->Next ) {
-	$Default .= $value->Content."\n";
-    }
+  $Default = '';
+  while (my $value = $Values->Next ) {
+    $Default .= $value->Content."\n";
+  }
+} else {
+  $Default =~ s/\s*\n\s*/ /g if $Default;
 }
 </%INIT>
 <%ARGS>


More information about the Rt-commit mailing list