[Rt-commit] [svn] r1400 - in rtir/branches/1.1/html/RTIR/Search: .
Elements
leira at pallas.eruditorum.org
leira at pallas.eruditorum.org
Wed Sep 1 19:10:20 EDT 2004
Author: leira
Date: Wed Sep 1 19:10:19 2004
New Revision: 1400
Added:
rtir/branches/1.1/html/RTIR/Search/Elements/PickCFs
Modified:
rtir/branches/1.1/html/RTIR/Search/Build.html
rtir/branches/1.1/html/RTIR/Search/Elements/BuildQuery
rtir/branches/1.1/html/RTIR/Search/Elements/PickBasics
rtir/branches/1.1/html/RTIR/Search/Elements/PickCriteria
Log:
QueryBuilder shows the fields it should show (no queues, but including RTIR custom fields).
Modified: rtir/branches/1.1/html/RTIR/Search/Build.html
==============================================================================
--- rtir/branches/1.1/html/RTIR/Search/Build.html (original)
+++ rtir/branches/1.1/html/RTIR/Search/Build.html Wed Sep 1 19:10:19 2004
@@ -59,6 +59,7 @@
AvailableColumns => $AvailableColumns,
CurrentFormat => $CurrentFormat,
BaseQuery => $BaseQuery,
+ Queue => $Queue,
%ARGS &>
<%INIT>
Modified: rtir/branches/1.1/html/RTIR/Search/Elements/BuildQuery
==============================================================================
--- rtir/branches/1.1/html/RTIR/Search/Elements/BuildQuery (original)
+++ rtir/branches/1.1/html/RTIR/Search/Elements/BuildQuery Wed Sep 1 19:10:19 2004
@@ -54,7 +54,7 @@
<table width=100%>
<tr>
<td valign=top class="boxcontainer">
-<& /Search/Elements/PickCriteria, query => $Query, cfqueues => \%queues &>
+<& PickCriteria, query => $Query, Queue => $Queue &>
<& /Elements/Submit, Caption => loc('Add additional criteria'), Label => loc('Add'), Name => 'AddClause'&>
</td>
@@ -115,4 +115,5 @@
$AvailableColumns => undef
$CurrentFormat => undef
$FormAction => "Build.html"
+$Queue => undef
</%ARGS>
Modified: rtir/branches/1.1/html/RTIR/Search/Elements/PickBasics
==============================================================================
--- rtir/branches/1.1/html/RTIR/Search/Elements/PickBasics (original)
+++ rtir/branches/1.1/html/RTIR/Search/Elements/PickBasics Wed Sep 1 19:10:19 2004
@@ -64,7 +64,7 @@
</td><td>
<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
% } elsif ($field eq "Links") {
-<& SelectLinks, Name=>"LinksField" &>
+<& /Search/Elements/SelectLinks, Name=>"LinksField" &>
</td><td>
<& /Elements/SelectBoolean, Name => "LinksOp",
True => loc("is"),
@@ -123,7 +123,7 @@
</td><td>
<& /Elements/SelectOwner, Name => "ValueOfActor" &>
% } elsif ($field eq 'Watcher') {
-<& SelectPersonType, Name => 'WatcherField', Default => 'Requestor' &>
+<& /Search/Elements/SelectPersonType, Name => 'WatcherField', Default => 'Requestor' &>
</td><td>
<& /Elements/SelectMatch, Name => "WatcherOp" &>
</td><td>
Added: rtir/branches/1.1/html/RTIR/Search/Elements/PickCFs
==============================================================================
--- (empty file)
+++ rtir/branches/1.1/html/RTIR/Search/Elements/PickCFs Wed Sep 1 19:10:19 2004
@@ -0,0 +1,85 @@
+%# {{{ BEGIN BPS TAGGED BLOCK
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2004 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
+% while ( my $CustomField = $CustomFields->Next ) {
+% my $label = $CustomField->Name;
+% next unless ($label =~ s/^_RTIR_//g);
+<tr><td class=label>
+
+% my $name;
+% if ($CustomField->QueueObj->id) {
+% $name = "'CF." . $CustomField->QueueObj->Name .
+% ".{" . $CustomField->Name . "}'";
+% } else {
+% $name = "'CF." . $CustomField->Name . "'";
+% }
+<% $label %>
+</td>
+<td>
+<& /Elements/SelectCustomFieldOperator, Name => $name . "Op",
+ True => loc("is"),
+ False => loc("isn't"),
+ TrueVal=> '=', FalseVal => '!=' &>
+</td>
+<td>
+<& /Elements/SelectCustomFieldValue, Name => "ValueOf" . $name,
+ CustomField => $CustomField,
+ &>
+</td></tr>
+% }
+
+<%INIT>
+my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+
+$CustomFields->{"find_disabled_rows"} = 1;
+$CustomFields->LimitToQueue($QueueObj->Id);
+$CustomFields->LimitToGlobal();
+</%INIT>
+
+<%ARGS>
+$Queue => undef
+</%ARGS>
Modified: rtir/branches/1.1/html/RTIR/Search/Elements/PickCriteria
==============================================================================
--- rtir/branches/1.1/html/RTIR/Search/Elements/PickCriteria (original)
+++ rtir/branches/1.1/html/RTIR/Search/Elements/PickCriteria Wed Sep 1 19:10:19 2004
@@ -61,14 +61,22 @@
</td>
</tr>
<& PickBasics &>
- <& PickCFs, cfqueues => \%cfqueues &>
+ <& PickCFs, Queue => $Queue &>
+ <& /Search/Elements/PickCFs, cfqueues => $cfqueues &>
<tr><td> </td></tr>
</table>
<& /Elements/TitleBoxEnd &>
+<%INIT>
+my $cfqueues = ();
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+$cfqueues->{$QueueObj->Id} = 1;
+</%INIT>
+
<%ARGS>
$addquery => 0
$query => undef
-%cfqueues => undef
+$Queue => undef
</%ARGS>
More information about the Rt-commit
mailing list