[Rt-commit] r13371 - in rt/3.8/trunk: . share/html/Search share/html/Ticket/Elements
kyoki at bestpractical.com
kyoki at bestpractical.com
Tue Jun 17 15:44:17 EDT 2008
Author: kyoki
Date: Tue Jun 17 15:44:16 2008
New Revision: 13371
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Elements/QueryString
rt/3.8/trunk/share/html/Search/Edit.html
rt/3.8/trunk/share/html/Ticket/Elements/Tabs
Log:
r23056 at nyx: kyoki | 2008-06-17 15:25:51 -0400
RT-Ticket: 9670
RT-Status: Resolved
RT-Update: Correspond
current_subtab now highlights
Modified: rt/3.8/trunk/share/html/Elements/QueryString
==============================================================================
--- rt/3.8/trunk/share/html/Elements/QueryString (original)
+++ rt/3.8/trunk/share/html/Elements/QueryString Tue Jun 17 15:44:16 2008
@@ -47,7 +47,8 @@
%# END BPS TAGGED BLOCK }}}
<%INIT>
my @params;
-while ( my ($key, $value) = each %ARGS ) {
+for my $key (sort keys %ARGS) {
+ my $value = $ARGS{$key};
next unless defined $value;
$key = $m->interp->apply_escapes( $key, 'u' );
if( UNIVERSAL::isa( $value, 'ARRAY' ) ) {
@@ -58,5 +59,6 @@
push @params, $key ."=". $m->interp->apply_escapes($value, 'u');
}
}
-return join '&', @params;
+
+return join '&', sort(@params);
</%INIT>
Modified: rt/3.8/trunk/share/html/Search/Edit.html
==============================================================================
--- rt/3.8/trunk/share/html/Search/Edit.html (original)
+++ rt/3.8/trunk/share/html/Search/Edit.html Tue Jun 17 15:44:16 2008
@@ -76,7 +76,7 @@
my $QueryString = $m->comp('/Elements/QueryString',
Query => $Query,
Format => $Format,
- Rows => $Rows,
+ RowsPerPage => $Rows,
OrderBy => $OrderBy,
Order => $Order,
);
Modified: rt/3.8/trunk/share/html/Ticket/Elements/Tabs
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Elements/Tabs (original)
+++ rt/3.8/trunk/share/html/Ticket/Elements/Tabs Tue Jun 17 15:44:16 2008
@@ -53,7 +53,6 @@
current_toptab => $current_toptab,
Title => $Title &>
<%INIT>
-
my $tabs = {};
my $current_toptab = "Search/Build.html", my $searchtabs = {};
my $actions;
@@ -236,31 +235,33 @@
}
my $args = '';
+my $query = '';
my %query_args;
+my $search_id = $ARGS{'SavedSearchId'}
+ || $session{'CurrentSearchHash'}->{'SearchId'};
-if ( $ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'} ) {
- %query_args = (
+$query = 1 if ( $ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'} );
+
+%query_args = (
- SavedSearchId => $ARGS{'SavedSearchId'}
- || $session{'CurrentSearchHash'}->{'SearchId'},
+ SavedSearchId => ($search_id eq 'new') ? undef : $search_id,
Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'},
Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'},
OrderBy => $ARGS{'OrderBy'}
|| $session{'CurrentSearchHash'}->{'OrderBy'},
Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'},
Page => $ARGS{'Page'} || $session{'CurrentSearchHash'}->{'Page'},
- Rows => $ARGS{'Rows'} || $session{'CurrentSearchHash'}->{'Rows'},
+ RowsPerPage => $ARGS{'RowsPerPage'} || $session{'CurrentSearchHash'}->{'RowsPerPage'},
);
$args = "?" . $m->comp( '/Elements/QueryString', %query_args );
-}
$tabs->{"f"} = {
path => "Search/Build.html?NewQuery=1",
title => loc('New Search')
};
$tabs->{"g"} = {
- path => "Search/Build.html$args",
+ path => "Search/Build.html" . (($query) ? $args : ''),
title => loc('Edit Search')
};
$tabs->{"h"} = {
@@ -268,7 +269,7 @@
title => loc('Advanced'),
separator => 1
};
-if ($args) {
+if ($query) {
if ( $current_tab =~ m{Search/Results.html} ) {
$current_tab = "Search/Results.html$args";
@@ -312,6 +313,7 @@
? $tabs->{ "s" . $searchtab } = $searchtabs->{$searchtab}
: $tabs->{ "z_" . $searchtab } = $searchtabs->{$searchtab};
}
+
</%INIT>
@@ -321,4 +323,5 @@
$current_tab => ''
$current_subtab => ''
$Title => undef
+$RowsPerPage => undef
</%ARGS>
More information about the Rt-commit
mailing list