[Rt-commit] r2471 - in rtfm/branches/2.1-TESTING: . html/Admin/RTFM/Classes html/RTFM/Article

jesse at bestpractical.com jesse at bestpractical.com
Tue Mar 15 02:10:25 EST 2005


Author: jesse
Date: Tue Mar 15 02:10:25 2005
New Revision: 2471

Removed:
   rtfm/branches/2.1-TESTING/html/Admin/RTFM/Classes/Access.html
Modified:
   rtfm/branches/2.1-TESTING/   (props changed)
   rtfm/branches/2.1-TESTING/html/Admin/RTFM/Classes/CustomFields.html
   rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
Log:
 r8749 at hualien:  jesse | 2005-03-15 02:05:48 -0500
 Search UI works. Custom Field admin ui works
 


Modified: rtfm/branches/2.1-TESTING/html/Admin/RTFM/Classes/CustomFields.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/Admin/RTFM/Classes/CustomFields.html	(original)
+++ rtfm/branches/2.1-TESTING/html/Admin/RTFM/Classes/CustomFields.html	Tue Mar 15 02:10:25 2005
@@ -1,2 +1,61 @@
-<& /Admin/Elements/ObjectCustomFields, %ARGS, ObjectType => 'RT::FM::Class' &>
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%#  
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/RTFM/Elements/ClassTabs, id => $Object->id, Title => $title, current_tab => "Admin/RTFM/Classes/CustomFields.html?id=$id" &>
+<& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::FM::Class', SubType => 'RT::FM::Article' &>
+<%INIT>
+my $Object = RT::FM::Class->new( $session{'CurrentUser'} );
 
+$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) );
+my $FriendlySubTypes =
+  RT::CustomField->new( $session{'CurrentUser'} )
+  ->FriendlyLookupType( $Object->CustomFieldLookupType );
+
+my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name );
+
+</%INIT>
+<%ARGS>
+$id => undef
+</%ARGS>

Modified: rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html	(original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Article/Search.html	Tue Mar 15 02:10:25 2005
@@ -28,17 +28,18 @@
 
 # Don't want to search for a null class when there is no class specced
 my $customfields = RT::CustomFields->new( $session{'CurrentUser'} );
+$customfields->LimitToLookupType(RT::FM::Article->new($session{'CurrentUser'})->CustomFieldLookupType);
 if ( $ARGS{'Class'} ) {
     my @Classes =
       ( ref $ARGS{'Class'} eq 'ARRAY' )
       ? @{ $ARGS{'Class'} }
       : ( $ARGS{'Class'} );
     foreach my $class (@Classes) {
-        $customfields->LimitToClass($class);
+        $customfields->LimitToGlobalOrObjectId($class);
     }
 }
 else {
-    $customfields->UnLimit();
+    $customfields->LimitToGlobalOrObjectId();
 
 }
 


More information about the Rt-commit mailing list