[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-921-g811af6f
Ruslan Zakirov
ruz at bestpractical.com
Fri Dec 17 06:30:54 EST 2010
The branch, 3.9-trunk has been updated
via 811af6f29d87fd28d304d93a4905465006d9761f (commit)
via e81a679e661a36972afbf9e5845e2d49a17322bb (commit)
from 841b52408848438c42221bc9dea855dcbc1f51fd (commit)
Summary of changes:
lib/RT/Queue_Overlay.pm | 6 +++-
share/html/Elements/Tabs | 50 ++++++++++++++++++++++++++-------------------
2 files changed, 33 insertions(+), 23 deletions(-)
- Log -----------------------------------------------------------------
commit e81a679e661a36972afbf9e5845e2d49a17322bb
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Dec 17 14:06:29 2010 +0300
it's better to return default lifecycle rather then undef
diff --git a/lib/RT/Queue_Overlay.pm b/lib/RT/Queue_Overlay.pm
index de155b2..723b2b6 100755
--- a/lib/RT/Queue_Overlay.pm
+++ b/lib/RT/Queue_Overlay.pm
@@ -254,8 +254,10 @@ sub Lifecycle {
$name ||= 'default';
my $res = RT::Lifecycle->Load( $name );
- $RT::Logger->error("Lifecycle '$name' for queue '".$self->Name."' doesn't exist")
- unless $res;
+ unless ( $res ) {
+ $RT::Logger->error("Lifecycle '$name' for queue '".$self->Name."' doesn't exist");
+ return RT::Lifecycle->Load('default');
+ }
return $res;
}
commit 811af6f29d87fd28d304d93a4905465006d9761f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Dec 17 14:29:57 2010 +0300
refactor current search menu
* move show results in front
* add more... submenu
* move reporting, shredder, rss, tsv under more...
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index d15942b..59a4b9d 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -591,30 +591,23 @@ if ( $request_path !~ m{^/SelfService/} ) {
} else {
$current_search_menu = PageMenu();
}
- $current_search_menu->child( edit_search => title => loc('Edit Search') =>
- path => "/Search/Build.html" . ( ($has_query) ? $args : '' ) );
- $current_search_menu->child( loc('Advanced') => path => "/Search/Edit.html$args" );
if ($has_query) {
- if ($request_path =~ m{^/Search/Results.html}
- && #XXX TODO better abstraction
- $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )) {
- my $shred_args = $query_string->(
- search => 1,
- plugin => 'Tickets',
- 'Tickets:query' => $query_args{'Query'},
- 'Tickets:limit' => $query_args{'Rows'},
- );
+ $current_search_menu->child( results => title => loc('Show Results') => path => "/Search/Results.html$args" );
- $current_search_menu->child( 'shredder' => title => loc('Shredder'),
- path => 'Admin/Tools/Shredder/?' . $shred_args);
- }
+ }
- $current_search_menu->child( results => title => loc('Show Results') => path => "/Search/Results.html$args" );
+ $current_search_menu->child( edit_search => title => loc('Edit Search') =>
+ path => "/Search/Build.html" . ( ($has_query) ? $args : '' ) );
+ $current_search_menu->child( loc('Advanced') => path => "/Search/Edit.html$args" );
+ if ( $has_query ) {
$current_search_menu->child( bulk => title => loc('Bulk Update') => path => "/Search/Bulk.html$args" );
- $current_search_menu->child( chart => title => loc('Graph'),
+
+ my $more = $current_search_menu->child( more => title => loc('More...') );
+
+ $more->child( chart => title => loc('Graph'),
path => "/Search/Chart.html$args" );
- $current_search_menu->child(
+ $more->child(
spreadsheet => title => loc('Spreadsheet'),
path => "/Search/Results.tsv$args" );
@@ -630,13 +623,28 @@ if ( $request_path !~ m{^/SelfService/} ) {
. $query_args{Order}
. $query_args{OrderBy} );
- $current_search_menu->child( rss => title => loc('RSS') => path => "/NoAuth/rss/$RSSPath/$RSSQueryString");
+ $more->child( rss => title => loc('RSS') => path => "/NoAuth/rss/$RSSPath/$RSSQueryString");
my $ical_path = join '/', map $m->interp->apply_escapes($_, 'u'),
$session{'CurrentUser'}->UserObj->Name,
$session{'CurrentUser'}->UserObj->GenerateAuthString( $query_args{Query} ),
$query_args{Query};
- $current_search_menu->child( ical => title => loc('iCal') => path => '/NoAuth/iCal/'.$ical_path);
-}
+ $more->child( ical => title => loc('iCal') => path => '/NoAuth/iCal/'.$ical_path);
+
+ if ($request_path =~ m{^/Search/Results.html}
+ && #XXX TODO better abstraction
+ $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )) {
+ my $shred_args = $query_string->(
+ search => 1,
+ plugin => 'Tickets',
+ 'Tickets:query' => $query_args{'Query'},
+ 'Tickets:limit' => $query_args{'Rows'},
+ );
+
+ $more->child( 'shredder' => title => loc('Shredder'),
+ path => 'Admin/Tools/Shredder/?' . $shred_args);
+ }
+
+ }
}
if ( $request_path =~ m{^/Article/} ) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list