[Rt-commit] [svn] r716 - in rt/branches/rt-3.1/html: Search
Ticket/Elements
leira at pallas.eruditorum.org
leira at pallas.eruditorum.org
Wed Apr 21 01:21:32 EDT 2004
Author: leira
Date: Wed Apr 21 01:21:32 2004
New Revision: 716
Modified:
rt/branches/rt-3.1/html/Search/Build.html
rt/branches/rt-3.1/html/Ticket/Elements/Tabs
Log:
Keep persistent search data.
Modified: rt/branches/rt-3.1/html/Search/Build.html
==============================================================================
--- rt/branches/rt-3.1/html/Search/Build.html (original)
+++ rt/branches/rt-3.1/html/Search/Build.html Wed Apr 21 01:21:32 2004
@@ -76,6 +76,18 @@
my $search;
my $title = loc("Query Builder");
+if ($NewQuery) {
+ $Query = '';
+ $Format = '';
+ $Description = '';
+ undef $session{'CurrentSearchHash'};
+} else {
+ $search_hash = $session{'CurrentSearchHash'};
+ $Query ||= $search_hash->{'Query'};
+ $Format ||= $search_hash->{'Format'};
+ $Description ||= $search_hash->{'Description'};
+}
+
my @actions = ();
my %queues;
@@ -123,7 +135,7 @@
$search_hash->{'SearchId'} = $ARGS{'LoadSavedSearch'};
$ARGS{'Format'} = $Format = $search->SubValue('Format');
$ARGS{'Query'} = $Query = $search->SubValue('Query');
-
+ $SearchId = $ARGS{'LoadSavedSearch'};
}
@@ -993,6 +1005,9 @@
$search_hash->{'SearchId'} = $ARGS{'SearchId'};
$search_hash->{'Object'} = $search;
+ $search_hash->{'Format'} = $ARGS{'Format'};
+ $search_hash->{'Query'} = $ARGS{'Query'};
+ $search_hash->{'Description'} = $ARGS{'Description'};
}
elsif ( $ARGS{'SearchId'} eq 'new' && $ARGS{'Owner'} =~ /^(.*?)-(\d+)$/ ) {
@@ -1077,13 +1092,28 @@
# Build a querystring for the tabs
my $QueryString;
-$QueryString = '?' . $m->comp('/Elements/QueryString', Query => $Query,
- Format => $Format,
- Rows =>$ARGS{'Rows'}) if ($Query);
+if ($NewQuery) {
+ $QueryString = '?NewQuery=1';
+} else {
+ $QueryString = '?' . $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Format => $Format,
+ Rows =>$ARGS{'Rows'}) if ($Query);
+}
+
+if (!$search) {
+ $search_hash->{'SearchId'} = $SearchId;
+ $search_hash->{'Format'} = $Format;
+ $search_hash->{'Query'} = $Query;
+ $search_hash->{'Description'} = $Description || $ARGS{'Descripton'};
+}
+
+$session{'CurrentSearchHash'} = $search_hash;
</%INIT>
<%ARGS>
+$NewQuery => 0
$SearchId => 'new'
$Query => undef
$Format => undef
Modified: rt/branches/rt-3.1/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/Elements/Tabs (original)
+++ rt/branches/rt-3.1/html/Ticket/Elements/Tabs Wed Apr 21 01:21:32 2004
@@ -162,9 +162,9 @@
Query => $ARGS{'Query'},
Format => $ARGS{'Format'},
Rows => $ARGS{'Rows'}
- );
+ ) if ($ARGS{'Query'});
-$tabs->{"f"} = { path => "Search/Build.html",
+$tabs->{"f"} = { path => "Search/Build.html?NewQuery=1",
title => loc('New Query'),
subtabs => $searchtabs };
$tabs->{"g"} = { path => "Search/Build.html$args",
More information about the Rt-commit
mailing list