X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FSearch%2FElements%2FPickBasics;h=8a48f6b189915d31be74db02ef3e53235eab605f;hp=d7e19788fb4e23a012ade7d8dad45ee98db596d8;hb=9c68254528b6f2c7d8c1921b452fa56064783782;hpb=d39d52aac8f38ea9115628039f0df5aa3ac826de diff --git a/rt/html/Search/Elements/PickBasics b/rt/html/Search/Elements/PickBasics index d7e19788f..8a48f6b18 100644 --- a/rt/html/Search/Elements/PickBasics +++ b/rt/html/Search/Elements/PickBasics @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,11 +42,18 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK - -% foreach my $field (@fields) { +%# END BPS TAGGED BLOCK }}} + + +<&|/l&>id + +<& /Elements/SelectEqualityOperator, Name => "idOp" &> + + + + + -% if ($field eq "Attachment") { <& /Elements/SelectAttachmentField, Name => 'AttachmentField' &> <& /Elements/SelectBoolean, Name => "AttachmentOp", @@ -57,44 +64,26 @@ &> -% } elsif ($field eq "Dates") { -<& /Elements/SelectDateType, Name=>"DateField" &> - -<& /Elements/SelectDateRelation, Name=>"DateOp" &> - -<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &> -% } elsif ($field eq "Links") { -<& SelectLinks, Name=>"LinksField" &> - -<& /Elements/SelectBoolean, Name => "LinksOp", - True => loc("is"), - False => loc("isn't"), - TrueVal=> '=', - FalseVal => '!=' -&> - - -%} elsif ($field eq "Priority") { - - -<& /Elements/SelectEqualityOperator, Name => "PriorityOp" &> - - -%} elsif ($field =~ m/Time.*/) { - + + + + +<&|/l&>Queue -<& /Elements/SelectEqualityOperator, Name => "TimeOp" &> +<& /Elements/SelectBoolean, Name => "QueueOp" , + True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', + FalseVal => '!=' &> - -% } elsif ($field eq "Status") { +<& /Elements/SelectQueue, + Name => "ValueOfQueue", + NamedValues => 1, + CheckQueueRight => 'ShowTicket' &> + + + + <&|/l&>Status <& /Elements/SelectBoolean, Name => "StatusOp", @@ -105,32 +94,9 @@ &> <& /Elements/SelectStatus, Name => "ValueOfStatus", SkipDeleted => 1 &> -%} elsif ($field =~ m/.*Priority/ || $field =~ m/Time.*/) { -<&|/l&><%$field%> - -<& /Elements/SelectEqualityOperator, Name => $field . "Op" &> - -" SIZE=5> -% } elsif ($field eq "Queue") { -<&|/l&>Queue - -<& /Elements/SelectBoolean, Name => "QueueOp" , - True => loc("is"), - False => loc("isn't"), - TrueVal=> '=', - FalseVal => '!=' &> - -<& /Elements/SelectQueue, Name => "ValueOfQueue", NamedValues => 1 &> -% } elsif ($field eq "id") { -<&|/l&>Id - -<& /Elements/SelectEqualityOperator, Name => "idOp" &> - - -% } elsif ($field eq "People") { -% foreach my $field (@people) { + + -% if ($field eq "Actor") { -% } else { -<&|/l&><%$field%> -<& /Elements/SelectMatch, Name => "$field" . "Op" &> -" value=""SIZE=20> -% } + + + +<& SelectPersonType, Name => 'WatcherGroupField', Default => 'RequestorGroup', Suffix => 'Group' &> + +<& /Elements/SelectBoolean, Name => "WatcherGroupOp", + True=> loc('belongs to'), + False=> loc('does not belong to'), + TrueVal=> '=', + FalseVal => '!=' +&> + +<& SelectGroup, Name => 'ValueOfWatcherGroup' &> + + + + +<& /Elements/SelectDateType, Name=>"DateField" &> + +<& /Elements/SelectDateRelation, Name=>"DateOp" &> + +<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &> -% } -% } else { -<&|/l&><%$field%> + + + + +<& /Elements/SelectEqualityOperator, Name => "TimeOp" &> -<& /Elements/SelectMatch, Name => "$field" . "Op" &> + + + + + + + +<& /Elements/SelectEqualityOperator, Name => "PriorityOp" &> -" value="" SIZE=20> -% } + + + + + +<& SelectLinks, Name=>"LinksField" &> + +<& /Elements/SelectBoolean, Name => "LinksOp", + True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', + FalseVal => '!=' &> + + -% } -<& '/Elements/Callback', _CallbackName => 'EndOfList' &> <%INIT> -my @fields = ('Attachment', - 'Queue', - 'Status', - 'People', - 'Dates', - 'Time', - 'Priority', - 'Links', - 'id', - ); - my @people = ('Actor', 'Watcher', + 'WatcherGroup', );