From 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:16:32 +0000 Subject: import of rt 3.0.4 --- rt/html/Search/Elements/PickRestriction | 141 ++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 rt/html/Search/Elements/PickRestriction (limited to 'rt/html/Search/Elements/PickRestriction') diff --git a/rt/html/Search/Elements/PickRestriction b/rt/html/Search/Elements/PickRestriction new file mode 100644 index 000000000..a6911df5a --- /dev/null +++ b/rt/html/Search/Elements/PickRestriction @@ -0,0 +1,141 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# 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. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
+ +<& /Elements/TitleBoxStart, title => loc('Refine search')&> + + +
    +
  • <&|/l&>Owner is <& /Elements/SelectBoolean, Name => "OwnerOp", + TrueVal=> '=', + FalseVal => '!=' +&> +<& /Elements/SelectOwner, Name => "ValueOfOwner" &> + +
  • +<&|/l&>Requestor email address +<& /Elements/SelectMatch, Name => "RequestorOp" &> + + +
  • +<&|/l&>Subject <& /Elements/SelectMatch, Name => "SubjectOp" &> + + +
  • <&|/l&>Queue <& /Elements/SelectBoolean, Name => "QueueOp" , + True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', + FalseVal => '!=' &> +<& /Elements/SelectQueue, Name => loc("ValueOfQueue") &> + + +
  • <&|/l&>Priority <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &> + + + +
  • +<& /Elements/SelectDateType, Name => 'DateType' &> +<& /Elements/SelectDateRelation, Name=>"DateOp" &> +<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &> + +
  • <&|/l&>Ticket attachment + +<& /Elements/SelectAttachmentField, Name => 'AttachmentField' &> +<& /Elements/SelectBoolean, Name => "AttachmentFieldOp", + True => loc("matches"), + False => loc("does not match"), + TrueVal => 'LIKE', + FalseVal => 'NOT LIKE' +&> + + +
  • <&|/l&>Status +<& /Elements/SelectBoolean, Name => "StatusOp", + True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', + FalseVal => '!=' +&> +<& /Elements/SelectStatus, Name => "ValueOfStatus" &> + + +% while ( my $CustomField = $CustomFields->Next ) { + +
  • <% $CustomField->Name %> + <& /Elements/SelectCustomFieldOperator, Name => "CustomFieldOp". $CustomField->id, + True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', FalseVal => '!=' &> + +<& /Elements/SelectCustomFieldValue, Name => "CustomField".$CustomField->id, + CustomField => $CustomField, + &> +% } + +
+ +<& /Elements/TitleBoxEnd &> + +<& /Elements/TitleBoxStart, title => loc('Ordering and sorting')&> + +
    + +
  • <&|/l&>Results per page <& /Elements/SelectResultsPerPage, Name => "RowsPerPage", + Default => $session{'tickets_rows_per_page'} || '50' +&> + +
  • <&|/l&>Sort results by <& /Elements/SelectTicketSortBy, Name => "TicketsSortBy", + Default => $session{'tickets_sort_by'} +&> +<& /Elements/SelectSortOrder, Name => 'TicketsSortOrder', Default => $session{'tickets_sort_order'} &> + +
  • > <&|/l&>Don't show search results +
  • <& /Elements/Refresh, Name => 'RefreshSearchInterval' , Default => $session{'tickets_refresh_interval'} &> + +
+ + + + + + +<& /Elements/TitleBoxEnd &> + +<& /Elements/Submit, Label => loc('Search'), Name => 'Action'&> + +
+ + + <%INIT> +my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'}); + foreach ( $session{'tickets'}->RestrictionValues('Queue') ) { + # Gotta load up the $queue object, since queues get stored by name now. + my $queue = RT::Queue->new($session{'CurrentUser'}); + $queue->Load($_); + $CustomFields->LimitToQueue($queue->Id); + } + + $CustomFields->LimitToGlobal(); + + -- cgit v1.2.1