[Rt-commit] rt branch, menuing, created. rt-3.9.4-351-g13b3078

Jesse Vincent jesse at bestpractical.com
Wed Nov 3 14:26:20 EDT 2010


The branch, menuing has been created
        at  13b3078839b8dd35f2901f7bf6192d4bdc35c4ce (commit)

- Log -----------------------------------------------------------------
commit 310bd366b49d7f9e7bc8af02bef6525b8f6d4415
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Sep 25 09:20:01 2010 -0400

    replace RT's menuing library (unusued) with one from jifty

diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index 899f209..1665d7b 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -47,24 +47,269 @@
 # END BPS TAGGED BLOCK }}}
 
 package RT::Interface::Web::Menu;
-use warnings;
+
 use strict;
+use warnings;
+
+
+use base qw/Class::Accessor::Fast/;
+use URI;
+use Scalar::Util qw(weaken);
+
+__PACKAGE__->mk_accessors(qw(
+    label sort_order link target escape_label class render_children_inline
+    raw_html
+));
+
+=head1 NAME
+
+RT::Interface::Web::Menu - Handle the API for menu navigation
+
+=head1 METHODS
+
+=head2 new PARAMHASH
+
+Creates a new L<RT::Interface::Web::Menu> object.  Possible keys in the
+I<PARAMHASH> are L</label>, L</parent>, L</sort_order>, L</url>, and
+L</active>.  See the subroutines with the respective name below for
+each option's use.
+
+=cut
 
 sub new {
-    my $class = shift;
-    my $self = bless {}, $class;
-    $self->{'root_node'} = RT::Interface::Web::Menu::Item->new();
+    my $package = shift;
+    my $args = ref($_[0]) eq 'HASH' ? shift @_ : {@_};
+
+    my $parent = delete $args->{'parent'};
+    $args->{sort_order} ||= 0;
+
+    # Class::Accessor only wants a hashref;
+    my $self = $package->SUPER::new( $args );
+
+    # make sure our reference is weak
+    $self->parent($parent) if defined $parent;
+
     return $self;
 }
 
 
-sub as_hash_of_hashes {
+=head2 label [STRING]
+
+Sets or returns the string that the menu item will be displayed as.
+
+=cut
+
+=head2 parent [MENU]
+
+Gets or sets the parent L<RT::Interface::Web::Menu> of this item; this defaults
+to null. This ensures that the reference is weakened.
+
+=head2 raw_html [STRING]
+
+Sets the content of this menu item to a raw blob of HTML. When
+asked or output, rather than constructing a link, Jifty will return
+this raw content. No escaping is done.
 
+=cut
+
+sub parent {
+    my $self = shift;
+    if (@_) {
+        $self->{parent} = shift;
+        weaken $self->{parent};
+    }
+
+    return $self->{parent};
 }
 
-sub root {
+
+=head2 sort_order [NUMBER]
+
+Gets or sets the sort order of the item, as it will be displayed under
+the parent.  This defaults to adding onto the end.
+
+=head2 link
+
+Gets or set a L<Jifty::Web::Form::Link> object that represents this
+menu item. If you're looking to do complex ajaxy things with menus,
+this is likely the option you want.
+
+=head2 target [STRING]
+
+Get or set the frame or pseudo-target for this link. something like L<_blank>
+
+=cut
+
+=head2 class [STRING]
+
+Gets or sets the CSS class the link should have in addition to the default
+classes.  This is only used if L</link> isn't specified.
+
+=head2 render_children_inline [BOOLEAN]
+
+Gets or sets whether children are rendered inline as a menu "group" instead
+of a true submenu.  Only used when rendering with YUI for now.
+Defaults to false.
+
+Note that YUI doesn't support rendering nested menu groups, so having direct
+parent/children render_children_inline is likely not going to do what you
+want or expect.
+
+=head2 url
+
+Gets or sets the URL that the menu's link goes to.  If the link
+provided is not absolute (does not start with a "/"), then is is
+treated as relative to it's parent's url, and made absolute.
+
+=cut
+
+sub url {
+    my $self = shift;
+    if (@_) {
+        $self->{url} = shift;
+        $self->{url} = URI->new_abs($self->{url}, $self->parent->url . "/")->as_string
+            if defined $self->{url} and $self->parent and $self->parent->url;
+        $self->{url} =~ s!///!/! if $self->{url};
+    }
+    return $self->{url};
+}
+
+=head2 active [BOOLEAN]
+
+Gets or sets if the menu item is marked as active.  Setting this
+cascades to all of the parents of the menu item.
+
+=cut
+
+sub active {
+    my $self = shift;
+    if (@_) {
+        $self->{active} = shift;
+        $self->parent->active($self->{active}) if defined $self->parent;
+    }
+    return $self->{active};
+}
+
+=head2 child KEY [, PARAMHASH]
+
+If only a I<KEY> is provided, returns the child with that I<KEY>.
+
+Otherwise, creates or overwrites the child with that key, passing the
+I<PARAMHASH> to L<RT::Interface::Web::Menu/new>.  Additionally, the paramhash's
+L</label> defaults to the I<KEY>, and the L</sort_order> defaults to the
+pre-existing child's sort order (if a C<KEY> is being over-written) or
+the end of the list, if it is a new C<KEY>.
+
+If the paramhash contains a key called C<menu>, that will be used instead
+of creating a new RT::Interface::Web::Menu.
+
+
+=cut
+
+sub child {
+    my $self  = shift;
+    my $key   = shift;
+    my $proto = ref $self || $self;
+
+    if ( my %args = @_ ) {
+
+        # Clear children ordering cache
+        delete $self->{children_list};
+
+        my $child;
+        if ( $child = $args{menu} ) {
+            $child->parent($self);
+        } else {
+            $child = $proto->new(
+                {   parent     => $self,
+                    label        => $key,
+                    escape_label => 1,
+                    %args
+                }
+            );
+        }
+        $self->{children}{$key} = $child;
+
+        $child->sort_order( $args{sort_order} || (scalar values %{ $self->{children} })  )
+            unless ($child->sort_order());
+
+        # URL is relative to parents, and cached, so set it up now
+        $child->url( $child->{url} );
+
+        # Figure out the URL
+        my $url
+            = (     defined $child->link
+                and ref $child->link
+                and $child->link->can('url') )
+            ? $child->link->url
+            : $child->url;
+
+        # Activate it
+        if ( defined $url and length $url and Jifty->web->request ) {
+
+            # XXX TODO cleanup for mod_perl
+            my $base_path = Jifty->web->request->path;
+            chomp($base_path);
+
+            $base_path =~ s/index\.html$//;
+            $base_path =~ s/\/+$//;
+            $url       =~ s/\/+$//;
+
+            if ( $url eq $base_path ) {
+                $self->{children}{$key}->active(1);
+            }
+        }
+    }
+
+    return $self->{children}{$key};
+}
+
+=head2 active_child
+
+Returns the first active child node, or C<undef> is there is none.
+
+=cut
+
+sub active_child {
+    my $self = shift;
+    foreach my $kid ($self->children) {
+        return $kid if $kid->active;
+    }
+    return undef;
+}
+
+
+=head2 delete KEY
+
+Removes the child with the provided I<KEY>.
+
+=cut
+
+sub delete {
+    my $self = shift;
+    my $key = shift;
+    delete $self->{children_list};
+    delete $self->{children}{$key};
+}
+
+=head2 children
+
+Returns the children of this menu item in sorted order; as an array in
+array context, or as an array reference in scalar context.
+
+=cut
+
+sub children {
     my $self = shift;
-    return $self->{'root_node'};
+    my @kids;
+    if ($self->{children_list}) {
+        @kids = @{$self->{children_list}};
+    } else {
+        @kids = values %{$self->{children} || {}};
+        @kids = sort {$a->{sort_order} <=> $b->{sort_order}} @kids;
+        $self->{children_list} = \@kids;
+    }
+    return wantarray ? @kids : \@kids;
 }
 
 1;
diff --git a/lib/RT/Interface/Web/Menu/Item.pm b/lib/RT/Interface/Web/Menu/Item.pm
deleted file mode 100644
index e5efa29..0000000
--- a/lib/RT/Interface/Web/Menu/Item.pm
+++ /dev/null
@@ -1,87 +0,0 @@
-# BEGIN BPS TAGGED BLOCK {{{
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 or visit their web page on the internet at
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-#
-#
-# 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 }}}
-
-package RT::Interface::Web::Menu::Item;
-
-
-sub new {
-    my $class = shift;
-    my $self = bless {},$class;
-    $self->{'_attributes'} = {};
-    return($self);
-}
-
-sub label { my $self = shift; $self->_accessor( label => @_) } ;
-sub absolute_url { my $self = shift; $self->_accessor( absolute_url => @_) } ;
-sub rt_path { my $self = shift; $self->_accessor( rt_path => @_) } ;
-sub hilight { my $self = shift; $self->_accessor( hilight => @_);
-              $self->parent->hilight(1);
-            } ;
-sub sort_order { my $self = shift; $self->_accessor( sort_order => @_) } ;
-
-sub add_child {
-}
-
-sub delete {
-}
-
-sub children {
-
-}
-
-sub _accessor {
-    my $self = shift;
-    my $key = shift;
-    if (@_){ 
-        $self->{'attributes'}->{$key} = shift;
-
-    }
-    return $self->{'_attributes'}->{$key};
-}
-
-1;

commit e6e7ae6bd44682cca3fc8092a47f0e7d8018f7b6
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Sep 25 20:15:54 2010 -0400

    first pass of making the toplevel menu use a new menu object

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index c50c1a7..e29e46b 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -65,6 +65,7 @@ package RT::Interface::Web;
 
 use RT::SavedSearches;
 use URI qw();
+use RT::Interface::Web::Menu;
 use RT::Interface::Web::Session;
 use Digest::MD5 ();
 use Encode qw();
@@ -284,6 +285,12 @@ sub MaybeShowNoAuthPage {
     $m->abort;
 }
 
+sub InitializeMenu {
+    $HTML::Mason::Commands::m->notes('menu', RT::Interface::Web::Menu->new());
+
+}
+
+
 =head2 ShowRequestedPage  \%ARGS
 
 This function, called exclusively by RT's autohandler, dispatches
@@ -297,6 +304,8 @@ sub ShowRequestedPage {
 
     my $m = $HTML::Mason::Commands::m;
 
+    InitializeMenu();
+
     SendSessionCookie();
 
     # If the user isn't privileged, they can only see SelfService
@@ -810,6 +819,9 @@ package HTML::Mason::Commands;
 
 use vars qw/$r $m %session/;
 
+sub Menu {
+    return $HTML::Mason::Commands::m->notes('menu');
+}
 
 =head2 loc ARRAY
 
diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index 1665d7b..6f831f4 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -57,7 +57,7 @@ use URI;
 use Scalar::Util qw(weaken);
 
 __PACKAGE__->mk_accessors(qw(
-    label sort_order link target escape_label class render_children_inline
+    title sort_order link target escape_title class render_children_inline
     raw_html
 ));
 
@@ -70,7 +70,7 @@ RT::Interface::Web::Menu - Handle the API for menu navigation
 =head2 new PARAMHASH
 
 Creates a new L<RT::Interface::Web::Menu> object.  Possible keys in the
-I<PARAMHASH> are L</label>, L</parent>, L</sort_order>, L</url>, and
+I<PARAMHASH> are L</title>, L</parent>, L</sort_order>, L</path>, and
 L</active>.  See the subroutines with the respective name below for
 each option's use.
 
@@ -93,7 +93,7 @@ sub new {
 }
 
 
-=head2 label [STRING]
+=head2 title [STRING]
 
 Sets or returns the string that the menu item will be displayed as.
 
@@ -155,23 +155,23 @@ Note that YUI doesn't support rendering nested menu groups, so having direct
 parent/children render_children_inline is likely not going to do what you
 want or expect.
 
-=head2 url
+=head2 path
 
 Gets or sets the URL that the menu's link goes to.  If the link
 provided is not absolute (does not start with a "/"), then is is
-treated as relative to it's parent's url, and made absolute.
+treated as relative to it's parent's path, and made absolute.
 
 =cut
 
-sub url {
+sub path {
     my $self = shift;
     if (@_) {
-        $self->{url} = shift;
-        $self->{url} = URI->new_abs($self->{url}, $self->parent->url . "/")->as_string
-            if defined $self->{url} and $self->parent and $self->parent->url;
-        $self->{url} =~ s!///!/! if $self->{url};
+        $self->{path} = shift;
+        $self->{path} = URI->new_abs($self->{path}, $self->parent->path . "/")->as_string
+            if defined $self->{path} and $self->parent and $self->parent->path;
+        $self->{path} =~ s!///!/! if $self->{path};
     }
-    return $self->{url};
+    return $self->{path};
 }
 
 =head2 active [BOOLEAN]
@@ -196,7 +196,7 @@ If only a I<KEY> is provided, returns the child with that I<KEY>.
 
 Otherwise, creates or overwrites the child with that key, passing the
 I<PARAMHASH> to L<RT::Interface::Web::Menu/new>.  Additionally, the paramhash's
-L</label> defaults to the I<KEY>, and the L</sort_order> defaults to the
+L</title> defaults to the I<KEY>, and the L</sort_order> defaults to the
 pre-existing child's sort order (if a C<KEY> is being over-written) or
 the end of the list, if it is a new C<KEY>.
 
@@ -222,8 +222,8 @@ sub child {
         } else {
             $child = $proto->new(
                 {   parent     => $self,
-                    label        => $key,
-                    escape_label => 1,
+                    title        => $key,
+                    escape_title => 1,
                     %args
                 }
             );
@@ -234,28 +234,28 @@ sub child {
             unless ($child->sort_order());
 
         # URL is relative to parents, and cached, so set it up now
-        $child->url( $child->{url} );
+        $child->path( $child->{path} );
 
         # Figure out the URL
-        my $url
+        my $path
             = (     defined $child->link
                 and ref $child->link
-                and $child->link->can('url') )
-            ? $child->link->url
-            : $child->url;
+                and $child->link->can('path') )
+            ? $child->link->path
+            : $child->path;
 
         # Activate it
-        if ( defined $url and length $url and Jifty->web->request ) {
+        if ( defined $path and length $path ) {
 
             # XXX TODO cleanup for mod_perl
-            my $base_path = Jifty->web->request->path;
+            my $base_path = '';#Jifty->web->request->path;
             chomp($base_path);
 
             $base_path =~ s/index\.html$//;
             $base_path =~ s/\/+$//;
-            $url       =~ s/\/+$//;
+            $path       =~ s/\/+$//;
 
-            if ( $url eq $base_path ) {
+            if ( $path eq $base_path ) {
                 $self->{children}{$key}->active(1);
             }
         }
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 9c5f78d..7107599 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -45,6 +45,15 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+<div id="new-menu">
+<pre>
+<ul>
+% for my $child (Menu->children) {
+<li><a href="<%RT->Config->Get('WebPath')%>/<%$child->path%>"><%$child->title%></a></li>
+% }
+</ul>
+</pre>
+</div>
 <ul<% !$level ? ' id="system-menu"' : ''|n %><% $menu_class ? qq[ class="$menu_class"] : ''|n %>>
 <div<% $menu_class ? qq[ class="$menu_class"] : ''|n %>><div class="wrapper">
 <%perl>
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 833ab9c..19955d8 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -65,44 +65,29 @@ my $basetopactions = {
 	B => { html => $m->scomp('/Elements/SimpleSearch') 
 		}
 	};
-my $basetabs = {     A => { title => loc('Homepage'),
-                           path => 'index.html',
-                         },
-                    Ab => { title => loc('Simple Search'),
-                        path => 'Search/Simple.html'
-                         },
-                    B => { title => loc('Tickets'),
-                        path => 'Search/Build.html'
-                      },
-                    C => { title => loc('Tools'),
-                           path => 'Tools/index.html'
-                         },
-                 };
 
-if ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', 
-				       Object => $RT::System )) {
-    $basetabs->{E} = { title => loc('Configuration'),
-                       path => 'Admin/',
-		     };
-}
+Menu->child( A => title => loc('Homepage'), path => 'index.html' );
+Menu->child( Ab   => title => loc('Simple Search'), path => 'Search/Simple.html' );
+Menu->child( B => title => loc('Tickets'), path => 'Search/Build.html' );
+Menu->child( C => title => loc('Tools'),   path => 'Tools/index.html' );
 
-if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', 
-				       Object => $RT::System )) {
-    $basetabs->{K} = { title => loc('Preferences'),
-                       path => 'Prefs/Other.html'
-		     };
+if ( $session{'CurrentUser'}->HasRight( Right  => 'ShowConfigTab', Object => $RT::System )) {
+    Menu->child( E => title => loc('Configuration'), path => 'Admin/' );
 }
 
-if ($session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab',
-                        Object => $RT::System )) {
-    $basetabs->{P} = { title => loc('Approval'),
-                        path => 'Approvals/'
-            };
+if ( $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf', Object => $RT::System )) {
+    Menu->child( K    => title => loc('Preferences'), path => 'Prefs/Other.html' );
 }
 
-if (!defined $toptabs) {
-   $toptabs = $basetabs;
+if (
+     $session{'CurrentUser'}->HasRight( Right  => 'ShowApprovalsTab',
+                                        Object => $RT::System )
+   )
+{
+    Menu->child( P    => title => loc('Approval'),
+                 path => 'Approvals/' );
 }
+
 if (!defined $topactions) {
    $topactions = $basetopactions;
 }

commit dbb2287c7e2917167d923326e3c12fd5903be373
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Oct 13 06:45:07 2010 -0400

    first pass at backporting the RT 3.999 stuff

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 2c06e10..647db67 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2194,6 +2194,8 @@ Set(@JSFilesInHead, qw/
     titlebox-state.js
     util.js
     userautocomplete.js
+    superfish.js
+    supersubs.js
 /);
 
 =item C<$JSMinPath>
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index e29e46b..1c8d276 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -287,6 +287,7 @@ sub MaybeShowNoAuthPage {
 
 sub InitializeMenu {
     $HTML::Mason::Commands::m->notes('menu', RT::Interface::Web::Menu->new());
+    $HTML::Mason::Commands::m->notes('page-menu', RT::Interface::Web::Menu->new());
 
 }
 
@@ -823,6 +824,10 @@ sub Menu {
     return $HTML::Mason::Commands::m->notes('menu');
 }
 
+sub PageMenu {
+    return $HTML::Mason::Commands::m->notes('page-menu');
+}
+
 =head2 loc ARRAY
 
 loc is a nice clean global routine which calls $session{'CurrentUser'}->loc()
diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index 6f831f4..10907b3 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -292,6 +292,23 @@ sub delete {
     delete $self->{children}{$key};
 }
 
+
+=head2 has_children
+
+Returns true if there are any children on this menu
+
+=cut
+
+sub has_children {
+    my $self = shift;
+    if (@{ $self->children}) {
+        return 1
+    } else {
+        return 0;
+    }
+}
+
+
 =head2 children
 
 Returns the children of this menu item in sorted order; as an array in
diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
index 5eab2ea..32a515d 100644
--- a/lib/RT/SharedSetting.pm
+++ b/lib/RT/SharedSetting.pm
@@ -295,6 +295,9 @@ sub Id {
     return $self->{'Id'};
 }
 
+*id = \&Id;
+
+
 =head2 Privacy
 
 Returns the principal object to whom this shared setting belongs, in a string
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 7107599..184b757 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -45,85 +45,16 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<div id="new-menu">
-<pre>
-<ul>
-% for my $child (Menu->children) {
-<li><a href="<%RT->Config->Get('WebPath')%>/<%$child->path%>"><%$child->title%></a></li>
+<ul <%$id ? "id=\"$id\"" : '' |n%> class="sf-menu sf-navbar">
+% for my $child ($menu->children) {
+<li><a href="<%RT->Config->Get('WebPath')%><%$child->path%>"><%$child->title%></a></li>
+% next unless ($child->has_children);
+<& Menu, menu => $child &>
 % }
 </ul>
-</pre>
-</div>
-<ul<% !$level ? ' id="system-menu"' : ''|n %><% $menu_class ? qq[ class="$menu_class"] : ''|n %>>
-<div<% $menu_class ? qq[ class="$menu_class"] : ''|n %>><div class="wrapper">
-<%perl>
- my $sep         = 0;
- my $postsep     = 0;
- my $accesskey   = 1;
- 
- $count = 0;
- $class = {};
-
-my @tabs = sort keys %$toptabs;
- foreach $tab (@tabs) {
-     $count++;
-
-     my $current = $current_toptab || '';
-     my $path    = $toptabs->{$tab}->{'path'} || "";
-     my $target  = $toptabs->{$tab}->{'target'} || "";
-     
-     $path    =~ s#/index.html$##gi;
-     $current =~ s#/index.html$##gi;
-     
-     $sep     = $toptabs->{$tab}->{'separator'} ? 1 : 0;
-
-     my @aclass;
-     push @aclass, 'selected' if $path eq $current;
-     push @aclass, 'odd' if $level % 2;
-     $class->{a} = join ' ', @aclass;
-
-     my @li;
-     push @li, 'first' if $count == 1;
-     push @li, 'pre-separator' if $sep;
-     push @li, 'post-separator' if $postsep;
-     push @li, 'last' if ( $tab eq $tabs[-1]);
-     $class->{li} = join ' ', @li;
-
-     my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^(?:https?|mailto):/i
-         ? $toptabs->{$tab}->{'path'} || ''
-         : RT->Config->Get('WebPath') . "/" . $toptabs->{$tab}->{'path'};
-     
-</%perl>
-    <li<% $class->{'li'} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%><a href="<% $url %>" <% $class->{a} && qq[ class="$class->{a}"] |n %> <% $target && qq[ target="$target"] |n %> <% !$level && " accesskey='".$accesskey++."'" |n %>><% $toptabs->{$tab}->{'title'}%></a>
-%
-%# Second-level items
-%     if ($toptabs->{$tab}->{'subtabs'}
-%         and keys %{$toptabs->{$tab}->{'subtabs'}})
-%     {
-          <& /Elements/Menu, level => $level+1, 
-                             current_toptab => $toptabs->{$tab}->{'current_subtab'},
-                             toptabs => $toptabs->{$tab}->{'subtabs'},
-                             last_level => $toptabs->{$tab}->{last_system_menu_level} &>
-%     }
-  </li>
-%     if ($sep) {
-  <li class="separator">&#183;&#183;&#183;</li>
-%     }
-%
-%     $postsep = $sep;
-% }
-</div></div>
-</ul>
-
 <%INIT>
-my ($tab, $class, $count, @ul);
-push @ul, 'last-menu-level' if $last_level;
-push @ul, 'odd' if $level % 2;
-my $menu_class = join ' ', @ul;
 </%INIT>
 <%ARGS>
-$toptabs => {}
-$current_toptab => ''
-$level => 0
-$last_level => 0
+$menu
+$id => undef
 </%ARGS>
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 0ba9529..dc7b8eb 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -55,69 +55,20 @@
 </div>
 
 % if ( $show_menu ) {
-<div id="nav">
-<& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
-</div>
-% }
+<div id="nav"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
 
+<div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu' &></div>
+% }
+<script>
+  jQuery("nav>ul").superfish();
+</script>
 <div id="header">
 <h1><% $title %></h1>
-<div id="page-navigation">
 % my $sep       = 0;
 % my $postsep   = 0;
 % my $count     = 0;
 % my $class     = { };
 % 
-  <ul id="page-menu" <% (($actions && %$actions) || ($subactions && %$subactions)) && q[ class="actions-present"] | n %>>
-    <div><div><div>
-<%perl>
- if ($page_tabs) {
-     my @tabs = ( sort grep { $_ !~ /^(?:current_toptab|this)$/ } keys %{$page_tabs});
-     my $tab_idx = -1;
-     foreach my $tab ( @tabs ) {
-         $count++;
-         $tab_idx++;
-
-         my $current = $page_tabs->{current_toptab} || "";
-         my $path    = $page_tabs->{$tab}->{'path'} || "";
-         
-         $path    =~ s#(/index\.html)?(\?)?$##gi;
-         $current =~ s#(/index\.html)?(\?)?$##gi;
-         
-         $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0;
-
-         my $next_tab = $tabs[$tab_idx+1];
-         if ($next_tab && $toptabs->{$next_tab}->{'pre_separator'}) {
-            $sep = 1;
-         }
-
-         $class->{a} = $path eq $current ? ' class="selected"' : undef;
-
-         my @li;
-         push @li, 'first' if $count == 1;
-         push @li, 'pre-separator' if $sep;
-         push @li, 'post-separator' if $postsep;
-         push @li, 'last' if $tab eq $tabs[-1];
-         $class->{li} = join ' ', @li;
-
-         my $href = $page_tabs->{$tab}->{'path'} || "";
-         $href = RT->Config->Get('WebPath') .'/'. $href
-            unless $path =~ /^\w+:/;
-         my $target = $page_tabs->{$tab}->{'target'} || '';
-         $target = $m->interp->apply_escapes( $target, 'h' );
-</%perl>
-    <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "&#183; "|n%><a href="<% $href %>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %><% $target? " target='$target'": '' |n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
-%
-%         if ($sep) {
-    <li class="separator">&#183;&#183;&#183;</li>
-%         }
-%         $postsep = $sep;
-%     }
-% } else {
-&nbsp;
-% }
-    </div></div></div>
-  </ul>
 
 % if (($actions && %$actions) || ($subactions && %$subactions)) {
   <ul id="actions-menu">
@@ -170,7 +121,6 @@
   </ul>
 % }
 </div>
-</div>
 <div id="body">
 % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
 % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 19955d8..1469194 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -2,10 +2,10 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+%# This software is CopyRight (c) 1996-2010 Best Practical Solutions, LLC
 %#                                          <jesse at bestpractical.com>
 %#
-%# (Except where explicitly superseded by other copyright notices)
+%# (Except where explicitly superseded by other copyRight notices)
 %#
 %#
 %# LICENSE:
@@ -29,7 +29,7 @@
 %#
 %# CONTRIBUTION SUBMISSION POLICY:
 %#
-%# (The following paragraph is not intended to limit the rights granted
+%# (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
@@ -38,7 +38,7 @@
 %# 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
+%# 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
@@ -58,46 +58,439 @@
 &>
 <a name="skipnav" id="skipnav" accesskey="8"></a>
 <%INIT>
-my $action;
-my $basetopactions = {
-	A => { html => $m->scomp('/Elements/CreateTicket')	
-		},
-	B => { html => $m->scomp('/Elements/SimpleSearch') 
-		}
+
+my $request_path = $HTML::Mason::Commands::m->request_comp->path;
+
+my $query_string = sub { my %args = @_; my $u = URI->new(); $u->query_form(%args); return $u->query };
+
+my $PREFS_NAV = RT::Interface::Web::Menu->new( { title => loc('Preferences'), path => '/Prefs/Other.html' } );
+$PREFS_NAV->child( loc('Settings'),       path => '/Prefs/Other.html', );
+$PREFS_NAV->child( loc('About me'),       path => '/User/Prefs.html', );
+$PREFS_NAV->child( loc('Search options'), path => '/Prefs/SearchOptions.html', );
+$PREFS_NAV->child( loc('RT at a glance'), path => '/Prefs/MyRT.html', );
+
+
+if ($request_path =~ qr{.*} ) {
+    Menu->child( loc('Homepage'),      path => '/' );
+    my $tickets = Menu->child( loc('Tickets'),       path => '/Search/Build.html' );
+    $tickets->child( new => title => loc('New Search')  => path => "/Search/Build.html?NewQuery=1" );
+    my $new = $tickets->child(create => title => loc('New ticket'), path => '/Ticket/Create.html');
+
+    my $q = RT::Queues->new($session{'CurrentUser'});
+    $q->FindAllRows;
+    while (my $queue = $q->Next) {
+            next unless $queue->CurrentUserHasRight('CreateTicket');
+            $new->child( $queue->id => title => $queue->Name, path => '/Ticket/Create.html?Queue='.$queue->id);
+    }
+
+    my $tools = Menu->child( loc('Tools'), path => '/Tools/index.html' );
+    $tools->child( loc('Dashboards'), path => '/Dashboards/index.html' );
+
+    my $reports = $tools->child( loc('Reports'), path => '/Tools/Reports/index.html' );
+    $reports->child( loc('Resolved by owner'),       path => '/Tools/Reports/ResolvedByOwner.html', );
+    $reports->child( loc('Resolved in date range'),  path => '/Tools/Reports/ResolvedByDates.html', );
+    $reports->child( loc('Created in a date range'), path => '/Tools/Reports/CreatedByDates.html', );
+
+    $tools->child( loc('My Day'), path => '/Tools/MyDay.html' );
+    if ( $session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
+    {
+        $tools->child( loc('Approval'), path => '/Approvals/' );
+    }
+
+    if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
+    {
+        my $admin = Menu->child( Config => title => loc('Configuration'), path => '/Admin/' );
+        $admin->child( loc('Users'),         path => '/Admin/Users/', );
+        $admin->child( loc('Groups'),        path => '/Admin/Groups/', );
+        $admin->child( loc('Queues'),        path => '/Admin/Queues/', );
+        $admin->child( loc('Custom Fields'), path => '/Admin/CustomFields/', );
+        $admin->child( loc('Rules'),         path => '/admin/rules/', );
+
+        my $admin_global = $admin->child( loc('Global'), path => '/Admin/Global/', );
+
+        $admin_global->child( loc('Templates'), path => '/Admin/Global/Templates.html', );
+        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
+        {
+            $workflows->child( loc('Overview')     => path => "/Admin/Global/Workflows/index.html" );
+            $workflows->child( loc('Localization') => path => "/Admin/Global/Workflows/Localization.html" );
+            $workflows->child( loc('Mappings')     => path => "/Admin/Global/Workflows/Mappings.html" );
+        }
+
+        my $cfadmin = $admin_global->child( loc('Custom Fields'), path => '/Admin/Global/CustomFields/index.html', );
+        {
+            $cfadmin->child(
+                loc('Users') => text => loc('Select custom fields for all users'),
+               path => '/Admin/Global/CustomFields/Users.html'
+            );
+
+            $cfadmin->child(
+                loc('Groups') => text => loc('Select custom fields for all user groups'),
+               path => '/Admin/Global/CustomFields/Groups.html'
+            );
+
+            $cfadmin->child(
+                loc('Queues') => text => loc('Select custom fields for all queues'),
+               path => '/Admin/Global/CustomFields/Queues.html'
+            );
+
+            $cfadmin->child(
+                loc('Tickets') => text => loc('Select custom fields for tickets in all queues'),
+                path => '/Admin/Global/CustomFields/Queue-Tickets.html'
+            );
+
+            $cfadmin->child(
+                loc('Ticket Transactions') => text => loc('Select custom fields for transactions on tickets in all queues'),
+                path => 'Admin/Global/CustomFields/Queue-Transactions.html'
+            );
+
+        }
+
+        $admin_global->child( loc('Group Rights'),   path => '/Admin/Global/GroupRights.html', );
+        $admin_global->child( loc('User Rights'),    path => '/Admin/Global/UserRights.html', );
+        $admin_global->child( loc('RT at a glance'), path => '/Admin/Global/MyRT.html', );
+        $admin_global->child( loc('System'),         path => '/Admin/Global/System.html', );
+
+        my $admin_tools = $admin->child( loc('Tools'), path => '/Admin/Tools/', );
+        $admin_tools->child( loc('System Configuration'), path => '/Admin/Tools/Configuration.html', );
+        $admin_tools->child( loc('Shredder'),             path => '/Admin/Tools/Shredder', );
+    }
+    if ($session{'CurrentUser'}->UserObj
+        && $session{'CurrentUser'}->HasRight(
+            Right  => 'ModifySelf',
+            Object => $RT::System
+        )
+        )
+    {
+
+     if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
+
+        Menu->child( 'Preferences' => menu => $PREFS_NAV, order => 99 );
+    }
+     }
+
+
+
+
 	};
 
-Menu->child( A => title => loc('Homepage'), path => 'index.html' );
-Menu->child( Ab   => title => loc('Simple Search'), path => 'Search/Simple.html' );
-Menu->child( B => title => loc('Tickets'), path => 'Search/Build.html' );
-Menu->child( C => title => loc('Tools'),   path => 'Tools/index.html' );
+if ($request_path =~ qr'Dashboards/?' ) {
+    require RT::Dashboard;    # not a record class, so not autoloaded :/
+    PageMenu->child( loc('Select'), path => "/Dashboards/index.html" );
+    my $dashboard = RT::Dashboard->new($session{CurrentUser});
+    if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
+        PageMenu->child( loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
+    }
+};
 
-if ( $session{'CurrentUser'}->HasRight( Right  => 'ShowConfigTab', Object => $RT::System )) {
-    Menu->child( E => title => loc('Configuration'), path => 'Admin/' );
-}
 
-if ( $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf', Object => $RT::System )) {
-    Menu->child( K    => title => loc('Preferences'), path => 'Prefs/Other.html' );
-}
+if ($request_path =~ qr'Dashboards/(\d*)?' ) {
+    if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
+        my $obj = RT::Dashboard->new($session{'CurrentUser'});
+        $obj->LoadById($id);
+        if ( $obj and $obj->id ) {
+            my $tabs = PageMenu->child( "this" => title => $obj->Name, path => "/Dashboards/Modify.html?id=" . $obj->id );
+            $tabs->child( loc('Basics'),       path => "/Dashboards/Modify.html?id=" . $obj->id );
+            $tabs->child( loc('Queries'),      path => "/Dashboards/Queries.html?id=" . $obj->id );
+            $tabs->child( loc('Subscription'), path => "/Dashboards/Subscription.html?dashboard_id=" . $obj->id )
+                if $obj->CurrentUserCanSubscribe;
+            $tabs->child( loc('Show'), path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
+
+        }
+    }
+};
+
+if ($request_path =~ qr'/SelfService' ) {
+
+    my $queues = RT::Queues->new($session{'CurrentUser'});
+    $queues->FindAllRows;
+
+    my $queue_count = 0;
+    my $queue_id    = 1;
+
+    while ( my $queue = $queues->Next ) {
+        next unless $queue->CurrentUserHasRight('CreateTicket');
+        $queue_id = $queue->id;
+        $queue_count++;
+        last if ( $queue_count > 1 );
+    }
+
+    my $TOP = Menu();
+
+    $TOP->child( loc('Open tickets'),   path => '/SelfService/', );
+    $TOP->child( loc('Closed tickets'), path => '/SelfService/Closed.html', );
+    if ( $queue_count > 1 ) {
+        $TOP->child( loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
+    } else {
+        $TOP->child( loc('New ticket'), path => '/SelfService/Create.html?queue=' . $queue_id );
+    }
+
+    if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
+        $TOP->child( loc('Preferences'), path => '/SelfService/Prefs.html' );
+    }
+
+    # XXX TODO RENDER GOTO TICKET WIDGET
+    #Menu->child( B =>  html => $m->scomp('GotoTicket'))
+};
+
+if ($request_path =~ qr'Admin/Queues' ) {
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue' ) ) {
+        PageMenu->child( loc('Select'), path => "/Admin/Queues/" );
+        PageMenu->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
+    }
+    if ( my $id = $m->request_args->{'id'} ) {
+        my $queue_obj = RT::Queue->new($session{'CurrentUser'});
+        $queue_obj->Load($id);
+
+        my $queue = PageMenu->child( $queue_obj->Name => path => "/Admin/Queues/Modify.html?id=" . $id );
+        $queue->child( loc('Basics'),    path => "/Admin/Queues/Modify.html?id=" . $id );
+        $queue->child( loc('Watchers'),  path => "/Admin/Queues/People.html?id=" . $id );
+        $queue->child( loc('Templates'), path => "/Admin/Queues/Templates.html?id=" . $id );
+
+        $queue->child( loc('Ticket Custom Fields'),
+            path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id=' . $id );
+
+        $queue->child( loc('Transaction Custom Fields'),
+            path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket-RT::Transaction&id=' . $id );
+
+        $queue->child( loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=" . $id );
+        $queue->child( loc('User Rights'),  path => "/Admin/Queues/UserRights.html?id=" . $id );
+    }
+};
+
+if ($request_path =~ qr'/Admin/Users' ) {
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) ) {
+        PageMenu->child( loc('Select'), path => "/Admin/Users/" );
+        PageMenu->child( loc('Create'), path => "/Admin/Users/Modify.html?Create=1", separator => 1 );
+    }
+    if ( my $id = $m->request_args->{'id'} ) {
+        my $obj = RT::User->new($session{'CurrentUser'});
+        $obj->Load($id);
+        my $tabs = PageMenu->child( 'current' => title => $obj->Name, path => "/Admin/Users/Modify.html?id=" . $id, );
+        $tabs->child( loc('Basics'),         path => "/Admin/Users/Modify.html?id=" . $id );
+        $tabs->child( loc('Memberships'),    path => "/Admin/Users/Memberships.html?id=" . $id );
+        $tabs->child( loc('History'),        path => "/Admin/Users/History.html?id=" . $id );
+        $tabs->child( loc('RT at a glance'), path => "/Admin/Users/MyRT.html?id=" . $id );
+        if ( RT->config->get('gnupg')->{'enable'} ) {
+            $tabs->child( loc('GnuPG'), path => "/Admin/Users/GnuPG.html?id=" . $id );
+        }
+    }
+
+};
+
+if ($request_path =~ qr'Admin/Groups' ) {
+
+    PageMenu->child( loc('Select') => path => "/Admin/Groups/" );
+    PageMenu->child( loc('Create') => path => "/Admin/Groups/Modify.html?Create=1", separator => 1 );
+    if ( my $id = $m->request_args->{'id'} ) {
+        my $obj = RT::User->new($session{'CurrentUser'});
+        $obj->Load($id);
+        my $tabs = PageMenu->child( $obj->Name, path => "/Admin/CustomFields/Modify.html?id=" . $id );
+        $tabs->child( loc('Basics')       => path => "/Admin/Groups/Modify.html?id=" . $obj->id );
+        $tabs->child( loc('Members')      => path => "/Admin/Groups/Members.html?id=" . $obj->id );
+        $tabs->child( loc('Group Rights') => path => "/Admin/Groups/GroupRights.html?id=" . $obj->id );
+        $tabs->child( loc('User Rights')  => path => "/Admin/Groups/UserRights.html?id=" . $obj->id );
+        $tabs->child( loc('History')      => path => "/Admin/Groups/History.html?id=" . $obj->id );
+    }
+};
+
+if ($request_path =~ qr'Admin/CustomFields/' ) {
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) ) {
+        PageMenu->child( loc('Select'), path => "/Admin/CustomFields/" );
+        PageMenu->child( loc('Create') => path => "/Admin/CustomFields/Modify.html?Create=1", );
+
+    }
+    if ( my $id = $m->request_args->{'id'} ) {
+        my $obj = RT::CustomField->new($session{'CurrentUser'});
+        $obj->Load($id);
+        my $tabs = PageMenu->child( $obj->Name, path => "/Admin/CustomFields/Modify.html?id=" . $id );
+
+        $tabs->child( loc('Basics')       => path => "/Admin/CustomFields/Modify.html?id=" . $id );
+        $tabs->child( loc('Group Rights') => path => "/Admin/CustomFields/GroupRights.html?id=" . $id );
+        $tabs->child( loc('User Rights')  => path => "/Admin/CustomFields/UserRights.html?id=" . $id );
+
+        if ( $obj->lookup_type =~ /^RT::Queue-/io ) {
+            $tabs->child( loc('Applies to'), path => "/Admin/CustomFields/Objects.html?id=" . $id );
+        }
+
+    }
+
+};
+
+if ($request_path =~ qr'Admin/Rules' ) {
+    PageMenu->child( loc('Select'), path => "/Admin/Rules/" );
+    PageMenu->child( loc('Create'), path => "/Admin/Rules/Modify.html?Create=1" );
+};
+
+if ($request_path =~ qr'(?:Ticket|Search)/' ) {
+    if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
+        my $id  = $1;
+        my $obj = RT::Ticket->new($session{'CurrentUser'});
+        $obj->Load($id);
+
+        my $tabs = PageMenu(); #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
+
+        $tabs->child( loc('Display') => path => "/Ticket/Display.html?id=" . $id );
+
+        $tabs->child( loc('History') => path => "/Ticket/History.html?id=" . $id );
+        $tabs->child( loc('Basics')  => path => "/Ticket/Modify.html?id=" . $id );
+
+        $tabs->child( loc('Dates') => path => "/Ticket/ModifyDates.html?id=" . $id );
+        $tabs->child( loc('People'), path => "/Ticket/ModifyPeople.html?id=" . $id );
+        $tabs->child( loc('Links'),  path => "/Ticket/ModifyLinks.html?id=" . $id );
+        $tabs->child( loc('Jumbo'),  path => "/Ticket/ModifyAll.html?id=" . $id );
+
+        my %can = ( ModifyTicket => $obj->CurrentUserHasRight('ModifyTicket') );
+
+        if ( $can{'ModifyTicket'} or $obj->CurrentUserHasRight('ReplyToTicket') ) {
+            $tabs->child( loc('Reply'), path => "/Ticket/Update.html?action=respond&id=" . $id );
+        }
+
+        if ( $can{'ModifyTicket'} ) {
+            my $current = $obj->Status;
+            my $schema  = $obj->QueueObj->lifecycle;
+            my $i       = 1;
+            foreach my $next ( $schema->transitions($current) ) {
+                my $action = $schema->transition_action( $current => $next );
+                next if $action eq 'hide';
+
+                my $url = '/Ticket/';
+                if ($action) {
+
+                    $url .= "Update.html?" . $query_string->( Action => $action, DefaultStatus => $next, id => $id );
+                } else {
+
+                    #$url .= "Display.html?" .$query_string->(Status => $next, id => $id );
+                }
+                $tabs->child( loc( $schema->transition_label( $current => $next ) ) => path => $url );
+            }
+
+        }
+        if ( $obj->CurrentUserHasRight('OwnTicket') ) {
+            if ( $obj->OwnerObj->id == RT->Nobody->id ) {
+                $tabs->child( loc('Take') => path => "/Ticket/Display.html?action=take&id=" . $id )
+                    if ( $can{'ModifyTicket'} or $obj->CurrentUserHasRight('TakeTicket') );
+            } elsif ( $obj->OwnerObj->id != $session{'CurrentUser'}->id ) {
+                $tabs->child( loc('Steal') => path => "/Ticket/Display.html?action=steal&id=" . $id )
+                    if ( $can{'ModifyTicket'}
+                    or $obj->CurrentUserHasRight('StealTicket') );
+            }
+        }
+
+        if ( $can{'ModifyTicket'} or $obj->CurrentUserHasRight('CommentOnTicket') ) {
+            $tabs->child( loc('Comment') => path => "/Ticket/Update.html?action=comment&id=" . $id );
+        }
+
+        # $actions->{'_ZZ'} = { html => $m->scomp( '/Ticket/Elements/Bookmark', id => $obj->id ), };
+
+        if ( defined $session{"tickets"} ) {
+
+            # we have to update session data if we get new ItemMap
+            my $updatesession = 1 unless ( $session{"tickets"}->{'item_map'} );
+
+            my $item_map = $session{"tickets"}->ItemMap;
+
+            if ($updatesession) {
+                $session{"tickets"}->PrepForSerialization();
+            }
+
+            # Don't display prev links if we're on the first ticket
+            if ( $item_map->{$id}->{prev} ) {
+                PageMenu->child(
+                    '<< ' . loc('First') => class => "nav",
+                   path => "/Ticket/Display.html?id=" . $item_map->{first}
+                );
+                PageMenu->child(
+                    '< ' . loc('Prev') => class => "nav",
+                   path => "/Ticket/Display.html?id=" . $item_map->{$id}->{prev}
+                );
+
+                # Don't display next links if we're on the last ticket
+                if ( $item_map->{$id}->{next} ) {
+                    PageMenu->child(
+                        loc('next') . ' >' => class => "nav",
+                       path => "/Ticket/Display.html?id=" . $item_map->{$id}->{next}
+                    );
+                    PageMenu->child(
+                        loc('Last') . ' >>' => class => "nav",
+                       path => "/Ticket/Display.html?id=" . $item_map->{last}
+                    );
+                }
+            }
+        }
+    }
+    my $args      = '';
+    my $has_query = '';
+
+    my $search = $session{"CurrentSearchHash"} || {};
+    my $search_id = $m->request_args->{'saved_search_id'} || $search->{'searchid'} || '';
+
+    $has_query = 1 if ( $m->request_args->{'query'} or $search->{'query'} );
+
+    my %query_args = (
+
+        saved_search_id => ( $search_id eq 'new' ) ? undef : $search_id,
+        query    => $m->request_args->{'query'}    || $search->{'query'},
+        format   => $m->request_args->{'format'}   || $search->{'format'},
+        order_by => $m->request_args->{'order_by'} || $search->{'order_by'},
+        order    => $m->request_args->{'order'}    || $search->{'order'},
+        page     => $m->request_args->{'page'}     || $search->{'page'},
+        rows_per_page => (
+            defined $m->request_args->{'rows_per_page'}
+            ? $m->request_args->{'rows_per_page'}
+            : $search->{'rows_per_page'}
+        )
+    );
+
+    $args = "?" . $query_string->(%query_args);
+
+    PageMenu->child( loc('Edit Search') => path => "/Search/Build.html" . ( ($has_query) ? $args : '' ) );
+    PageMenu->child( loc('Advanced')    => path => "/Search/Edit.html$args" );
+
+    if ($has_query) {
+        if ($request_path =~ qr|^Search/Results.html| &&    #XXX TODO better abstraction
+            $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )
+            )
+        {
+            my $shred_args = URI->new->query_param(
+                search          => 1,
+                plugin          => 'Tickets',
+                'Tickets:query' => $query_args{'query'},
+                'Tickets:limit' => $query_args{'rows_per_page'}
+            );
+
+            PageMenu->child( 'shredder' => title => loc('Shredder'), path => 'Admin/Tools/Shredder/?' . $shred_args );
+        }
+
+        PageMenu->child( loc('Show Results') => path => "/Search/Results.html$args" );
+
+        PageMenu->child( loc('Bulk Update') => path => "/Search/Bulk.html$args" );
+
+    }
+};
+
+if ( $request_path =~ qr'User/Group' ) {
+    if ( my $id = $m->request_args->{'id'} ) {
+        my $obj = RT::User->new( $session{'CurrentUser'} );
+        $obj->Load($id);
+        my $group = PageMenu->child(
+                           path => "/User/Groups/Modify.html?id=" . $obj->id );
+        $group->child( loc('Basics'),
+                       path => "/User/Groups/Modify.html?id=" . $obj->id );
+        $group->child( loc('Members'),
+                       path => "/User/Groups/Members.html?id=" . $obj->id );
+
+    }
+    PageMenu( loc('Select') => path => "/User/Groups/index.html" );
+    PageMenu( loc('Create') => path => "/User/Groups/Modify.html?Create=1",
+              separator   => 1 );
 
-if (
-     $session{'CurrentUser'}->HasRight( Right  => 'ShowApprovalsTab',
-                                        Object => $RT::System )
-   )
-{
-    Menu->child( P    => title => loc('Approval'),
-                 path => 'Approvals/' );
 }
 
-if (!defined $topactions) {
-   $topactions = $basetopactions;
+if ($request_path =~ qr'Prefs' ) {
+
+    PageMenu->child( 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html' );
 }
-                    
-# Now let callbacks add their extra tabs
-$m->callback(
-    topactions => $topactions, 
-    toptabs    => $toptabs,
-    %ARGS
-);
+
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/NoAuth/css/base/main.css b/share/html/NoAuth/css/base/main.css
index af80183..9c63d85 100644
--- a/share/html/NoAuth/css/base/main.css
+++ b/share/html/NoAuth/css/base/main.css
@@ -54,6 +54,9 @@
 @import "theme-editor.css";
 @import "ticket.css";
 @import "tablesorter.css";
+ at import "superfish.css";
+ at import "superfish-navbar.css";
+ at import "superfish-vertical.css";
 
 % $m->callback(CallbackName => 'End');
 
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index eb71cdb..82d57e4 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -45,6 +45,8 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+
+% return 0;
 div#nav {
  position: absolute;
  left: 0;

commit ad6b2ace9f193ee88111728d0b283d7aefdd7a7f
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 18 12:01:34 2010 +0900

    basic superfish menuing.

diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 184b757..d47abdb 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -45,11 +45,12 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<ul <%$id ? "id=\"$id\"" : '' |n%> class="sf-menu sf-navbar">
+<ul <%$id ? "id=\"$id\"" : '' |n%> <% $toplevel? 'class="sf-menu sf-js-enabled sf-shadow' : '' |n %>">
 % for my $child ($menu->children) {
-<li><a href="<%RT->Config->Get('WebPath')%><%$child->path%>"><%$child->title%></a></li>
+<li><a href="<%RT->Config->Get('WebPath')%><%$child->path%>"><%$child->title%></a>
 % next unless ($child->has_children);
-<& Menu, menu => $child &>
+<& Menu, menu => $child, toplevel => 0 &>
+</li>
 % }
 </ul>
 <%INIT>
@@ -57,4 +58,5 @@
 <%ARGS>
 $menu
 $id => undef
+$toplevel => 1
 </%ARGS>
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index dc7b8eb..3dd8a56 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -59,9 +59,12 @@
 
 <div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu' &></div>
 % }
-<script>
-  jQuery("nav>ul").superfish();
+<script type="text/javascript">
+jQuery(document).ready(function(){ jQuery("#app-nav").superfish(); });
+jQuery(document).ready(function(){ jQuery("#page-menu").superfish(); });
+jQuery(document).ready(function(){ jQuery("#actions-menu").superfish(); });
 </script>
+
 <div id="header">
 <h1><% $title %></h1>
 % my $sep       = 0;
@@ -70,56 +73,6 @@
 % my $class     = { };
 % 
 
-% if (($actions && %$actions) || ($subactions && %$subactions)) {
-  <ul id="actions-menu">
-    <div><div><div>
-<%perl>
- $sep       = 0;
- $postsep   = 0;
- $count     = 0;
- $class     = { };
-
- for my $type ($actions, $subactions) {
-
- if ($type && %$type) {
-     my @actions  = sort keys %{$type};
-     my $action_idx = -1;
-     foreach my $action (@actions) {
-         $count++;
-         $action_idx++;
-
-         $sep = $type->{$action}->{'separator'} ? 1 : 0;
-
-         my $next_action = $actions[$action_idx+1];
-         if ($next_action && $type->{$next_action}->{'pre_separator'}) {
-            $sep = 1;
-         }
-
-         my @li;
-         push @li, 'first' if $count == 1;
-         push @li, 'pre-separator' if $sep;
-         push @li, 'post-separator' if $postsep;
-         push @li, 'last' if $action  eq $actions[-1];
-
-         $class->{li} = join ' ', @li;
-</%perl>
-    <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%>
-%         if ($type->{"$action"}->{'html'}) {
-      <% $type->{"$action"}->{'html'} | n %>
-%         } elsif ($type->{$action}->{path})  {
-      <a href="<%RT->Config->Get('WebPath')%>/<%$type->{$action}->{'path'}%>"<% $type->{$action}->{class} && ' class="'.$type->{$action}->{class}.'"' |n %><% $type->{$action}->{id} && ' id="'.$type->{$action}->{id}.'"' |n %>><%$type->{$action}->{'title'}%></a>
-%         }
-    </li>
-%         if ($sep) {
-    <li class="separator">&#183;&#183;&#183;</li>
-%         }
-%         $postsep = $sep;
-%     }
-% }
-% }
-    </div></div></div>
-  </ul>
-% }
 </div>
 <div id="body">
 % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
diff --git a/share/html/Elements/PersonalQuickbar b/share/html/Elements/PersonalQuickbar
index f815366..6e4aecd 100644
--- a/share/html/Elements/PersonalQuickbar
+++ b/share/html/Elements/PersonalQuickbar
@@ -52,9 +52,6 @@ $Prefs => '/Prefs/Other.html'
     <span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span>
 % if ($session{'CurrentUser'}->Name) {
     <&|/l, "<span>".$session{'CurrentUser'}->Name."</span>" &>Logged in as [_1]</&>
-%     if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
-    | <a href="<%RT->Config->Get('WebPath')%><%$Prefs%>"><&|/l&>Preferences</&></a>
-%     }
 % } else {
     <&|/l&>Not logged in.</&>
 % }
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 1469194..641c8d2 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -23,7 +23,7 @@
 %# 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
+%# 02110-1301 or visit their web Page on the internet at
 %# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 %#
 %#
@@ -61,147 +61,190 @@
 
 my $request_path = $HTML::Mason::Commands::m->request_comp->path;
 
-my $query_string = sub { my %args = @_; my $u = URI->new(); $u->query_form(%args); return $u->query };
+my $query_string = sub {
+    my %args = @_;
+    my $u    = URI->new();
+    $u->query_form(%args);
+    return $u->query;
+};
 
-my $PREFS_NAV = RT::Interface::Web::Menu->new( { title => loc('Preferences'), path => '/Prefs/Other.html' } );
-$PREFS_NAV->child( loc('Settings'),       path => '/Prefs/Other.html', );
-$PREFS_NAV->child( loc('About me'),       path => '/User/Prefs.html', );
-$PREFS_NAV->child( loc('Search options'), path => '/Prefs/SearchOptions.html', );
+my $PREFS_NAV = RT::Interface::Web::Menu->new(
+               { title => loc('Preferences'), path => '/Prefs/Other.html' } );
+$PREFS_NAV->child( loc('Settings'), path => '/Prefs/Other.html', );
+$PREFS_NAV->child( loc('About me'), path => '/User/Prefs.html', );
+$PREFS_NAV->child( loc('Search options'),
+                   path => '/Prefs/SearchOptions.html', );
 $PREFS_NAV->child( loc('RT at a glance'), path => '/Prefs/MyRT.html', );
 
+if ( $request_path =~ qr{.*} ) {
+    Menu->child( home => title =>  loc('HomePage'), path => '/' );
+    my $tickets = Menu->child( search => title => loc('Tickets'),
+                               path => '/Search/Build.html' );
+    $tickets->child( new => title => loc('New Search') => path =>
+                     "/Search/Build.html?NewQuery=1" );
+    my $new = $tickets->child( create => title => loc('New ticket'),
+                               path => '/Ticket/Create.html' );
 
-if ($request_path =~ qr{.*} ) {
-    Menu->child( loc('Homepage'),      path => '/' );
-    my $tickets = Menu->child( loc('Tickets'),       path => '/Search/Build.html' );
-    $tickets->child( new => title => loc('New Search')  => path => "/Search/Build.html?NewQuery=1" );
-    my $new = $tickets->child(create => title => loc('New ticket'), path => '/Ticket/Create.html');
-
-    my $q = RT::Queues->new($session{'CurrentUser'});
+    my $q = RT::Queues->new( $session{'CurrentUser'} );
     $q->FindAllRows;
-    while (my $queue = $q->Next) {
-            next unless $queue->CurrentUserHasRight('CreateTicket');
-            $new->child( $queue->id => title => $queue->Name, path => '/Ticket/Create.html?Queue='.$queue->id);
+    while ( my $queue = $q->Next ) {
+        next unless $queue->CurrentUserHasRight('CreateTicket');
+        $new->child( $queue->id => title => $queue->Name,
+                     path => '/Ticket/Create.html?Queue=' . $queue->id );
     }
 
     my $tools = Menu->child( loc('Tools'), path => '/Tools/index.html' );
     $tools->child( loc('Dashboards'), path => '/Dashboards/index.html' );
 
-    my $reports = $tools->child( loc('Reports'), path => '/Tools/Reports/index.html' );
-    $reports->child( loc('Resolved by owner'),       path => '/Tools/Reports/ResolvedByOwner.html', );
-    $reports->child( loc('Resolved in date range'),  path => '/Tools/Reports/ResolvedByDates.html', );
-    $reports->child( loc('Created in a date range'), path => '/Tools/Reports/CreatedByDates.html', );
+    my $reports = $tools->child( loc('Reports'),
+                                 path => '/Tools/Reports/index.html' );
+    $reports->child( loc('Resolved by owner'),
+                     path => '/Tools/Reports/ResolvedByOwner.html', );
+    $reports->child( loc('Resolved in date range'),
+                     path => '/Tools/Reports/ResolvedByDates.html', );
+    $reports->child( loc('Created in a date range'),
+                     path => '/Tools/Reports/CreatedByDates.html', );
 
     $tools->child( loc('My Day'), path => '/Tools/MyDay.html' );
-    if ( $session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
+    if ( $session{'CurrentUser'}
+         ->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
     {
         $tools->child( loc('Approval'), path => '/Approvals/' );
     }
 
-    if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
+    if ( $session{'CurrentUser'}
+         ->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
     {
-        my $admin = Menu->child( Config => title => loc('Configuration'), path => '/Admin/' );
-        $admin->child( loc('Users'),         path => '/Admin/Users/', );
-        $admin->child( loc('Groups'),        path => '/Admin/Groups/', );
-        $admin->child( loc('Queues'),        path => '/Admin/Queues/', );
-        $admin->child( loc('Custom Fields'), path => '/Admin/CustomFields/', );
-        $admin->child( loc('Rules'),         path => '/admin/rules/', );
-
-        my $admin_global = $admin->child( loc('Global'), path => '/Admin/Global/', );
-
-        $admin_global->child( loc('Templates'), path => '/Admin/Global/Templates.html', );
-        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
+        my $admin = Menu->child( Config => title => loc('Configuration'),
+                                 path   => '/Admin/' );
+        $admin->child( loc('Users'),  path => '/Admin/Users/', );
+        $admin->child( loc('Groups'), path => '/Admin/Groups/', );
+        my $queues = $admin->child( queues => title => loc('Queues'),
+                                    path => '/Admin/Queues/', );
+        $queues->child( loc('Select'), path => "/Admin/Queues/" );
+        $queues->child( loc('Create'),
+                        path => "/Admin/Queues/Modify.html?Create=1" );
+        $admin->child( loc('Custom Fields'), path => '/Admin/CustomFields/',
+        );
+        $admin->child( loc('Rules'), path => '/admin/rules/', );
+
+        my $admin_global
+            = $admin->child( loc('Global'), path => '/Admin/Global/', );
+
+        $admin_global->child( loc('Templates'),
+                              path => '/Admin/Global/Templates.html', );
+
+#        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
+#        {
+#            $workflows->child( loc('Overview')     => path => "/Admin/Global/Workflows/index.html" );
+#            $workflows->child( loc('Localization') => path => "/Admin/Global/Workflows/Localization.html" );
+#            $workflows->child( loc('Mappings')     => path => "/Admin/Global/Workflows/Mappings.html" );
+#        }
+
+        my $cfadmin = $admin_global->child( loc('Custom Fields'),
+                           path => '/Admin/Global/CustomFields/index.html', );
         {
-            $workflows->child( loc('Overview')     => path => "/Admin/Global/Workflows/index.html" );
-            $workflows->child( loc('Localization') => path => "/Admin/Global/Workflows/Localization.html" );
-            $workflows->child( loc('Mappings')     => path => "/Admin/Global/Workflows/Mappings.html" );
-        }
+            $cfadmin->child( loc('Users') => text =>
+                                 loc('Select custom fields for all users'),
+                             path => '/Admin/Global/CustomFields/Users.html'
+                           );
 
-        my $cfadmin = $admin_global->child( loc('Custom Fields'), path => '/Admin/Global/CustomFields/index.html', );
-        {
             $cfadmin->child(
-                loc('Users') => text => loc('Select custom fields for all users'),
-               path => '/Admin/Global/CustomFields/Users.html'
+                          loc('Groups') => text =>
+                              loc('Select custom fields for all user groups'),
+                          path => '/Admin/Global/CustomFields/Groups.html'
             );
 
-            $cfadmin->child(
-                loc('Groups') => text => loc('Select custom fields for all user groups'),
-               path => '/Admin/Global/CustomFields/Groups.html'
-            );
-
-            $cfadmin->child(
-                loc('Queues') => text => loc('Select custom fields for all queues'),
-               path => '/Admin/Global/CustomFields/Queues.html'
-            );
+            $cfadmin->child( loc('Queues') => text =>
+                                 loc('Select custom fields for all queues'),
+                             path => '/Admin/Global/CustomFields/Queues.html'
+                           );
 
             $cfadmin->child(
-                loc('Tickets') => text => loc('Select custom fields for tickets in all queues'),
-                path => '/Admin/Global/CustomFields/Queue-Tickets.html'
+                    loc('Tickets') => text =>
+                        loc('Select custom fields for tickets in all queues'),
+                    path => '/Admin/Global/CustomFields/Queue-Tickets.html'
             );
 
             $cfadmin->child(
-                loc('Ticket Transactions') => text => loc('Select custom fields for transactions on tickets in all queues'),
+                loc('Ticket Transactions') => text =>
+                    loc(
+                    'Select custom fields for transactions on tickets in all queues'
+                    ),
                 path => 'Admin/Global/CustomFields/Queue-Transactions.html'
             );
 
         }
 
-        $admin_global->child( loc('Group Rights'),   path => '/Admin/Global/GroupRights.html', );
-        $admin_global->child( loc('User Rights'),    path => '/Admin/Global/UserRights.html', );
-        $admin_global->child( loc('RT at a glance'), path => '/Admin/Global/MyRT.html', );
-        $admin_global->child( loc('System'),         path => '/Admin/Global/System.html', );
-
-        my $admin_tools = $admin->child( loc('Tools'), path => '/Admin/Tools/', );
-        $admin_tools->child( loc('System Configuration'), path => '/Admin/Tools/Configuration.html', );
-        $admin_tools->child( loc('Shredder'),             path => '/Admin/Tools/Shredder', );
+        $admin_global->child( loc('Group Rights'),
+                              path => '/Admin/Global/GroupRights.html', );
+        $admin_global->child( loc('User Rights'),
+                              path => '/Admin/Global/UserRights.html', );
+        $admin_global->child( loc('RT at a glance'),
+                              path => '/Admin/Global/MyRT.html', );
+        $admin_global->child( loc('System'),
+                              path => '/Admin/Global/System.html', );
+
+        my $admin_tools
+            = $admin->child( loc('Tools'), path => '/Admin/Tools/', );
+        $admin_tools->child( loc('System Configuration'),
+                             path => '/Admin/Tools/Configuration.html', );
+        $admin_tools->child( loc('Shredder'),
+                             path => '/Admin/Tools/Shredder', );
     }
-    if ($session{'CurrentUser'}->UserObj
-        && $session{'CurrentUser'}->HasRight(
-            Right  => 'ModifySelf',
-            Object => $RT::System
-        )
-        )
+    if ( $session{'CurrentUser'}->UserObj
+         && $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf',
+                                               Object => $RT::System )
+       )
     {
 
-     if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
+        if ( $session{'CurrentUser'}
+             ->HasRight( Right => 'ModifySelf', Object => $RT::System ) )
+        {
 
-        Menu->child( 'Preferences' => menu => $PREFS_NAV, order => 99 );
+            Menu->child( 'Preferences' => menu => $PREFS_NAV, Order => 99 );
+        }
     }
-     }
-
-
 
+}
 
-	};
-
-if ($request_path =~ qr'Dashboards/?' ) {
+if ( $request_path =~ qr'Dashboards/?' ) {
     require RT::Dashboard;    # not a record class, so not autoloaded :/
     PageMenu->child( loc('Select'), path => "/Dashboards/index.html" );
-    my $dashboard = RT::Dashboard->new($session{CurrentUser});
+    my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
     if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
-        PageMenu->child( loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
+        PageMenu->child(
+                loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
     }
-};
-
+}
 
-if ($request_path =~ qr'Dashboards/(\d*)?' ) {
+if ( $request_path =~ qr'Dashboards/(\d*)?' ) {
     if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
-        my $obj = RT::Dashboard->new($session{'CurrentUser'});
+        my $obj = RT::Dashboard->new( $session{'CurrentUser'} );
         $obj->LoadById($id);
         if ( $obj and $obj->id ) {
-            my $tabs = PageMenu->child( "this" => title => $obj->Name, path => "/Dashboards/Modify.html?id=" . $obj->id );
-            $tabs->child( loc('Basics'),       path => "/Dashboards/Modify.html?id=" . $obj->id );
-            $tabs->child( loc('Queries'),      path => "/Dashboards/Queries.html?id=" . $obj->id );
-            $tabs->child( loc('Subscription'), path => "/Dashboards/Subscription.html?dashboard_id=" . $obj->id )
+            my $tabs = PageMenu->child(
+                              "this" => title => $obj->Name,
+                              path => "/Dashboards/Modify.html?id=" . $obj->id
+            );
+            $tabs->child( loc('Basics'),
+                          path => "/Dashboards/Modify.html?id=" . $obj->id );
+            $tabs->child( loc('Queries'),
+                          path => "/Dashboards/Queries.html?id=" . $obj->id );
+            $tabs->child( loc('Subscription'),
+                         path => "/Dashboards/Subscription.html?dashboard_id="
+                             . $obj->id )
                 if $obj->CurrentUserCanSubscribe;
-            $tabs->child( loc('Show'), path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
+            $tabs->child( loc('Show'),
+                        path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
 
         }
     }
-};
+}
 
-if ($request_path =~ qr'/SelfService' ) {
+if ( $request_path =~ qr'/SelfService' ) {
 
-    my $queues = RT::Queues->new($session{'CurrentUser'});
+    my $queues = RT::Queues->new( $session{'CurrentUser'} );
     $queues->FindAllRows;
 
     my $queue_count = 0;
@@ -219,130 +262,193 @@ if ($request_path =~ qr'/SelfService' ) {
     $TOP->child( loc('Open tickets'),   path => '/SelfService/', );
     $TOP->child( loc('Closed tickets'), path => '/SelfService/Closed.html', );
     if ( $queue_count > 1 ) {
-        $TOP->child( loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
+        $TOP->child( loc('New ticket'),
+                     path => '/SelfService/CreateTicketInQueue.html' );
     } else {
-        $TOP->child( loc('New ticket'), path => '/SelfService/Create.html?queue=' . $queue_id );
+        $TOP->child( loc('New ticket'),
+                     path => '/SelfService/Create.html?queue=' . $queue_id );
     }
 
-    if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
+    if ( $session{'CurrentUser'}
+         ->HasRight( Right => 'ModifySelf', Object => $RT::System ) )
+    {
         $TOP->child( loc('Preferences'), path => '/SelfService/Prefs.html' );
     }
 
     # XXX TODO RENDER GOTO TICKET WIDGET
     #Menu->child( B =>  html => $m->scomp('GotoTicket'))
-};
+}
 
-if ($request_path =~ qr'Admin/Queues' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue' ) ) {
-        PageMenu->child( loc('Select'), path => "/Admin/Queues/" );
-        PageMenu->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
+if ( $request_path =~ qr'Admin/Queues' ) {
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
+    {
     }
     if ( my $id = $m->request_args->{'id'} ) {
-        my $queue_obj = RT::Queue->new($session{'CurrentUser'});
+        my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
         $queue_obj->Load($id);
 
-        my $queue = PageMenu->child( $queue_obj->Name => path => "/Admin/Queues/Modify.html?id=" . $id );
-        $queue->child( loc('Basics'),    path => "/Admin/Queues/Modify.html?id=" . $id );
-        $queue->child( loc('Watchers'),  path => "/Admin/Queues/People.html?id=" . $id );
-        $queue->child( loc('Templates'), path => "/Admin/Queues/Templates.html?id=" . $id );
+        my $queue
+            = PageMenu->child(
+                   $queue_obj->Name => path => "/Admin/Queues/Modify.html?id="
+                       . $id );
+        $queue->child( loc('Basics'),
+                       path => "/Admin/Queues/Modify.html?id=" . $id );
+        $queue->child( loc('Watchers'),
+                       path => "/Admin/Queues/People.html?id=" . $id );
+        $queue->child( loc('Templates'),
+                       path => "/Admin/Queues/Templates.html?id=" . $id );
 
         $queue->child( loc('Ticket Custom Fields'),
-            path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id=' . $id );
+             path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id='
+                 . $id );
 
         $queue->child( loc('Transaction Custom Fields'),
-            path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket-RT::Transaction&id=' . $id );
-
-        $queue->child( loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=" . $id );
-        $queue->child( loc('User Rights'),  path => "/Admin/Queues/UserRights.html?id=" . $id );
+            path =>
+                '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket-RT::Transaction&id='
+                . $id );
+
+        $queue->child( loc('Group Rights'),
+                       path => "/Admin/Queues/GroupRights.html?id=" . $id );
+        $queue->child( loc('User Rights'),
+                       path => "/Admin/Queues/UserRights.html?id=" . $id );
     }
-};
+}
 
-if ($request_path =~ qr'/Admin/Users' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) ) {
+if ( $request_path =~ qr'/Admin/Users' ) {
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
+    {
         PageMenu->child( loc('Select'), path => "/Admin/Users/" );
-        PageMenu->child( loc('Create'), path => "/Admin/Users/Modify.html?Create=1", separator => 1 );
+        PageMenu->child( loc('Create'),
+                         path      => "/Admin/Users/Modify.html?Create=1",
+                         separator => 1
+                       );
     }
     if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::User->new($session{'CurrentUser'});
+        my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
-        my $tabs = PageMenu->child( 'current' => title => $obj->Name, path => "/Admin/Users/Modify.html?id=" . $id, );
-        $tabs->child( loc('Basics'),         path => "/Admin/Users/Modify.html?id=" . $id );
-        $tabs->child( loc('Memberships'),    path => "/Admin/Users/Memberships.html?id=" . $id );
-        $tabs->child( loc('History'),        path => "/Admin/Users/History.html?id=" . $id );
-        $tabs->child( loc('RT at a glance'), path => "/Admin/Users/MyRT.html?id=" . $id );
-        if ( RT->config->get('gnupg')->{'enable'} ) {
-            $tabs->child( loc('GnuPG'), path => "/Admin/Users/GnuPG.html?id=" . $id );
+        my $tabs = PageMenu->child(
+                                 'current' => title => $obj->Name,
+                                 path => "/Admin/Users/Modify.html?id=" . $id,
+        );
+        $tabs->child( loc('Basics'),
+                      path => "/Admin/Users/Modify.html?id=" . $id );
+        $tabs->child( loc('Memberships'),
+                      path => "/Admin/Users/Memberships.html?id=" . $id );
+        $tabs->child( loc('History'),
+                      path => "/Admin/Users/History.html?id=" . $id );
+        $tabs->child( loc('RT at a glance'),
+                      path => "/Admin/Users/MyRT.html?id=" . $id );
+        if ( RT->Config->Get('GnuPG')->{'enable'} ) {
+            $tabs->child( loc('GnuPG'),
+                          path => "/Admin/Users/GnuPG.html?id=" . $id );
         }
     }
 
-};
+}
 
-if ($request_path =~ qr'Admin/Groups' ) {
+if ( $request_path =~ qr'Admin/Groups' ) {
 
     PageMenu->child( loc('Select') => path => "/Admin/Groups/" );
-    PageMenu->child( loc('Create') => path => "/Admin/Groups/Modify.html?Create=1", separator => 1 );
+    PageMenu->child(
+                loc('Create') => path => "/Admin/Groups/Modify.html?Create=1",
+                separator     => 1 );
     if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::User->new($session{'CurrentUser'});
+        my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
-        my $tabs = PageMenu->child( $obj->Name, path => "/Admin/CustomFields/Modify.html?id=" . $id );
-        $tabs->child( loc('Basics')       => path => "/Admin/Groups/Modify.html?id=" . $obj->id );
-        $tabs->child( loc('Members')      => path => "/Admin/Groups/Members.html?id=" . $obj->id );
-        $tabs->child( loc('Group Rights') => path => "/Admin/Groups/GroupRights.html?id=" . $obj->id );
-        $tabs->child( loc('User Rights')  => path => "/Admin/Groups/UserRights.html?id=" . $obj->id );
-        $tabs->child( loc('History')      => path => "/Admin/Groups/History.html?id=" . $obj->id );
+        my $tabs = PageMenu->child( $obj->Name,
+                        path => "/Admin/CustomFields/Modify.html?id=" . $id );
+        $tabs->child( loc('Basics') => path => "/Admin/Groups/Modify.html?id="
+                      . $obj->id );
+        $tabs->child(
+                    loc('Members') => path => "/Admin/Groups/Members.html?id="
+                        . $obj->id );
+        $tabs->child( loc('Group Rights') => path =>
+                      "/Admin/Groups/GroupRights.html?id=" . $obj->id );
+        $tabs->child(
+             loc('User Rights') => path => "/Admin/Groups/UserRights.html?id="
+                 . $obj->id );
+        $tabs->child(
+                    loc('History') => path => "/Admin/Groups/History.html?id="
+                        . $obj->id );
     }
-};
+}
 
-if ($request_path =~ qr'Admin/CustomFields/' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) ) {
+if ( $request_path =~ qr'Admin/CustomFields/' ) {
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) )
+    {
         PageMenu->child( loc('Select'), path => "/Admin/CustomFields/" );
-        PageMenu->child( loc('Create') => path => "/Admin/CustomFields/Modify.html?Create=1", );
+        PageMenu->child( loc('Create') => path =>
+                         "/Admin/CustomFields/Modify.html?Create=1", );
 
     }
     if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::CustomField->new($session{'CurrentUser'});
+        my $obj = RT::CustomField->new( $session{'CurrentUser'} );
         $obj->Load($id);
-        my $tabs = PageMenu->child( $obj->Name, path => "/Admin/CustomFields/Modify.html?id=" . $id );
+        my $tabs = PageMenu->child( $obj->Name,
+                        path => "/Admin/CustomFields/Modify.html?id=" . $id );
 
-        $tabs->child( loc('Basics')       => path => "/Admin/CustomFields/Modify.html?id=" . $id );
-        $tabs->child( loc('Group Rights') => path => "/Admin/CustomFields/GroupRights.html?id=" . $id );
-        $tabs->child( loc('User Rights')  => path => "/Admin/CustomFields/UserRights.html?id=" . $id );
+        $tabs->child(
+                loc('Basics') => path => "/Admin/CustomFields/Modify.html?id="
+                    . $id );
+        $tabs->child( loc('Group Rights') => path =>
+                      "/Admin/CustomFields/GroupRights.html?id=" . $id );
+        $tabs->child( loc('User Rights') => path =>
+                      "/Admin/CustomFields/UserRights.html?id=" . $id );
 
         if ( $obj->lookup_type =~ /^RT::Queue-/io ) {
-            $tabs->child( loc('Applies to'), path => "/Admin/CustomFields/Objects.html?id=" . $id );
+            $tabs->child( loc('Applies to'),
+                       path => "/Admin/CustomFields/Objects.html?id=" . $id );
         }
 
     }
 
-};
+}
 
-if ($request_path =~ qr'Admin/Rules' ) {
+if ( $request_path =~ qr'Admin/Rules' ) {
     PageMenu->child( loc('Select'), path => "/Admin/Rules/" );
-    PageMenu->child( loc('Create'), path => "/Admin/Rules/Modify.html?Create=1" );
-};
+    PageMenu->child( loc('Create'),
+                     path => "/Admin/Rules/Modify.html?Create=1" );
+}
 
-if ($request_path =~ qr'(?:Ticket|Search)/' ) {
+if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
+    my $search = Menu()->child('search');
+    my $actions = PageMenu()->child( transitions => title => lc('Actions') );
     if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
         my $id  = $1;
-        my $obj = RT::Ticket->new($session{'CurrentUser'});
+        my $obj = RT::Ticket->new( $session{'CurrentUser'} );
         $obj->Load($id);
 
-        my $tabs = PageMenu(); #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
+        my $tabs = PageMenu()
+            ; #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
 
-        $tabs->child( loc('Display') => path => "/Ticket/Display.html?id=" . $id );
+        $tabs->child(
+                 loc('Display') => path => "/Ticket/Display.html?id=" . $id );
 
-        $tabs->child( loc('History') => path => "/Ticket/History.html?id=" . $id );
-        $tabs->child( loc('Basics')  => path => "/Ticket/Modify.html?id=" . $id );
+        $tabs->child(
+                 loc('History') => path => "/Ticket/History.html?id=" . $id );
+        $tabs->child(
+                   loc('Basics') => path => "/Ticket/Modify.html?id=" . $id );
 
-        $tabs->child( loc('Dates') => path => "/Ticket/ModifyDates.html?id=" . $id );
-        $tabs->child( loc('People'), path => "/Ticket/ModifyPeople.html?id=" . $id );
-        $tabs->child( loc('Links'),  path => "/Ticket/ModifyLinks.html?id=" . $id );
-        $tabs->child( loc('Jumbo'),  path => "/Ticket/ModifyAll.html?id=" . $id );
+        $tabs->child(
+               loc('Dates') => path => "/Ticket/ModifyDates.html?id=" . $id );
+        $tabs->child( loc('People'),
+                      path => "/Ticket/ModifyPeople.html?id=" . $id );
+        $tabs->child( loc('Links'),
+                      path => "/Ticket/ModifyLinks.html?id=" . $id );
+        $tabs->child( loc('Jumbo'),
+                      path => "/Ticket/ModifyAll.html?id=" . $id );
 
-        my %can = ( ModifyTicket => $obj->CurrentUserHasRight('ModifyTicket') );
+        my %can
+            = ( ModifyTicket => $obj->CurrentUserHasRight('ModifyTicket') );
 
-        if ( $can{'ModifyTicket'} or $obj->CurrentUserHasRight('ReplyToTicket') ) {
-            $tabs->child( loc('Reply'), path => "/Ticket/Update.html?action=respond&id=" . $id );
+        if (    $can{'ModifyTicket'}
+             or $obj->CurrentUserHasRight('ReplyToTicket') )
+        {
+            $actions->child( loc('Reply'),
+                     path => "/Ticket/Update.html?action=respond&id=" . $id );
         }
 
         if ( $can{'ModifyTicket'} ) {
@@ -356,36 +462,49 @@ if ($request_path =~ qr'(?:Ticket|Search)/' ) {
                 my $url = '/Ticket/';
                 if ($action) {
 
-                    $url .= "Update.html?" . $query_string->( Action => $action, DefaultStatus => $next, id => $id );
+                    $url .= "Update.html?"
+                        . $query_string->( Action        => $action,
+                                           DefaultStatus => $next,
+                                           id            => $id
+                                         );
                 } else {
 
-                    #$url .= "Display.html?" .$query_string->(Status => $next, id => $id );
+       #$url .= "Display.html?" .$query_string->(Status => $next, id => $id );
                 }
-                $tabs->child( loc( $schema->transition_label( $current => $next ) ) => path => $url );
+                $actions->child(
+                      loc( $schema->transition_label( $current => $next ) ) =>
+                          path => $url );
             }
 
         }
         if ( $obj->CurrentUserHasRight('OwnTicket') ) {
             if ( $obj->OwnerObj->id == RT->Nobody->id ) {
-                $tabs->child( loc('Take') => path => "/Ticket/Display.html?action=take&id=" . $id )
-                    if ( $can{'ModifyTicket'} or $obj->CurrentUserHasRight('TakeTicket') );
+                $actions->child( loc('Take') => path =>
+                                "/Ticket/Display.html?action=take&id=" . $id )
+                    if (    $can{'ModifyTicket'}
+                         or $obj->CurrentUserHasRight('TakeTicket') );
             } elsif ( $obj->OwnerObj->id != $session{'CurrentUser'}->id ) {
-                $tabs->child( loc('Steal') => path => "/Ticket/Display.html?action=steal&id=" . $id )
-                    if ( $can{'ModifyTicket'}
-                    or $obj->CurrentUserHasRight('StealTicket') );
+                $actions->child( loc('Steal') => path =>
+                               "/Ticket/Display.html?action=steal&id=" . $id )
+                    if (    $can{'ModifyTicket'}
+                         or $obj->CurrentUserHasRight('StealTicket') );
             }
         }
 
-        if ( $can{'ModifyTicket'} or $obj->CurrentUserHasRight('CommentOnTicket') ) {
-            $tabs->child( loc('Comment') => path => "/Ticket/Update.html?action=comment&id=" . $id );
+        if (    $can{'ModifyTicket'}
+             or $obj->CurrentUserHasRight('CommentOnTicket') )
+        {
+            $actions->child( loc('Comment') => path =>
+                             "/Ticket/Update.html?action=comment&id=" . $id );
         }
 
-        # $actions->{'_ZZ'} = { html => $m->scomp( '/Ticket/Elements/Bookmark', id => $obj->id ), };
+# $actions->{'_ZZ'} = { html => $m->scomp( '/Ticket/Elements/Bookmark', id => $obj->id ), };
 
         if ( defined $session{"tickets"} ) {
 
             # we have to update session data if we get new ItemMap
-            my $updatesession = 1 unless ( $session{"tickets"}->{'item_map'} );
+            my $updatesession = 1
+                unless ( $session{"tickets"}->{'item_map'} );
 
             my $item_map = $session{"tickets"}->ItemMap;
 
@@ -395,24 +514,24 @@ if ($request_path =~ qr'(?:Ticket|Search)/' ) {
 
             # Don't display prev links if we're on the first ticket
             if ( $item_map->{$id}->{prev} ) {
-                PageMenu->child(
-                    '<< ' . loc('First') => class => "nav",
-                   path => "/Ticket/Display.html?id=" . $item_map->{first}
-                );
-                PageMenu->child(
-                    '< ' . loc('Prev') => class => "nav",
-                   path => "/Ticket/Display.html?id=" . $item_map->{$id}->{prev}
+                $search->child(
+                       '<< ' . loc('First') => class => "nav",
+                       path => "/Ticket/Display.html?id=" . $item_map->{first}
                 );
+                $search->child( '< ' . loc('Prev') => class => "nav",
+                                path => "/Ticket/Display.html?id="
+                                    . $item_map->{$id}->{prev}
+                              );
 
                 # Don't display next links if we're on the last ticket
                 if ( $item_map->{$id}->{next} ) {
-                    PageMenu->child(
-                        loc('next') . ' >' => class => "nav",
-                       path => "/Ticket/Display.html?id=" . $item_map->{$id}->{next}
-                    );
-                    PageMenu->child(
+                    $search->child( loc('next') . ' >' => class => "nav",
+                                    path => "/Ticket/Display.html?id="
+                                        . $item_map->{$id}->{next}
+                                  );
+                    $search->child(
                         loc('Last') . ' >>' => class => "nav",
-                       path => "/Ticket/Display.html?id=" . $item_map->{last}
+                        path => "/Ticket/Display.html?id=" . $item_map->{last}
                     );
                 }
             }
@@ -421,59 +540,70 @@ if ($request_path =~ qr'(?:Ticket|Search)/' ) {
     my $args      = '';
     my $has_query = '';
 
-    my $search = $session{"CurrentSearchHash"} || {};
-    my $search_id = $m->request_args->{'saved_search_id'} || $search->{'searchid'} || '';
+    my $current_search = $session{"CurrentSearchHash"} || {};
+    my $search_id
+        = $m->request_args->{'SavedSearchId'}
+        || $search->{'SearchId'}
+        || '';
 
-    $has_query = 1 if ( $m->request_args->{'query'} or $search->{'query'} );
+    $has_query = 1
+        if ( $m->request_args->{'Query'} or $current_search->{'Query'} );
 
     my %query_args = (
 
-        saved_search_id => ( $search_id eq 'new' ) ? undef : $search_id,
-        query    => $m->request_args->{'query'}    || $search->{'query'},
-        format   => $m->request_args->{'format'}   || $search->{'format'},
-        order_by => $m->request_args->{'order_by'} || $search->{'order_by'},
-        order    => $m->request_args->{'order'}    || $search->{'order'},
-        page     => $m->request_args->{'page'}     || $search->{'page'},
-        rows_per_page => (
-            defined $m->request_args->{'rows_per_page'}
-            ? $m->request_args->{'rows_per_page'}
-            : $search->{'rows_per_page'}
-        )
-    );
+        SavedSearchId => ( $search_id eq 'new' ) ? undef : $search_id,
+        Query  => $m->request_args->{'Query'}  || $current_search->{'Query'},
+        Format => $m->request_args->{'Format'} || $current_search->{'Format'},
+        OrderBy => $m->request_args->{'OrderBy'}
+            || $current_search->{'OrderBy'},
+        Order => $m->request_args->{'Order'} || $current_search->{'Order'},
+        Page  => $m->request_args->{'Page'}  || $current_search->{'Page'},
+        RowsPerPage => ( defined $m->request_args->{'RowsPerPage'}
+                           ? $m->request_args->{'RowsPerPage'}
+                           : $current_search->{'RowsPerPage'}
+                         )
+                     );
 
     $args = "?" . $query_string->(%query_args);
 
-    PageMenu->child( loc('Edit Search') => path => "/Search/Build.html" . ( ($has_query) ? $args : '' ) );
-    PageMenu->child( loc('Advanced')    => path => "/Search/Edit.html$args" );
 
+        my $current_search_menu = $search->child( current_search => title => loc('Current Search'));
+        $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 =~ qr|^Search/Results.html| &&    #XXX TODO better abstraction
-            $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )
-            )
+        if ($request_path =~ qr|^Search/Results.html|
+            &&                        #XXX TODO better abstraction
+            $session{'CurrentUser'}
+            ->HasRight( Right => 'SuperUser', Object => $RT::System )
+           )
         {
-            my $shred_args = URI->new->query_param(
-                search          => 1,
-                plugin          => 'Tickets',
-                'Tickets:query' => $query_args{'query'},
-                'Tickets:limit' => $query_args{'rows_per_page'}
-            );
+            my $shred_args =
+                URI->new->query_param(
+                               search          => 1,
+                               plugin          => 'Tickets',
+                               'Tickets:query' => $query_args{'Query'},
+                               'Tickets:limit' => $query_args{'RowsPerPage'}
+                );
 
-            PageMenu->child( 'shredder' => title => loc('Shredder'), path => 'Admin/Tools/Shredder/?' . $shred_args );
+            $current_search_menu->child( 'shredder' => title => loc('Shredder'),
+                            path => 'Admin/Tools/Shredder/?' . $shred_args );
         }
 
-        PageMenu->child( loc('Show Results') => path => "/Search/Results.html$args" );
+        $current_search_menu->child( results => title =>
+                 loc('Show Results') => path => "/Search/Results.html$args" );
 
-        PageMenu->child( loc('Bulk Update') => path => "/Search/Bulk.html$args" );
+        $current_search_menu->child( bulk => title =>
+                     loc('Bulk Update') => path => "/Search/Bulk.html$args" );
 
     }
-};
+}
 
 if ( $request_path =~ qr'User/Group' ) {
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
         my $group = PageMenu->child(
-                           path => "/User/Groups/Modify.html?id=" . $obj->id );
+                          path => "/User/Groups/Modify.html?id=" . $obj->id );
         $group->child( loc('Basics'),
                        path => "/User/Groups/Modify.html?id=" . $obj->id );
         $group->child( loc('Members'),
@@ -482,13 +612,14 @@ if ( $request_path =~ qr'User/Group' ) {
     }
     PageMenu( loc('Select') => path => "/User/Groups/index.html" );
     PageMenu( loc('Create') => path => "/User/Groups/Modify.html?Create=1",
-              separator   => 1 );
+              separator     => 1 );
 
 }
 
-if ($request_path =~ qr'Prefs' ) {
+if ( $request_path =~ qr'Prefs' ) {
 
-    PageMenu->child( 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html' );
+    PageMenu->child( 'Quick search' => title => loc('Quick search'),
+                     path => '/Prefs/Quicksearch.html' );
 }
 
 
diff --git a/share/html/NoAuth/css/base/superfish-navbar.css b/share/html/NoAuth/css/base/superfish-navbar.css
new file mode 100644
index 0000000..68c7135
--- /dev/null
+++ b/share/html/NoAuth/css/base/superfish-navbar.css
@@ -0,0 +1,93 @@
+
+/*** adding the class sf-navbar in addition to sf-menu creates an all-horizontal nav-bar menu ***/
+.sf-navbar {
+	background:		#BDD2FF;
+	height:			2.5em;
+	padding-bottom:	2.5em;
+	position:		relative;
+}
+.sf-navbar li {
+	background:		#AABDE6;
+	position:		static;
+}
+.sf-navbar a {
+	border-top:		none;
+}
+.sf-navbar li ul {
+	width:			44em; /*IE6 soils itself without this*/
+}
+.sf-navbar li li {
+	background:		#BDD2FF;
+	position:		relative;
+}
+.sf-navbar li li ul {
+	width:			13em;
+}
+.sf-navbar li li li {
+	width:			100%;
+}
+.sf-navbar ul li {
+	width:			auto;
+	float:			left;
+}
+.sf-navbar a, .sf-navbar a:visited {
+	border:			none;
+}
+.sf-navbar li.current {
+	background:		#BDD2FF;
+}
+.sf-navbar li:hover,
+.sf-navbar li.sfHover,
+.sf-navbar li li.current,
+.sf-navbar a:focus, .sf-navbar a:hover, .sf-navbar a:active {
+	background:		#BDD2FF;
+}
+.sf-navbar ul li:hover,
+.sf-navbar ul li.sfHover,
+ul.sf-navbar ul li:hover li,
+ul.sf-navbar ul li.sfHover li,
+.sf-navbar ul a:focus, .sf-navbar ul a:hover, .sf-navbar ul a:active {
+	background:		#D1DFFF;
+}
+ul.sf-navbar li li li:hover,
+ul.sf-navbar li li li.sfHover,
+.sf-navbar li li.current li.current,
+.sf-navbar ul li li a:focus, .sf-navbar ul li li a:hover, .sf-navbar ul li li a:active {
+	background:		#E6EEFF;
+}
+ul.sf-navbar .current ul,
+ul.sf-navbar ul li:hover ul,
+ul.sf-navbar ul li.sfHover ul {
+	left:			0;
+	top:			2.5em; /* match top ul list item height */
+}
+ul.sf-navbar .current ul ul {
+	top: 			-999em;
+}
+
+.sf-navbar li li.current > a {
+	font-weight:	bold;
+}
+
+/*** point all arrows down ***/
+/* point right for anchors in subs */
+.sf-navbar ul .sf-sub-indicator { background-position: -10px -100px; }
+.sf-navbar ul a > .sf-sub-indicator { background-position: 0 -100px; }
+/* apply hovers to modern browsers */
+.sf-navbar ul a:focus > .sf-sub-indicator,
+.sf-navbar ul a:hover > .sf-sub-indicator,
+.sf-navbar ul a:active > .sf-sub-indicator,
+.sf-navbar ul li:hover > a > .sf-sub-indicator,
+.sf-navbar ul li.sfHover > a > .sf-sub-indicator {
+	background-position: -10px -100px; /* arrow hovers for modern browsers*/
+}
+
+/*** remove shadow on first submenu ***/
+.sf-navbar > li > ul {
+	background: transparent;
+	padding: 0;
+	-moz-border-radius-bottomleft: 0;
+	-moz-border-radius-topright: 0;
+	-webkit-border-top-right-radius: 0;
+	-webkit-border-bottom-left-radius: 0;
+}
\ No newline at end of file
diff --git a/share/html/NoAuth/css/base/superfish-vertical.css b/share/html/NoAuth/css/base/superfish-vertical.css
new file mode 100644
index 0000000..8025b78
--- /dev/null
+++ b/share/html/NoAuth/css/base/superfish-vertical.css
@@ -0,0 +1,23 @@
+/*** adding sf-vertical in addition to sf-menu creates a vertical menu ***/
+.sf-vertical, .sf-vertical li {
+	width:	10em;
+}
+/* this lacks ul at the start of the selector, so the styles from the main CSS file override it where needed */
+.sf-vertical li:hover ul,
+.sf-vertical li.sfHover ul {
+	left:	10em; /* match ul width */
+	top:	0;
+}
+
+/*** alter arrow directions ***/
+.sf-vertical .sf-sub-indicator { background-position: -10px 0; } /* IE6 gets solid image only */
+.sf-vertical a > .sf-sub-indicator { background-position: 0 0; } /* use translucent arrow for modern browsers*/
+
+/* hover arrow direction for modern browsers*/
+.sf-vertical a:focus > .sf-sub-indicator,
+.sf-vertical a:hover > .sf-sub-indicator,
+.sf-vertical a:active > .sf-sub-indicator,
+.sf-vertical li:hover > a > .sf-sub-indicator,
+.sf-vertical li.sfHover > a > .sf-sub-indicator {
+	background-position: -10px 0; /* arrow hovers for modern browsers*/
+}
\ No newline at end of file
diff --git a/share/html/NoAuth/css/base/superfish.css b/share/html/NoAuth/css/base/superfish.css
new file mode 100644
index 0000000..cc33fdb
--- /dev/null
+++ b/share/html/NoAuth/css/base/superfish.css
@@ -0,0 +1,136 @@
+
+/*** ESSENTIAL STYLES ***/
+.sf-menu, .sf-menu * {
+	margin:			0;
+	padding:		0;
+	list-style:		none;
+}
+.sf-menu {
+	line-height:	1.0;
+}
+.sf-menu ul {
+	position:		absolute;
+	top:			-999em;
+	width:			10em; /* left offset of submenus need to match (see below) */
+}
+.sf-menu ul li {
+	width:			100%;
+}
+.sf-menu li:hover {
+	visibility:		inherit; /* fixes IE7 'sticky bug' */
+}
+.sf-menu li {
+	float:			left;
+	position:		relative;
+}
+.sf-menu a {
+	display:		block;
+	position:		relative;
+}
+.sf-menu li:hover ul,
+.sf-menu li.sfHover ul {
+	left:			0;
+	top:			2.5em; /* match top ul list item height */
+	z-index:		99;
+}
+ul.sf-menu li:hover li ul,
+ul.sf-menu li.sfHover li ul {
+	top:			-999em;
+}
+ul.sf-menu li li:hover ul,
+ul.sf-menu li li.sfHover ul {
+	left:			10em; /* match ul width */
+	top:			0;
+}
+ul.sf-menu li li:hover li ul,
+ul.sf-menu li li.sfHover li ul {
+	top:			-999em;
+}
+ul.sf-menu li li li:hover ul,
+ul.sf-menu li li li.sfHover ul {
+	left:			10em; /* match ul width */
+	top:			0;
+}
+
+/*** DEMO SKIN ***/
+.sf-menu {
+	float:			left;
+	margin-bottom:	1em;
+}
+.sf-menu a {
+	border-left:	1px solid #fff;
+	border-top:		1px solid #CFDEFF;
+	padding: 		.75em 1em;
+	text-decoration:none;
+}
+.sf-menu a, .sf-menu a:visited  { /* visited pseudo selector so IE6 applies text colour*/
+	color:			#13a;
+}
+.sf-menu li {
+	background:		#BDD2FF;
+}
+.sf-menu li li {
+	background:		#AABDE6;
+}
+.sf-menu li li li {
+	background:		#9AAEDB;
+}
+.sf-menu li:hover, .sf-menu li.sfHover,
+.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
+	background:		#CFDEFF;
+	outline:		0;
+}
+
+/*** arrows **/
+.sf-menu a.sf-with-ul {
+	padding-right: 	2.25em;
+	min-width:		1px; /* trigger IE7 hasLayout so spans position accurately */
+}
+.sf-sub-indicator {
+	position:		absolute;
+	display:		block;
+	right:			.75em;
+	top:			1.05em; /* IE6 only */
+	width:			10px;
+	height:			10px;
+	text-indent: 	-999em;
+	overflow:		hidden;
+	background:		url('../images/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
+}
+a > .sf-sub-indicator {  /* give all except IE6 the correct values */
+	top:			.8em;
+	background-position: 0 -100px; /* use translucent arrow for modern browsers*/
+}
+/* apply hovers to modern browsers */
+a:focus > .sf-sub-indicator,
+a:hover > .sf-sub-indicator,
+a:active > .sf-sub-indicator,
+li:hover > a > .sf-sub-indicator,
+li.sfHover > a > .sf-sub-indicator {
+	background-position: -10px -100px; /* arrow hovers for modern browsers*/
+}
+
+/* point right for anchors in subs */
+.sf-menu ul .sf-sub-indicator { background-position:  -10px 0; }
+.sf-menu ul a > .sf-sub-indicator { background-position:  0 0; }
+/* apply hovers to modern browsers */
+.sf-menu ul a:focus > .sf-sub-indicator,
+.sf-menu ul a:hover > .sf-sub-indicator,
+.sf-menu ul a:active > .sf-sub-indicator,
+.sf-menu ul li:hover > a > .sf-sub-indicator,
+.sf-menu ul li.sfHover > a > .sf-sub-indicator {
+	background-position: -10px 0; /* arrow hovers for modern browsers*/
+}
+
+/*** shadows for all but IE6 ***/
+.sf-shadow ul {
+	background:	url('../images/shadow.png') no-repeat bottom right;
+	padding: 0 8px 9px 0;
+	-moz-border-radius-bottomleft: 17px;
+	-moz-border-radius-topright: 17px;
+	-webkit-border-top-right-radius: 17px;
+	-webkit-border-bottom-left-radius: 17px;
+}
+.sf-shadow ul.sf-shadow-off {
+	background: transparent;
+}
diff --git a/share/html/NoAuth/css/images/arrows-ffffff.png b/share/html/NoAuth/css/images/arrows-ffffff.png
new file mode 100644
index 0000000..995df52
Binary files /dev/null and b/share/html/NoAuth/css/images/arrows-ffffff.png differ
diff --git a/share/html/NoAuth/css/images/shadow.png b/share/html/NoAuth/css/images/shadow.png
new file mode 100644
index 0000000..c04d21b
Binary files /dev/null and b/share/html/NoAuth/css/images/shadow.png differ
diff --git a/share/html/NoAuth/css/web2/layout.css b/share/html/NoAuth/css/web2/layout.css
index c1f2eb3..75a7b32 100644
--- a/share/html/NoAuth/css/web2/layout.css
+++ b/share/html/NoAuth/css/web2/layout.css
@@ -68,7 +68,7 @@ div#body {
     -webkit-border-top-left-radius: 0.5em;
     -moz-border-radius-bottomleft: 0.5em;
     -webkit-border-bottom-left-radius: 0.5em;
-    margin-left: 10.5em;
+    margin-left: 1em;
     margin-top: 5.6em;
     margin-right: 0;
     margin-bottom: 0em;
@@ -217,8 +217,9 @@ div#quick-personal {
 
 div#header h1 {
  position: absolute;
- left: 7.25em;
+ left: 0.5em;
  right: 20em;
+ top: 3em;
  overflow: hidden;
  height: 1em;
  font-size: 1.4em;
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index 82d57e4..f4cc392 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -45,161 +45,22 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-
-% return 0;
-div#nav {
- position: absolute;
- left: 0;
- font-size: 0.9em;
- top: 3.2em;
- width: 10.5em;
- background: #fff;
- -moz-border-radius-bottomright: 0.5em;
- -webkit-border-bottom-right-radius: 0.5em;
-  border-left: 1px solid #999;  
-border-top: 1px solid #999;
-
- -moz-border-radius-topright: 0.5em;
- -webkit-border-top-right-radius: 0.5em;
- z-index: 99;
-
-
-}
-
-#nav #system-menu {
-    overflow: hidden;
-}
-
-div#nav ul {
- padding-left: 0.75em;
- margin-left: 0;
- padding-right: 0.75em;
- list-style-type: none;
-}
-
-div#nav li:first-child {
- border-top: 1px solid #ccc;
- padding-top: 0.25em;
-
-}
-
-div#nav li {
- padding: 0.125em;
- padding-bottom: 0.25em;
- margin-bottom: 0.25em;
- border-bottom: 1px solid #ccc;
- padding-left: 0.5em;
- margin-right: 0.25em;
- margin-left: 0em;
-}
-
-div#nav li li:first-child {
-    margin-top: 0.25em;
-}
-div#nav li li {
-    margin-left: -0.5em;
-    padding-left: 0.25em;
-    margin-right: -0.5em;
-}
-
-div#nav li li:last-child {
-    margin-bottom: 0; 
-    padding-bottom: 0;
-    border: none;
-}
-
-div#nav .bullet {
- display: none;
-}
-
-div#nav .separator {
-display: none;
-}
-
-
-div#nav a, div#page-navigation a{
- text-decoration: none;
- font-weight: normal;
- color: #000;
-}
-
-div#nav a:hover, div#page-navigation a:hover {
- text-decoration: underline;
-}
-
-
-
-div#nav a.selected, div#page-navigation a.selected {
-  font-weight: bold;
-}
-
-
-div#nav a.selected:after {
-/* content: " > " */
-}
-
-div#page-navigation {
- background: white;
- position: relative;
- width:100%;
- z-index: 10;
-
-}
-
-
-div#page-navigation ul#page-menu {
- display: block;
- position: absolute;
- left: 8em;
- font-size: 0.9em;
- top: 2.3em;
- background-color: white;
- right: 0em;
- padding-top:0.3em;
- padding-bottom:0.5em;
- border-top: 1px solid #aaa;
- overflow: auto;
+#nav {
+    background: #fff;
 }
-
-/* ie hack */
-* html div#page-navigation ul#page-menu {
-    left: 6.5em;
-    top: 3.2em;
-    padding-left: 2em;
-    width: 88%;
+.sf-menu {
+    z-index: 9999;
+    width: 100%;
 }
 
-
-div#page-navigation ul#actions-menu {
- position: absolute;
- right: 0em;
- top: 5.6em;
- margin-top: 0em;
- padding: 0.25em;
- padding-left: 0.5em;
- padding-right: 0.5em;
-
- background: #dedede;
- border-left: 1px solid #aaa;
- border-bottom: 2px solid #aaa;
- -moz-border-radius-bottomleft: 0.5em;
- -webkit-border-bottom-left-radius: 0.5em;
- -moz-border-radius-topright: 0.25em;
- -webkit-border-top-right-radius: 0.25em;
-
-
-
+.sf-menu a {
+    padding-top: 0.5em;
+    padding-bottom: 0.5em;
 }
-
-
-
-div#page-navigation ul li{
- display: inline;
-
+.sf-menu li:hover {
+    background-color: #fff;
 }
 
-
-ul.page-navigation ul.page-menu {
- float: right;
+.sf-menu li, .sf-menu li li, .sf-menu li li li {
+    background-color: #ccc;
 }
-
diff --git a/share/html/NoAuth/js/superfish.js b/share/html/NoAuth/js/superfish.js
new file mode 100644
index 0000000..2d74318
--- /dev/null
+++ b/share/html/NoAuth/js/superfish.js
@@ -0,0 +1,121 @@
+
+/*
+ * Superfish v1.4.8 - jQuery menu widget
+ * Copyright (c) 2008 Joel Birch
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * 	http://www.opensource.org/licenses/mit-license.php
+ * 	http://www.gnu.org/licenses/gpl.html
+ *
+ * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
+ */
+
+;(function($){
+	$.fn.superfish = function(op){
+
+		var sf = $.fn.superfish,
+			c = sf.c,
+			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
+			over = function(){
+				var $$ = $(this), menu = getMenu($$);
+				clearTimeout(menu.sfTimer);
+				$$.showSuperfishUl().siblings().hideSuperfishUl();
+			},
+			out = function(){
+				var $$ = $(this), menu = getMenu($$), o = sf.op;
+				clearTimeout(menu.sfTimer);
+				menu.sfTimer=setTimeout(function(){
+					o.retainPath=($.inArray($$[0],o.$path)>-1);
+					$$.hideSuperfishUl();
+					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
+				},o.delay);
+			},
+			getMenu = function($menu){
+				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
+				sf.op = sf.o[menu.serial];
+				return menu;
+			},
+			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
+
+		return this.each(function() {
+			var s = this.serial = sf.o.length;
+			var o = $.extend({},sf.defaults,op);
+			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
+				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
+					.filter('li:has(ul)').removeClass(o.pathClass);
+			});
+			sf.o[s] = sf.op = o;
+
+			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
+				if (o.autoArrows) addArrow( $('>a:first-child',this) );
+			})
+			.not('.'+c.bcClass)
+				.hideSuperfishUl();
+
+			var $a = $('a',this);
+			$a.each(function(i){
+				var $li = $a.eq(i).parents('li');
+				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
+			});
+			o.onInit.call(this);
+
+		}).each(function() {
+			var menuClasses = [c.menuClass];
+			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
+			$(this).addClass(menuClasses.join(' '));
+		});
+	};
+
+	var sf = $.fn.superfish;
+	sf.o = [];
+	sf.op = {};
+	sf.IE7fix = function(){
+		var o = sf.op;
+		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
+			this.toggleClass(sf.c.shadowClass+'-off');
+		};
+	sf.c = {
+		bcClass     : 'sf-breadcrumb',
+		menuClass   : 'sf-js-enabled',
+		anchorClass : 'sf-with-ul',
+		arrowClass  : 'sf-sub-indicator',
+		shadowClass : 'sf-shadow'
+	};
+	sf.defaults = {
+		hoverClass	: 'sfHover',
+		pathClass	: 'overideThisToUse',
+		pathLevels	: 1,
+		delay		: 800,
+		animation	: {opacity:'show'},
+		speed		: 'normal',
+		autoArrows	: true,
+		dropShadows : true,
+		disableHI	: false,		// true disables hoverIntent detection
+		onInit		: function(){}, // callback functions
+		onBeforeShow: function(){},
+		onShow		: function(){},
+		onHide		: function(){}
+	};
+	$.fn.extend({
+		hideSuperfishUl : function(){
+			var o = sf.op,
+				not = (o.retainPath===true) ? o.$path : '';
+			o.retainPath = false;
+			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
+					.find('>ul').hide().css('visibility','hidden');
+			o.onHide.call($ul);
+			return this;
+		},
+		showSuperfishUl : function(){
+			var o = sf.op,
+				sh = sf.c.shadowClass+'-off',
+				$ul = this.addClass(o.hoverClass)
+					.find('>ul:hidden').css('visibility','visible');
+			sf.IE7fix.call($ul);
+			o.onBeforeShow.call($ul);
+			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
+			return this;
+		}
+	});
+
+})(jQuery);
diff --git a/share/html/NoAuth/js/supersubs.js b/share/html/NoAuth/js/supersubs.js
new file mode 100644
index 0000000..a6fce65
--- /dev/null
+++ b/share/html/NoAuth/js/supersubs.js
@@ -0,0 +1,90 @@
+
+/*
+ * Supersubs v0.2b - jQuery plugin
+ * Copyright (c) 2008 Joel Birch
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * 	http://www.opensource.org/licenses/mit-license.php
+ * 	http://www.gnu.org/licenses/gpl.html
+ *
+ *
+ * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of
+ * their longest list item children. If you use this, please expect bugs and report them
+ * to the jQuery Google Group with the word 'Superfish' in the subject line.
+ *
+ */
+
+;(function($){ // $ will refer to jQuery within this closure
+
+	$.fn.supersubs = function(options){
+		var opts = $.extend({}, $.fn.supersubs.defaults, options);
+		// return original object to support chaining
+		return this.each(function() {
+			// cache selections
+			var $$ = $(this);
+			// support metadata
+			var o = $.meta ? $.extend({}, opts, $$.data()) : opts;
+			// get the font size of menu.
+			// .css('fontSize') returns various results cross-browser, so measure an em dash instead
+			var fontsize = $('<li id="menu-fontsize">&#8212;</li>').css({
+				'padding' : 0,
+				'position' : 'absolute',
+				'top' : '-999em',
+				'width' : 'auto'
+			}).appendTo($$).width(); //clientWidth is faster, but was incorrect here
+			// remove em dash
+			$('#menu-fontsize').remove();
+			// cache all ul elements
+			$ULs = $$.find('ul');
+			// loop through each ul in menu
+			$ULs.each(function(i) {
+				// cache this ul
+				var $ul = $ULs.eq(i);
+				// get all (li) children of this ul
+				var $LIs = $ul.children();
+				// get all anchor grand-children
+				var $As = $LIs.children('a');
+				// force content to one line and save current float property
+				var liFloat = $LIs.css('white-space','nowrap').css('float');
+				// remove width restrictions and floats so elements remain vertically stacked
+				var emWidth = $ul.add($LIs).add($As).css({
+					'float' : 'none',
+					'width'	: 'auto'
+				})
+				// this ul will now be shrink-wrapped to longest li due to position:absolute
+				// so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
+				.end().end()[0].clientWidth / fontsize;
+				// add more width to ensure lines don't turn over at certain sizes in various browsers
+				emWidth += o.extraWidth;
+				// restrict to at least minWidth and at most maxWidth
+				if (emWidth > o.maxWidth)		{ emWidth = o.maxWidth; }
+				else if (emWidth < o.minWidth)	{ emWidth = o.minWidth; }
+				emWidth += 'em';
+				// set ul to width in ems
+				$ul.css('width',emWidth);
+				// restore li floats to avoid IE bugs
+				// set li width to full width of this ul
+				// revert white-space to normal
+				$LIs.css({
+					'float' : liFloat,
+					'width' : '100%',
+					'white-space' : 'normal'
+				})
+				// update offset position of descendant ul to reflect new width of parent
+				.each(function(){
+					var $childUl = $('>ul',this);
+					var offsetDirection = $childUl.css('left')!==undefined ? 'left' : 'right';
+					$childUl.css(offsetDirection,emWidth);
+				});
+			});
+
+		});
+	};
+	// expose defaults
+	$.fn.supersubs.defaults = {
+		minWidth		: 9,		// requires em unit.
+		maxWidth		: 25,		// requires em unit.
+		extraWidth		: 0			// extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values
+	};
+
+})(jQuery); // plugin code ends

commit bc0d1b243bcf0fce4be3eb7507351ba83471e81f
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 18 12:28:22 2010 +0900

    dashboard nav cleanup

diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index c4eb1d3..dc17cd7 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -47,14 +47,13 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
 <& /Dashboards/Elements/Tabs,
-    current_subtab => $current_subtab,
     Title => $title,
     DashboardObj => $DashboardObj &>
 
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<%RT->Config->Get('WebPath')%>/Dashboards/Subscription.html" method="post" enctype="multipart/form-data" name="SubscribeDashboard">
-<input type="hidden" class="hidden" name="DashboardId" value="<% $fields{'DashboardId'} %>" />
+<input type="hidden" class="hidden" name="Id" value="<% $fields{'Id'} %>" />
 <table width="100%" border="0">
 <tr>
 
@@ -183,8 +182,6 @@
 
 <%INIT>
 
-my $current_subtab = 'Dashboards/Subscription.html?DashboardId=' . $DashboardId;
-
 my ($title, @results);
 my ($val, $msg);
 my $Loaded = 0;
@@ -197,20 +194,20 @@ my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'});
 
 # first let's see if we already have a subscription to this DashboardId
 for my $sub ($session{'CurrentUser'}->UserObj->Attributes->Named('Subscription')) {
-    next unless $sub->SubValue('DashboardId') == $DashboardId;
+    next unless $sub->SubValue('DashboardId') == $id;
     $SubscriptionObj = $sub;
     last;
 }
 
-$DashboardId = $SubscriptionObj->Id
+$id = $SubscriptionObj->Id
              ? $SubscriptionObj->SubValue('DashboardId')
-             : $ARGS{'DashboardId'};
+             : $ARGS{'id'};
 
-($val, $msg) = $DashboardObj->LoadById($DashboardId);
-$val || Abort(loc("Couldn't load dashboard [_1]: [_2].", $DashboardId, $msg));
+($val, $msg) = $DashboardObj->LoadById($id);
+$val || Abort(loc("Couldn't load dashboard [_1]: [_2].", $id, $msg));
 
 my %fields = (
-    DashboardId => $DashboardId,
+    DashboardId => $id,
     Frequency   => 'daily',
     Hour        => '06:00',
     Dow         => 'Monday',
@@ -238,9 +235,9 @@ for my $field (keys %fields) {
 if (defined $ARGS{Save}) {
     # update
     if ($SubscriptionObj->Id) {
-        $DashboardId = delete $fields{'DashboardId'}; # immutable
+        $id = delete $fields{'DashboardId'}; # immutable
         ($val, $msg) = $SubscriptionObj->SetSubValues(%fields);
-        $fields{'DashboardId'} = $DashboardId;
+        $fields{'DashboardId'} = $id;
 
         # not so good to spew base64-encoded data at the user :)
         if ($msg =~ /^Content changed from/) {
@@ -251,12 +248,12 @@ if (defined $ARGS{Save}) {
     }
     # create
     else {
-        Abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $DashboardId))
+        Abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $id))
             unless $DashboardObj->CurrentUserCanSubscribe;
 
         my ($val, $msg) = $SubscriptionObj->Create(
             Name        => 'Subscription',
-            Description => 'Subscription to dashboard ' . $DashboardId,
+            Description => 'Subscription to dashboard ' . $id,
             ContentType => 'storable',
             Object      => $session{'CurrentUser'}->UserObj,
             Content     => \%fields,
@@ -281,7 +278,7 @@ else {
 
 </%INIT>
 <%ARGS>
-$DashboardId => undef
+$id => undef
 $Frequency   => undef
 $Hour        => undef
 $Dow         => undef
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 641c8d2..d10c1ec 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -59,7 +59,7 @@
 <a name="skipnav" id="skipnav" accesskey="8"></a>
 <%INIT>
 
-my $request_path = $HTML::Mason::Commands::m->request_comp->path;
+my $request_path = $HTML::Mason::Commands::r->uri;
 
 my $query_string = sub {
     my %args = @_;
@@ -94,8 +94,13 @@ if ( $request_path =~ qr{.*} ) {
     }
 
     my $tools = Menu->child( loc('Tools'), path => '/Tools/index.html' );
-    $tools->child( loc('Dashboards'), path => '/Dashboards/index.html' );
+    my $dashes = $tools->child( loc('Dashboards'), path => '/Dashboards/index.html' );
 
+    $dashes->child( loc('Select'), path => "/Dashboards/index.html" );
+    my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
+    if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
+        $dashes->child( loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
+    }
     my $reports = $tools->child( loc('Reports'),
                                  path => '/Tools/Reports/index.html' );
     $reports->child( loc('Resolved by owner'),
@@ -208,32 +213,18 @@ if ( $request_path =~ qr{.*} ) {
 
 }
 
-if ( $request_path =~ qr'Dashboards/?' ) {
-    require RT::Dashboard;    # not a record class, so not autoloaded :/
-    PageMenu->child( loc('Select'), path => "/Dashboards/index.html" );
-    my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
-    if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
-        PageMenu->child(
-                loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
-    }
-}
-
-if ( $request_path =~ qr'Dashboards/(\d*)?' ) {
+if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
     if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
         my $obj = RT::Dashboard->new( $session{'CurrentUser'} );
         $obj->LoadById($id);
         if ( $obj and $obj->id ) {
-            my $tabs = PageMenu->child(
-                              "this" => title => $obj->Name,
-                              path => "/Dashboards/Modify.html?id=" . $obj->id
-            );
+            my $tabs = PageMenu;
             $tabs->child( loc('Basics'),
                           path => "/Dashboards/Modify.html?id=" . $obj->id );
-            $tabs->child( loc('Queries'),
+            $tabs->child( loc('Content'),
                           path => "/Dashboards/Queries.html?id=" . $obj->id );
             $tabs->child( loc('Subscription'),
-                         path => "/Dashboards/Subscription.html?dashboard_id="
-                             . $obj->id )
+                         path => "/Dashboards/Subscription.html?id=" . $obj->id )
                 if $obj->CurrentUserCanSubscribe;
             $tabs->child( loc('Show'),
                         path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
@@ -415,7 +406,7 @@ if ( $request_path =~ qr'Admin/Rules' ) {
 
 if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
     my $search = Menu()->child('search');
-    my $actions = PageMenu()->child( transitions => title => lc('Actions') );
+    my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order => 99 );
     if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
         my $id  = $1;
         my $obj = RT::Ticket->new( $session{'CurrentUser'} );
@@ -598,23 +589,6 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
     }
 }
 
-if ( $request_path =~ qr'User/Group' ) {
-    if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::User->new( $session{'CurrentUser'} );
-        $obj->Load($id);
-        my $group = PageMenu->child(
-                          path => "/User/Groups/Modify.html?id=" . $obj->id );
-        $group->child( loc('Basics'),
-                       path => "/User/Groups/Modify.html?id=" . $obj->id );
-        $group->child( loc('Members'),
-                       path => "/User/Groups/Members.html?id=" . $obj->id );
-
-    }
-    PageMenu( loc('Select') => path => "/User/Groups/index.html" );
-    PageMenu( loc('Create') => path => "/User/Groups/Modify.html?Create=1",
-              separator     => 1 );
-
-}
 
 if ( $request_path =~ qr'Prefs' ) {
 
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index f4cc392..345d96a 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -48,6 +48,14 @@
 #nav {
     background: #fff;
 }
+
+#page-navigation {
+    position: absolute;
+    top: 7.8em;
+    right: 0em;
+    left: auto;
+    z-index: 9999;
+}
 .sf-menu {
     z-index: 9999;
     width: 100%;

commit bbeb1832defd9adf068856edf7fb75e2ac00ff2b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 18 12:31:40 2010 +0900

    prefs nav rectification

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index d10c1ec..d83e2a4 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -75,6 +75,7 @@ $PREFS_NAV->child( loc('About me'), path => '/User/Prefs.html', );
 $PREFS_NAV->child( loc('Search options'),
                    path => '/Prefs/SearchOptions.html', );
 $PREFS_NAV->child( loc('RT at a glance'), path => '/Prefs/MyRT.html', );
+$PREFS_NAV->child( 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html' );
 
 if ( $request_path =~ qr{.*} ) {
     Menu->child( home => title =>  loc('HomePage'), path => '/' );
@@ -590,11 +591,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
 }
 
 
-if ( $request_path =~ qr'Prefs' ) {
 
-    PageMenu->child( 'Quick search' => title => loc('Quick search'),
-                     path => '/Prefs/Quicksearch.html' );
-}
 
 
 </%INIT>

commit 143a56a5eb98a3fa6f3e42520d8df8ef1843f155
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Oct 18 14:00:39 2010 +0900

    move menu to the upper right-hand corner

diff --git a/share/html/Elements/Logout b/share/html/Elements/Logout
index 3f5bca7..e69de29 100644
--- a/share/html/Elements/Logout
+++ b/share/html/Elements/Logout
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
- | <a href="<% RT->Config->Get('WebPath') %>/NoAuth/Logout.html<% $URL ? "?URL=". $URL : '' %>"><&|/l&>Logout</&></a>
-<%ARGS>
-$URL => undef
-</%ARGS>
-<%INIT>
-my $show = 0;
-if ( $session{'CurrentUser'}->Name
-    && ( !RT->Config->Get('WebExternalAuth')
-        || RT->Config->Get('WebFallbackToInternalAuth')
-    )
-) {
-    $show = 1;
-}
-
-$m->callback( %ARGS, URL => \$URL, show => \$show );
-
-return unless $show;
-</%INIT>
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 3dd8a56..58f9b04 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -55,7 +55,7 @@
 </div>
 
 % if ( $show_menu ) {
-<div id="nav"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
+<div id="main-navigation"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
 
 <div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu' &></div>
 % }
diff --git a/share/html/Elements/PersonalQuickbar b/share/html/Elements/PersonalQuickbar
index 6e4aecd..0c6893e 100644
--- a/share/html/Elements/PersonalQuickbar
+++ b/share/html/Elements/PersonalQuickbar
@@ -51,10 +51,8 @@ $Prefs => '/Prefs/Other.html'
 <div id="quick-personal">
     <span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span>
 % if ($session{'CurrentUser'}->Name) {
-    <&|/l, "<span>".$session{'CurrentUser'}->Name."</span>" &>Logged in as [_1]</&>
 % } else {
     <&|/l&>Not logged in.</&>
 % }
 % $m->callback( %ARGS );
-<& Logout, %ARGS &>
 </div>
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index d83e2a4..250a6c9 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -68,15 +68,6 @@ my $query_string = sub {
     return $u->query;
 };
 
-my $PREFS_NAV = RT::Interface::Web::Menu->new(
-               { title => loc('Preferences'), path => '/Prefs/Other.html' } );
-$PREFS_NAV->child( loc('Settings'), path => '/Prefs/Other.html', );
-$PREFS_NAV->child( loc('About me'), path => '/User/Prefs.html', );
-$PREFS_NAV->child( loc('Search options'),
-                   path => '/Prefs/SearchOptions.html', );
-$PREFS_NAV->child( loc('RT at a glance'), path => '/Prefs/MyRT.html', );
-$PREFS_NAV->child( 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html' );
-
 if ( $request_path =~ qr{.*} ) {
     Menu->child( home => title =>  loc('HomePage'), path => '/' );
     my $tickets = Menu->child( search => title => loc('Tickets'),
@@ -198,22 +189,29 @@ if ( $request_path =~ qr{.*} ) {
         $admin_tools->child( loc('Shredder'),
                              path => '/Admin/Tools/Shredder', );
     }
+    my $about_me =  Menu->child( 'preferences' => title => loc("Logged in as [_1]", $session{'CurrentUser'}->Name), sort_rder => 99 );
     if ( $session{'CurrentUser'}->UserObj
          && $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf',
                                                Object => $RT::System )
        )
     {
+$about_me->child( loc('Settings'), path => '/Prefs/Other.html', );
+$about_me->child( loc('About me'), path => '/User/Prefs.html', );
+$about_me->child( loc('Search options'),
+                   path => '/Prefs/SearchOptions.html', );
+$about_me->child( loc('RT at a glance'), path => '/Prefs/MyRT.html', );
+$about_me->child( 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html' );
 
-        if ( $session{'CurrentUser'}
-             ->HasRight( Right => 'ModifySelf', Object => $RT::System ) )
-        {
 
-            Menu->child( 'Preferences' => menu => $PREFS_NAV, Order => 99 );
-        }
+if ( $session{'CurrentUser'}->Name
+    && ( !RT->Config->Get('WebExternalAuth')
+        || RT->Config->Get('WebFallbackToInternalAuth')
+    )
+) {
+  $about_me->child(logout => title => loc('Logout'),  path =>'NoAuth/Logout.html');
     }
-
 }
-
+}
 if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
     if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
         my $obj = RT::Dashboard->new( $session{'CurrentUser'} );
diff --git a/share/html/NoAuth/css/web2/layout.css b/share/html/NoAuth/css/web2/layout.css
index 75a7b32..511418e 100644
--- a/share/html/NoAuth/css/web2/layout.css
+++ b/share/html/NoAuth/css/web2/layout.css
@@ -69,7 +69,7 @@ div#body {
     -moz-border-radius-bottomleft: 0.5em;
     -webkit-border-bottom-left-radius: 0.5em;
     margin-left: 1em;
-    margin-top: 5.6em;
+    margin-top: 3em;
     margin-right: 0;
     margin-bottom: 0em;
     min-height: 10%;
@@ -219,7 +219,7 @@ div#header h1 {
  position: absolute;
  left: 0.5em;
  right: 20em;
- top: 3em;
+ top: 1.6em;
  overflow: hidden;
  height: 1em;
  font-size: 1.4em;
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index 345d96a..652a38e 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -45,19 +45,22 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-#nav {
-    background: #fff;
+#main-navigation {
+    position: absolute;
+    top: 0;
+    right: 0;
+    left: auto;
+    z-index: 9999;
 }
 
 #page-navigation {
     position: absolute;
-    top: 7.8em;
+    top: 5.5em;
     right: 0em;
     left: auto;
-    z-index: 9999;
+    z-index: 9995;
 }
 .sf-menu {
-    z-index: 9999;
     width: 100%;
 }
 
@@ -70,5 +73,5 @@
 }
 
 .sf-menu li, .sf-menu li li, .sf-menu li li li {
-    background-color: #ccc;
+    background-color: #eee;
 }

commit f4f37ef8f14877e0d60081a97dacae97a91429ca
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Oct 20 17:57:40 2010 +0900

    Continued updates to admin ui

diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index 10907b3..f996358 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -58,7 +58,7 @@ use Scalar::Util qw(weaken);
 
 __PACKAGE__->mk_accessors(qw(
     title sort_order link target escape_title class render_children_inline
-    raw_html
+    raw_html key
 ));
 
 =head1 NAME
@@ -222,6 +222,7 @@ sub child {
         } else {
             $child = $proto->new(
                 {   parent     => $self,
+                    key         => $key,
                     title        => $key,
                     escape_title => 1,
                     %args
diff --git a/share/html/Admin/Queues/CustomFields.html b/share/html/Admin/Queues/CustomFields.html
index addce57..dc4ceb8 100755
--- a/share/html/Admin/Queues/CustomFields.html
+++ b/share/html/Admin/Queues/CustomFields.html
@@ -48,8 +48,6 @@
 <& /Admin/Elements/Header, Title => $title &>
 <&    /Admin/Elements/QueueTabs,
     id => $Object->id, 
-    current_tab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id", 
-    current_subtab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id", 
     QueueObj => $Object,
     Title => $title
     &>
@@ -63,7 +61,7 @@ my $FriendlySubTypes =
   RT::CustomField->new( $session{'CurrentUser'} )
   ->FriendlyLookupType( $Object->CustomFieldLookupType );
 
-my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name );
+my $title = loc( 'Custom Fields for queue [_1]', $Object->Name );
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index d784adb..3916508 100755
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -158,7 +158,7 @@ if ($Create) {
     else {
         $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort(loc("Couldn't load queue '[_1]'", $Name));
     }
-    $title = loc('Editing Configuration for queue [_1]', $QueueObj->Name);
+    $title = loc('Configuration for queue [_1]', $QueueObj->Name);
     
     $current_tab = 'Admin/Queues/Modify.html?id='.$QueueObj->id;
 }
diff --git a/share/html/Admin/Queues/People.html b/share/html/Admin/Queues/People.html
index 4dfeb77..7091d13 100755
--- a/share/html/Admin/Queues/People.html
+++ b/share/html/Admin/Queues/People.html
@@ -45,11 +45,11 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &>
+<& /Elements/Header, Title => $title &>
+
 <& /Admin/Elements/QueueTabs, id => $id, 
     QueueObj => $QueueObj,                                                      
-    current_tab => $current_tab, 
-    Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &>
+    Title => $title &>
 
 <& /Elements/ListActions, actions => \@results &>
 
@@ -131,13 +131,6 @@
 my $current_tab;
 my ($field, @results, $User, $Users, $Groups, $watcher, $user_msg, $group_msg);
 
-# Load the queue
-#If we get handed two ids, mason will make them an array. bleck.
-# We want teh first one. Just because there's no other sensible way
-# to deal
-
-
-
 my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id));
 
@@ -163,7 +156,6 @@ unless ($OnlySearchForPeople or $OnlySearchForGroup) {
 
         next unless RT::Queue->IsManageableRoleGroupType($type);
 
-        $RT::Logger->debug("Adding a watcher $id to $type\n");
         my ($code, $msg) = $QueueObj->AddWatcher(
             Type => $type,
             PrincipalId => $id,
@@ -196,7 +188,7 @@ if ( $ARGS{'GroupString'} ) {
 } else {
     $group_msg = loc("No principals selected.");
 }
-$current_tab = 'Admin/Queues/People.html?id=' . $QueueObj->id;
+my $title = loc('People related to queue [_1]', $QueueObj->Name);
 </%INIT>
 
 <%ARGS>
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index c109e93..d3295b9 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -48,9 +48,6 @@
 <& /Admin/Elements/Header, Title => $title &>
 <& /Admin/Elements/QueueTabs, id => $Queue, 
     QueueObj => $QueueObj,
-     current_tab => 'Admin/Queues/Templates.html?id='.$Queue,
-     current_subtab => $current_subtab, 
-     subtabs => $subtabs, 
      Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
@@ -75,59 +72,49 @@
 
 <%INIT>
 
-my $TemplateObj = RT::Template->new($session{'CurrentUser'});
-my  ($title, @results, $current_subtab, $SubmitLabel);
+my $TemplateObj = RT::Template->new( $session{'CurrentUser'} );
+my $QueueObj;
+my $SubmitLabel;
+my $title;
+my @results;
 
-my $subtabs = {
-		 A => { title => loc('Select template'),
-  		     	path => "Admin/Queues/Templates.html?id=$Queue"
-			   },
-		 B => { title => loc('New template'),
-  		     	path => "Admin/Queues/Template.html?Create=1&Queue=$Queue",
-			separator => 1,
-			   }
-	      };
+if ( !$Create ) {
+    if ( $Template eq 'new' ) {
+        my ( $val, $msg )
+            = $TemplateObj->Create( Queue => $Queue, Name => $Name );
+        Abort( loc( "Could not create template: [_1]", $msg ) ) unless ($val);
+        push @results, $msg;
+    } else {
+        $TemplateObj->Load($Template) || Abort( loc('No Template') );
+    }
 
-if ($Create) {
-  $title = loc("Create a template");
-  $current_subtab = "Admin/Queues/Template.html?Create=1&Queue=".$Queue;
-  $SubmitLabel = loc('Create');
 }
 
-else {
-  if ($Template eq 'new') {
-      my ($val, $msg) =  $TemplateObj->Create(Queue => $Queue, Name => $Name);
-      Abort(loc("Could not create template: [_1]", $msg)) unless ($val);
-     push @results, $msg;
-    }
-    else {
-       $TemplateObj->Load($Template) || Abort(loc('No Template'));
-    }
-     $title = loc('Modify template [_1]', loc($TemplateObj->Name())); 
-     $SubmitLabel = loc('Save Changes');
-  
-    
-}
-my $QueueObj;
-if ($TemplateObj->Id()) {
-  $Queue = $TemplateObj->Queue;
-  $QueueObj = $TemplateObj->QueueObj;
+if ( $TemplateObj->Id() ) {
+    $Queue    = $TemplateObj->Queue;
+    $QueueObj = $TemplateObj->QueueObj;
+
+    my @attribs = qw( Description Content Queue Name Type );
+    my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
+                                       Object        => $TemplateObj,
+                                       ARGSRef       => \%ARGS
+                                     );
+    push @results, @aresults;
 
-  my @attribs = qw( Description Content Queue Name Type );
-  my @aresults = UpdateRecordObject( AttributesRef => \@attribs, 
-				     Object => $TemplateObj, 
-				     ARGSRef => \%ARGS);
-  $current_subtab = "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id();
-  $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()),
-  		     	path => "Admin/Queues/Template.html?Queue=$Queue&Template=".$TemplateObj->Id(),
-			};
-  push @results, @aresults;
+    my ( $ok, $msg ) = $TemplateObj->CompileCheck;
+    push @results, $msg if !$ok;
+} else {
+    $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
+    $QueueObj->Load($Queue);
+}
 
-  my ($ok, $msg) = $TemplateObj->CompileCheck;
-  push @results, $msg if !$ok;
+if ($Create) {
+    $title = loc( 'Create a new template for queue [_1]', $QueueObj->Name );
+    $SubmitLabel = loc('Create');
 } else {
-  $QueueObj = RT::Queue->new($session{'CurrentUser'});
-  $QueueObj->Load($Queue);
+
+    $title = loc( 'Modify template [_1] for queue [_2]', loc( $TemplateObj->Name()), $QueueObj->Name  );
+    $SubmitLabel = loc('Save Changes');
 }
 
 </%INIT>
diff --git a/share/html/Admin/Queues/Templates.html b/share/html/Admin/Queues/Templates.html
index 86091e8..8d84c48 100755
--- a/share/html/Admin/Queues/Templates.html
+++ b/share/html/Admin/Queues/Templates.html
@@ -47,10 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
 <& /Admin/Elements/QueueTabs, id => $QueueObj->id, 
-    current_tab => 'Admin/Queues/Templates.html?id='.$id, 
-    current_subtab => 'Admin/Queues/Templates.html?id='.$id, 
         QueueObj => $QueueObj,
-    subtabs => $subtabs, 
     Title => $title &>
 
 <& /Admin/Elements/EditTemplates, title => $title, %ARGS &>
@@ -59,21 +56,10 @@
 my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id);
 
-my ($title, $current_subtab);
-
-if ($QueueObj->id) {
-    $title = loc("Edit Templates for queue [_1]", $QueueObj->Name);
-} else {
+if (!$QueueObj->id) {
     Abort(loc("Queue [_1] not found",$id));
 }
-my $subtabs = {
-	 A => { title => loc('Select'),
-	     	path => "Admin/Queues/Templates.html?id=".$id,
-		   },
-	 B => { title => loc('Create'),
-	     	path => "Admin/Queues/Template.html?Create=1&Queue=".$id,
-		   }
-	      };
+my $title = loc("Templates for queue [_1]", $QueueObj->Name);
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index d47abdb..dcaa673 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -45,11 +45,14 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<ul <%$id ? "id=\"$id\"" : '' |n%> <% $toplevel? 'class="sf-menu sf-js-enabled sf-shadow' : '' |n %>">
+<ul <%$id ? 'id="'.$id.'"' : '' |n%><% $toplevel? 'class="sf-menu sf-js-enabled sf-shadow"' : '' |n %>>
 % for my $child ($menu->children) {
-<li><a href="<%RT->Config->Get('WebPath')%><%$child->path%>"><%$child->title%></a>
+<li>
+<a id="<%$parent_id%>-<%$child->key%>"  \
+<% $child->path ? 'href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%> \
+><%$child->title%></a>
 % next unless ($child->has_children);
-<& Menu, menu => $child, toplevel => 0 &>
+<& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key &>
 </li>
 % }
 </ul>
@@ -59,4 +62,5 @@
 $menu
 $id => undef
 $toplevel => 1
+$parent_id => ''
 </%ARGS>
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 250a6c9..3770277 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -114,22 +114,35 @@ if ( $request_path =~ qr{.*} ) {
     {
         my $admin = Menu->child( Config => title => loc('Configuration'),
                                  path   => '/Admin/' );
-        $admin->child( loc('Users'),  path => '/Admin/Users/', );
-        $admin->child( loc('Groups'), path => '/Admin/Groups/', );
-        my $queues = $admin->child( queues => title => loc('Queues'),
-                                    path => '/Admin/Queues/', );
+        my $users = $admin->child( loc('Users'),  path => '/Admin/Users/', );
+        $users->child( loc('Select'), path => "/Admin/Users/" );
+        $users->child( loc('Create'), path => "/Admin/Users/Modify.html?Create=1" );
+
+
+        my $groups = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
+
+        $groups->child( loc('Select'), path => "/Admin/Groups/" );
+        $groups->child( loc('Create'), path => "/Admin/Groups/Modify.html?Create=1" );
+
+
+        my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
-        $queues->child( loc('Create'),
-                        path => "/Admin/Queues/Modify.html?Create=1" );
-        $admin->child( loc('Custom Fields'), path => '/Admin/CustomFields/',
+        $queues->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
+        my $cfs = $admin->child( loc('Custom Fields'), path => '/Admin/CustomFields/',
         );
-        $admin->child( loc('Rules'), path => '/admin/rules/', );
+        $cfs->child( loc('Select'), path => "/Admin/CustomFields/" );
+        $cfs->child( loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
 
         my $admin_global
             = $admin->child( loc('Global'), path => '/Admin/Global/', );
 
-        $admin_global->child( loc('Templates'),
+        my $scrips = $admin_global->child( loc('Scrips'), path => '/Admin/Global/Scripshtml', );
+        $scrips->child( loc('Select'), path => "/Admin/Global/Scrips.html" );
+        $scrips->child( loc('Create'), path => "/Admin/Global/Scrip.html?Create=1" );
+        my $templates = $admin_global->child( loc('Templates'),
                               path => '/Admin/Global/Templates.html', );
+        $templates->child( loc('Select'), path => "/Admin/Global/Templates.html" );
+        $templates->child( loc('Create'), path => "/Admin/Global/Template.html?Create=1" );
 
 #        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
 #        {
@@ -270,25 +283,27 @@ if ( $request_path =~ qr'/SelfService' ) {
 }
 
 if ( $request_path =~ qr'Admin/Queues' ) {
-    if ( $session{'CurrentUser'}
-         ->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
     {
     }
-    if ( my $id = $m->request_args->{'id'} ) {
+    if ( my $id = $m->request_args->{'id'} ||$m->request_args->{'Queue'}) {
         my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
         $queue_obj->Load($id);
 
-        my $queue
-            = PageMenu->child(
-                   $queue_obj->Name => path => "/Admin/Queues/Modify.html?id="
-                       . $id );
-        $queue->child( loc('Basics'),
+        my $queue = PageMenu();
+        $queue->child( basics => title =>loc('Basics'),
                        path => "/Admin/Queues/Modify.html?id=" . $id );
-        $queue->child( loc('Watchers'),
+        $queue->child( people => title => loc('Watchers'),
                        path => "/Admin/Queues/People.html?id=" . $id );
-        $queue->child( loc('Templates'),
+        my $templates = $queue->child( templates => title => loc('Templates'),
                        path => "/Admin/Queues/Templates.html?id=" . $id );
 
+
+
+        $templates->child(select => title => loc('Select'), path => "/Admin/Queues/Templates.html?id=".$id
+);
+        $templates->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Template.html?Create=1;Queue=".$id );
+
         $queue->child( loc('Ticket Custom Fields'),
              path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id='
                  . $id );
@@ -309,10 +324,8 @@ if ( $request_path =~ qr'/Admin/Users' ) {
     if ( $session{'CurrentUser'}
          ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
     {
-        PageMenu->child( loc('Select'), path => "/Admin/Users/" );
-        PageMenu->child( loc('Create'),
-                         path      => "/Admin/Users/Modify.html?Create=1",
-                         separator => 1
+        PageMenu->child(select => title => loc('Select'), path => "/Admin/Users/" );
+        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1",
                        );
     }
     if ( my $id = $m->request_args->{'id'} ) {

commit 2169ddc9a5f006f5b80fd29c391d4f467b673871
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 09:57:38 2010 -0400

    continued menuing improvements.

diff --git a/lib/RT/Test/Web.pm b/lib/RT/Test/Web.pm
index 6fac2ef..e6bb0e7 100644
--- a/lib/RT/Test/Web.pm
+++ b/lib/RT/Test/Web.pm
@@ -90,7 +90,7 @@ sub login {
         Test::More::diag("error: page has no Logout");
         return 0;
     }
-    unless ( $self->content =~ m{<span>\Q$user\E</span>}i ) {
+    unless ( $self->content =~ m{<span class="current-user">\Q$user\E</span>}i ) {
         Test::More::diag("Page has no user name");
         return 0;
     }
diff --git a/share/html/Approvals/index.html b/share/html/Approvals/index.html
index debf9aa..a6b81c2 100755
--- a/share/html/Approvals/index.html
+++ b/share/html/Approvals/index.html
@@ -49,7 +49,7 @@
 <& /Approvals/Elements/Tabs, Title => loc("My approvals") &>
 
 <& /Elements/ListActions, actions => \@actions &>
-<form method="post">
+<form method="post" name="Approvals" id="Approvals">
 <& Elements/PendingMyApproval, %ARGS &>
 <& /Elements/Submit, Label => loc('Go!') &>
 </form>
diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index fa7d9e0..a6f6e39 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -87,6 +87,7 @@
 
 <div id="quickbar">
   <& /Elements/PersonalQuickbar, %ARGS &>
+</div>
 % }
 
 <%INIT>
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index dcaa673..d03bbe1 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -50,7 +50,13 @@
 <li>
 <a id="<%$parent_id%>-<%$child->key%>"  \
 <% $child->path ? 'href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%> \
-><%$child->title%></a>
+> \
+% if ($child->escape_title) {
+<%$child->title |n%>
+% } else {
+<%$child->title%>
+% }
+</a>
 % next unless ($child->has_children);
 <& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key &>
 </li>
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 58f9b04..2b92c97 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -51,14 +51,12 @@
 % }
 </div>
 
-%# End of div#quickbar from /Elements/Header
-</div>
-
 % if ( $show_menu ) {
 <div id="main-navigation"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
 
 <div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu' &></div>
 % }
+<div id="widgets"><& /Elements/Widgets &></div>
 <script type="text/javascript">
 jQuery(document).ready(function(){ jQuery("#app-nav").superfish(); });
 jQuery(document).ready(function(){ jQuery("#page-menu").superfish(); });
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 3770277..40ce353 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -72,6 +72,8 @@ if ( $request_path =~ qr{.*} ) {
     Menu->child( home => title =>  loc('HomePage'), path => '/' );
     my $tickets = Menu->child( search => title => loc('Tickets'),
                                path => '/Search/Build.html' );
+    $tickets->child( simple => title => loc('Simple Search') => path =>
+                     "/Search/Simple.html" );
     $tickets->child( new => title => loc('New Search') => path =>
                      "/Search/Build.html?NewQuery=1" );
     my $new = $tickets->child( create => title => loc('New ticket'),
@@ -202,28 +204,37 @@ if ( $request_path =~ qr{.*} ) {
         $admin_tools->child( loc('Shredder'),
                              path => '/Admin/Tools/Shredder', );
     }
-    my $about_me =  Menu->child( 'preferences' => title => loc("Logged in as [_1]", $session{'CurrentUser'}->Name), sort_rder => 99 );
+    my $about_me = Menu->child(
+                    'preferences' => title =>
+                        loc('Logged in as <span class="current-user">[_1]</span>',
+                        $session{'CurrentUser'}->Name
+                        ),
+                    escape_title => 1,
+                    sort_order   => 99
+    );
     if ( $session{'CurrentUser'}->UserObj
          && $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf',
                                                Object => $RT::System )
        )
     {
-$about_me->child( loc('Settings'), path => '/Prefs/Other.html', );
-$about_me->child( loc('About me'), path => '/User/Prefs.html', );
-$about_me->child( loc('Search options'),
-                   path => '/Prefs/SearchOptions.html', );
-$about_me->child( loc('RT at a glance'), path => '/Prefs/MyRT.html', );
-$about_me->child( 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html' );
-
-
-if ( $session{'CurrentUser'}->Name
-    && ( !RT->Config->Get('WebExternalAuth')
-        || RT->Config->Get('WebFallbackToInternalAuth')
-    )
-) {
-  $about_me->child(logout => title => loc('Logout'),  path =>'NoAuth/Logout.html');
+        $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html', );
+        $about_me->child( about_me => title => loc('About me'), path => '/User/Prefs.html', );
+        $about_me->child( search_options => title => loc('Search options'),
+                          path => '/Prefs/SearchOptions.html', );
+        $about_me->child( myrt => title =>  loc('RT at a glance'), path => '/Prefs/MyRT.html',
+        );
+        $about_me->child( quicksearch => title => 'Quick search' => title => loc('Quick search'),
+                          path => '/Prefs/Quicksearch.html' );
+    }
+
+    if ( $session{'CurrentUser'}->Name
+         && (   !RT->Config->Get('WebExternalAuth')
+              || RT->Config->Get('WebFallbackToInternalAuth') )
+       )
+    {
+        $about_me->child( logout => title => loc('Logout'),
+                          path   => 'NoAuth/Logout.html' );
     }
-}
 }
 if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
     if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
@@ -360,6 +371,7 @@ if ( $request_path =~ qr'Admin/Groups' ) {
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
+        if ($obj->id) {
         my $tabs = PageMenu->child( $obj->Name,
                         path => "/Admin/CustomFields/Modify.html?id=" . $id );
         $tabs->child( loc('Basics') => path => "/Admin/Groups/Modify.html?id="
@@ -375,6 +387,7 @@ if ( $request_path =~ qr'Admin/Groups' ) {
         $tabs->child(
                     loc('History') => path => "/Admin/Groups/History.html?id="
                         . $obj->id );
+        }
     }
 }
 
@@ -599,9 +612,49 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                      loc('Bulk Update') => path => "/Search/Bulk.html$args" );
 
     }
+
 }
 
 
+    if ( $request_path =~ /^\/(?:index.html|$)/ ) {
+
+        my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
+        my $limit      = 7;
+
+        $m->callback( Dashboards   => \@dashboards,
+                      Limit        => \$limit,
+                      CallbackName => 'MassageDashboards',
+                    );
+
+        my $more = 0;
+        if ( @dashboards > $limit ) {
+            $more = 1;
+            splice @dashboards, $limit;
+        }
+
+        my $position = 0;
+
+        for my $dash (@dashboards) {
+            PageMenu->child(
+                        'dashboard-' . $dash->id,
+                        title => $dash->Name,
+                        path => 'Dashboards/' . $dash->id . '/' . $dash->Name,
+            );
+        }
+
+        PageMenu()->child( home => title => loc('Home'), path => 'index.html' );
+
+        if ($more) {
+            $tabs->{"D-more"} = { title => loc('More'),
+                                  path  => 'Dashboards/index.html',
+                                };
+        }
+
+    }
+
+
+
+
 
 
 
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index a1a6bf9..d726dcc 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -59,7 +59,7 @@
     &>
 
 <& /Elements/ListActions, actions => \@results &>
-<form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data">
+<form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data" name="BulkUpdate" id="BulkUpdate">
 % foreach my $var (qw(Query Format OrderBy Order Rows Page SavedChartSearchId)) {
 <input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var} || ''%>" />
 %}
diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
index 75872ab..7f84c1b 100755
--- a/share/html/Ticket/Modify.html
+++ b/share/html/Ticket/Modify.html
@@ -53,7 +53,7 @@
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
 
 <& /Elements/ListActions, actions => \@results &>
-<form method="post" action="Modify.html" enctype="multipart/form-data">
+<form method="post" action="Modify.html" enctype="multipart/form-data" name="TicketModify" id="TicketModify">
 % $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
 <input type="hidden" class="hidden" name="id" value="<% $TicketObj->Id %>" />
 
diff --git a/t/approval/admincc.t b/t/approval/admincc.t
index 614ecc6..67bf5af 100644
--- a/t/approval/admincc.t
+++ b/t/approval/admincc.t
@@ -247,7 +247,7 @@ $m_ceo->content_contains('second approval', 'ceo: see both approvals');
 
 # now let's approve the first one via cto
 $m->submit_form(
-    form_number => 3,
+    form_name   => 'Approvals',
     fields      => { 'Approval-' . $first_approval->id . '-Action' => 'approve', },
 );
 
@@ -261,7 +261,7 @@ $m_ceo->content_lacks( 'first approval', 'ceo: first approval is gone' );
 $m_ceo->content_contains( 'second approval', 'ceo: second approval is still here' );
 
 $m_coo->submit_form(
-    form_number => 3,
+    form_name => 'Approvals',
     fields      => { 'Approval-' . $second_approval->id . '-Action' => 'approve', },
 );
 
diff --git a/t/customfields/access_via_queue.t b/t/customfields/access_via_queue.t
index e7d816e..3bc4c62 100644
--- a/t/customfields/access_via_queue.t
+++ b/t/customfields/access_via_queue.t
@@ -118,7 +118,7 @@ diag "check that we have no the CF on the create";
     $m->content_lacks($cf_name, "don't see CF");
 
     $m->follow_link( text => 'Custom Fields' );
-    $form = $m->form_number(3);
+    $form = $m->form_name('TicketModify');
     $cf_field = "Object-RT::Ticket-$tid-CustomField-". $cf->id ."-Value";
     ok !$form->find_input( $cf_field ), 'no form field on the page';
 }
@@ -143,7 +143,7 @@ diag "check that owner can see and edit CF";
     $m->content_contains($cf_name, "see CF");
 
     $m->follow_link( text => 'Custom Fields' );
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     my $cf_field = "Object-RT::Ticket-$tid-CustomField-". $cf->id ."-Value";
     ok $form->find_input( $cf_field ), 'form field on the page';
 
diff --git a/t/customfields/ip.t b/t/customfields/ip.t
index 0078082..a7616d6 100644
--- a/t/customfields/ip.t
+++ b/t/customfields/ip.t
@@ -82,7 +82,7 @@ diag "create a ticket and edit IP field using Edit page"
 
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
 
     is( $agent->value($cf_field), '', 'IP is empty' );
     $agent->field( $cf_field => $val );
@@ -99,7 +99,7 @@ diag "create a ticket and edit IP field using Edit page"
     $val = "  172.16.0.2  \n  ";
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     is( $agent->value($cf_field), '172.16.0.1', 'IP is in input box' );
     $agent->field( $cf_field => $val );
     $agent->click('SubmitTicket');
@@ -278,7 +278,7 @@ diag "test the operators in search page" if $ENV{'TEST_VERBOSE'};
 {
     $agent->get_ok( $baseurl . "/Search/Build.html?Query=Queue='General'" );
     $agent->content_contains('CF.{IP}', 'got CF.{IP}');
-    my $form = $agent->form_number(3);
+    my $form = $agent->form_name('BuildQuery');
     my $op = $form->find_input("'CF.{IP}'Op");
     ok( $op, "found 'CF.{IP}'Op" );
     is_deeply( [ $op->possible_values ], [ '=', '!=', '<', '>' ], 'op values' );
diff --git a/t/customfields/iprange.t b/t/customfields/iprange.t
index 81493fc..b8cc6ea 100644
--- a/t/customfields/iprange.t
+++ b/t/customfields/iprange.t
@@ -99,7 +99,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
 
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
 
     like( $agent->value($cf_field), qr/^\s*$/, 'IP is empty' );
     $agent->field( $cf_field => $val );
@@ -116,7 +116,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     $val = "  172.16.0.2  \n  ";
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     like( $agent->value($cf_field),
         qr/^\s*\Q172.16.0.1\E\s*$/, 'IP is in input box' );
     $agent->field( $cf_field => $val );
@@ -133,7 +133,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     $val = '172.16.0.0-172.16.0.255';
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     like( $agent->value($cf_field),
         qr/^\s*\Q172.16.0.2\E\s*$/, 'IP is in input box' );
     $agent->field( $cf_field => $val );
@@ -150,7 +150,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     $val = '172.16/16';
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     is( $agent->value($cf_field),
         '172.16.0.0-172.16.0.255', 'IP is in input box' );
     $agent->field( $cf_field => $val );
@@ -461,7 +461,7 @@ diag "test the operators in search page" if $ENV{'TEST_VERBOSE'};
 {
     $agent->get_ok( $baseurl . "/Search/Build.html?Query=Queue='General'" );
     $agent->content_contains('CF.{IP}', 'got CF.{IP}');
-    my $form = $agent->form_number(3);
+    my $form = $agent->form_name('BuildQuery');
     my $op = $form->find_input("'CF.{IP}'Op");
     ok( $op, "found 'CF.{IP}'Op" );
     is_deeply( [ $op->possible_values ], [ '=', '!=', '<', '>' ], 'op values' );
diff --git a/t/customfields/iprangev6.t b/t/customfields/iprangev6.t
index 63bfdc7..7c2f645 100644
--- a/t/customfields/iprangev6.t
+++ b/t/customfields/iprangev6.t
@@ -115,7 +115,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
 
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
 
     is( $agent->value($cf_field), '', 'IP is empty' );
     $agent->field( $cf_field => $val );
@@ -131,7 +131,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     diag "set IP with spaces around" if $ENV{'TEST_VERBOSE'};
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     is( $agent->value($cf_field), $val, 'IP is in input box' );
     $val = 'bbcd' . ':abcd' x 7;
     $agent->field( $cf_field => "   $val   " );
@@ -147,7 +147,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     diag "replace IP with a range" if $ENV{'TEST_VERBOSE'};
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     is( $agent->value($cf_field), $val, 'IP is in input box' );
     $val = 'abcd' . ':0000' x 7 . '-' . 'abcd' . ':ffff' x 7;
     $agent->field( $cf_field => 'abcd::/16' );
@@ -163,7 +163,7 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     diag "delete range, add another range using CIDR" if $ENV{'TEST_VERBOSE'};
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     is( $agent->value($cf_field), $val, 'IP is in input box' );
     $val = 'bb00' . ':0000' x 7 . '-' . 'bbff' . ':ffff' x 7;
     $agent->field( $cf_field => $val );
diff --git a/t/customfields/ipv6.t b/t/customfields/ipv6.t
index 8b11df5..2eb08c4 100644
--- a/t/customfields/ipv6.t
+++ b/t/customfields/ipv6.t
@@ -100,7 +100,7 @@ diag "create a ticket and edit IP field using Edit page"
 
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
 
     is( $agent->value($cf_field), '', 'IP is empty' );
     $agent->field( $cf_field => $valid{$ip} );
@@ -120,7 +120,7 @@ diag "create a ticket and edit IP field using Edit page"
 
     $agent->follow_link_ok( { text => 'Basics', n => "1" },
         "Followed 'Basics' link" );
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     is( $agent->value($cf_field), $valid{$ip}, 'IP is in input box' );
     $agent->field( $cf_field => $new_ip );
     $agent->click('SubmitTicket');
diff --git a/t/lifecycles/basics.t b/t/lifecycles/basics.t
index b5e472e..60ffbbb 100644
--- a/t/lifecycles/basics.t
+++ b/t/lifecycles/basics.t
@@ -82,7 +82,7 @@ diag "new ->(open it)-> open";
     }
 
     $m->follow_link_ok({text => 'Open It'});
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->click('SubmitTicket');
 
     is $tstatus->($tid), 'open', 'changed status';
@@ -111,7 +111,7 @@ diag "open ->(stall)-> stalled";
     }
 
     $m->follow_link_ok({text => 'Stall'});
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->click('SubmitTicket');
 
     is $tstatus->($tid), 'stalled', 'changed status';
@@ -149,7 +149,7 @@ diag "open -> deleted, only via modify";
     is $tstatus->($tid), 'open', 'ticket is open';
 
     $m->get_ok( '/Ticket/Modify.html?id='. $tid );
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input('Status'), 'found status selector';
 
     my @form_values = $input->possible_values;
@@ -168,7 +168,7 @@ diag "deleted -> X via modify, only open is available";
     is $tstatus->($tid), 'deleted', 'ticket is deleted';
 
     $m->get_ok( '/Ticket/Modify.html?id='. $tid );
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input('Status'), 'found status selector';
 
     my @form_values = $input->possible_values;
diff --git a/t/ticket/scrips_batch.t b/t/ticket/scrips_batch.t
index b52a26b..d62fb3a 100644
--- a/t/ticket/scrips_batch.t
+++ b/t/ticket/scrips_batch.t
@@ -21,7 +21,7 @@ my $sid;
     $m->follow_link_ok( { text => $queue->Name } );
     $m->follow_link_ok( { text => 'Scrips' } );
     $m->follow_link_ok( { url_regex => qr'Scrip.html\?create=1' } );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->field('Scrip-new-Description' => 'test');
     $m->select('Scrip-new-ScripCondition' => 'On Transaction');
     $m->select('Scrip-new-ScripAction' => 'User Defined');
@@ -34,7 +34,7 @@ my $sid;
 
     ($sid) = ($m->content =~ /Scrip\s*#(\d+)/);
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     is $m->value("Scrip-$sid-Description"), 'test', 'correct description';
     is value_name($form, "Scrip-$sid-ScripCondition"), 'On Transaction', 'correct condition';
     is value_name($form, "Scrip-$sid-ScripAction"), 'User Defined', 'correct action';
@@ -62,13 +62,13 @@ END
     $m->submit;
 
     $m->goto_create_ticket( $queue );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit;
 
     is_deeply parse_handle($tmp_fh), ['Create'], 'Create';
 
     $m->follow_link_ok( { text => 'Resolve' } );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->field( "UpdateContent" => 'resolve it' );
     $m->click('SubmitTicket');
 
diff --git a/t/web/attachment_encoding.t b/t/web/attachment_encoding.t
index 85c5bbc..323f2bc 100644
--- a/t/web/attachment_encoding.t
+++ b/t/web/attachment_encoding.t
@@ -19,7 +19,7 @@ diag 'test without attachments' if $ENV{TEST_VERBOSE};
 {
     $m->get_ok( $baseurl . '/Ticket/Create.html?Queue=1' );
 
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         form_number => 3,
         fields      => { Subject => '标题', Content => '测试' },
@@ -54,7 +54,7 @@ diag 'test with attachemnts' if $ENV{TEST_VERBOSE};
 
     $m->get_ok( $baseurl . '/Ticket/Create.html?Queue=1' );
 
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         form_number => 3,
         fields => { Subject => '标题', Content => '测试', Attach => $file },
diff --git a/t/web/basic.t b/t/web/basic.t
index dafe6bf..06d05b6 100644
--- a/t/web/basic.t
+++ b/t/web/basic.t
@@ -28,7 +28,7 @@ my $url = $agent->rt_base_url;
 {
     $agent->goto_create_ticket(1);
     is ($agent->status, 200, "Loaded Create.html");
-    $agent->form_number(3);
+    $agent->form_name('TicketCreate');
     my $string = Encode::decode_utf8("I18N Web Testing æøå");
     $agent->field('Subject' => "Ticket with utf8 body");
     $agent->field('Content' => $string);
@@ -49,7 +49,7 @@ my $url = $agent->rt_base_url;
 {
     $agent->goto_create_ticket(1);
     is ($agent->status, 200, "Loaded Create.html");
-    $agent->form_number(3);
+    $agent->form_name('TicketCreate');
 
     my $string = Encode::decode_utf8("I18N Web Testing æøå");
     $agent->field('Subject' => $string);
@@ -70,7 +70,7 @@ my $url = $agent->rt_base_url;
 # Update time worked in hours
 {
     $agent->follow_link( text_regex => qr/Basics/ );
-    $agent->submit_form( form_number => 3,
+    $agent->submit_form( form_name => 'TicketModify',
         fields => { TimeWorked => 5, 'TimeWorked-TimeUnits' => "hours" }
     );
 
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index b870914..276293e 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -115,7 +115,7 @@ diag "check that we have no the CF on the create"
 
     $m->follow_link( text => 'Custom Fields' );
     $m->content_lacks('Upload multiple images', 'has no upload image field');
-    $form = $m->form_number(3);
+    $form = $m->form_name('TicketModify');
     $upload_field = "Object-RT::Ticket-$tid-CustomField-$cfid-Upload";
     ok !$form->find_input( $upload_field ), 'no form field on the page';
 }
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index d24950e..40600db 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -88,7 +88,7 @@ diag 'check search build page';
 {
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
 
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     my ($cf_op) =
       $m->find_all_inputs( type => 'option', name_regex => qr/test cf date/ );
     is_deeply(
@@ -112,7 +112,7 @@ diag 'check search build page';
     $m->content_lacks( '2010-05-06', 'did not get the wrong ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -123,7 +123,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
@@ -134,7 +134,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -145,7 +145,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 0 tickets', 'Found 0 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -156,7 +156,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 0 tickets', 'Found 0 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index cc98872..33b868d 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -124,7 +124,7 @@ diag 'check search build page';
 {
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
 
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     my ($cf_op) =
       $m->find_all_inputs( type => 'option', name_regex => qr/test cf datetime/ );
     is_deeply(
@@ -159,7 +159,7 @@ diag 'check search build page';
     $m->login( 'shanghai', 'password', logout => 1 );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -170,7 +170,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -181,7 +181,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 2 ticket', 'Found 2 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
@@ -192,7 +192,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 2 tickets', 'Found 2 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -203,7 +203,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index 8161208..fd57883 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -95,12 +95,12 @@ diag "check that values of the CF are case insensetive(asd vs. ASD)";
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
-    my $value = $m->form_number(3)->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
+    my $value = $m->form_name('TicketModify')->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
     is lc $value, 'asd', 'correct value is selected';
     $m->submit;
     $m->content_unlike(qr/\Q$cf_name\E.*?changed/mi, 'field is not changed');
 
-    $value = $m->form_number(3)->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
+    $value = $m->form_name('TicketModify')->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
     is lc $value, 'asd', 'the same value is still selected';
 
     my $ticket = RT::Ticket->new( RT->SystemUser );
@@ -117,14 +117,14 @@ diag "check that 0 is ok value of the CF";
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
-    my $value = $m->form_number(3)->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
+    my $value = $m->form_name('TicketModify')->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
     is lc $value, 'asd', 'correct value is selected';
     $m->select("Object-RT::Ticket-$tid-CustomField-$cfid-Values" => 0 );
     $m->submit;
     $m->content_like(qr/\Q$cf_name\E.*?changed/mi, 'field is changed');
     $m->content_lacks('0 is no longer a value for custom field', 'no bad message in results');
 
-    $value = $m->form_number(3)->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
+    $value = $m->form_name('TicketModify')->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
     is lc $value, '0', 'new value is selected';
 
     my $ticket = RT::Ticket->new( RT->SystemUser );
@@ -141,13 +141,13 @@ diag "check that we can set empty value when the current is 0";
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
-    my $value = $m->form_number(3)->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
+    my $value = $m->form_name('TicketModify')->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
     is lc $value, '0', 'correct value is selected';
     $m->select("Object-RT::Ticket-$tid-CustomField-$cfid-Values" => '' );
     $m->submit;
     $m->content_contains('0 is no longer a value for custom field', '0 is no longer a value');
 
-    $value = $m->form_number(3)->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
+    $value = $m->form_name('TicketModify')->value("Object-RT::Ticket-$tid-CustomField-$cfid-Values");
     is $value, '', '(no value) is selected';
 
     my $ticket = RT::Ticket->new( RT->SystemUser );
diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index 96e91a5..303bcb2 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -389,7 +389,7 @@ like($m->content, qr/$key1/, "first key shows up in preferences");
 like($m->content, qr/$key2/, "second key shows up in preferences");
 like($m->content, qr/$key1.*?$key2/s, "first key shows up before the second");
 
-$m->form_number(3);
+$m->form_name('TicketModify');
 $m->select("PreferredKey" => $key2);
 $m->submit;
 
diff --git a/t/web/dashboard_with_deleted_saved_search.t b/t/web/dashboard_with_deleted_saved_search.t
index a7225ce..60c0179 100644
--- a/t/web/dashboard_with_deleted_saved_search.t
+++ b/t/web/dashboard_with_deleted_saved_search.t
@@ -39,7 +39,7 @@ $m->submit_form(
 );
 
 $m->content_contains('Saved dashboard bar', 'dashboard saved' );
-my $dashboard_queries_link = $m->find_link( text_regex => qr/Queries/ );
+my $dashboard_queries_link = $m->find_link( text_regex => qr/Content/ );
 my ( $dashboard_id ) = $dashboard_queries_link->url =~ /id=(\d+)/;
 
 $m->get_ok( $url . "/Dashboards/Queries.html?id=$dashboard_id" );
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index b3fee67..64f1370 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -64,7 +64,7 @@ $m->content_contains("Create");
 $m->get_ok($url."Dashboards/index.html");
 $m->content_contains("New", "'New' link because we now have ModifyOwnDashboard");
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok({ id => 'Tools-Dashboards-Create'});
 $m->form_name('ModifyDashboard');
 $m->field("Name" => 'different dashboard');
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
@@ -84,13 +84,13 @@ $m->content_lacks("Permission denied");
 
 $m->follow_link_ok({text => "different dashboard"});
 $m->content_contains("Basics");
-$m->content_contains("Queries");
+$m->content_contains("Content");
 $m->content_lacks("Subscription", "we don't have the SubscribeDashboard right");
 
 $m->follow_link_ok({text => "Basics"});
 $m->content_contains("Modify the dashboard different dashboard");
 
-$m->follow_link_ok({text => "Queries"});
+$m->follow_link_ok({text => "Content"});
 $m->content_contains("Modify the queries of dashboard different dashboard");
 my $form = $m->form_name('Dashboard-Searches-body');
 my @input = $form->find_input('Searches-body-Available');
@@ -231,7 +231,7 @@ $m->click_button(value => 'Create');
 $m->content_lacks("No permission to create dashboards");
 $m->content_contains("Saved dashboard system dashboard");
 
-$m->follow_link_ok({text => 'Queries'});
+$m->follow_link_ok({text => 'Content'});
 
 $form = $m->form_name('Dashboard-Searches-body');
 @input = $form->find_input('Searches-body-Available');
diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index 619812b..a91af23 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -20,7 +20,7 @@ diag "check that signing doesn't work if there is no key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Sign => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -47,7 +47,7 @@ diag "check that things don't work if there is no key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -61,7 +61,7 @@ diag "check that things don't work if there is no key";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok !$form->find_input( 'UseKey-rt-test at example.com' ), 'no key selector';
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -85,7 +85,7 @@ diag "check that things still doesn't work if key is not trusted";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -99,7 +99,7 @@ diag "check that things still doesn't work if key is not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 1, 'one option';
 
@@ -134,7 +134,7 @@ diag "check that things still doesn't work if two keys are not trusted";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -148,7 +148,7 @@ diag "check that things still doesn't work if two keys are not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -181,7 +181,7 @@ diag "check that we see key selector even if only one key is trusted but there a
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -195,7 +195,7 @@ diag "check that we see key selector even if only one key is trusted but there a
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -210,7 +210,7 @@ diag "check that key selector works and we can select trusted key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -224,7 +224,7 @@ diag "check that key selector works and we can select trusted key";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -244,7 +244,7 @@ diag "check encrypting of attachments";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -259,7 +259,7 @@ diag "check encrypting of attachments";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index b0f1498..29482dd 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -33,7 +33,7 @@ diag "check that signing doesn't work if there is no key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Sign => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -63,7 +63,7 @@ diag "check that things don't work if there is no key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -77,7 +77,7 @@ diag "check that things don't work if there is no key";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok !$form->find_input( 'UseKey-rt-test at example.com' ), 'no key selector';
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -103,7 +103,7 @@ diag "check that things still doesn't work if key is not trusted";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -117,7 +117,7 @@ diag "check that things still doesn't work if key is not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 1, 'one option';
 
@@ -153,7 +153,7 @@ diag "check that things still doesn't work if two keys are not trusted";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -167,7 +167,7 @@ diag "check that things still doesn't work if two keys are not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -201,7 +201,7 @@ diag "check that we see key selector even if only one key is trusted but there a
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -215,7 +215,7 @@ diag "check that we see key selector even if only one key is trusted but there a
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -231,7 +231,7 @@ diag "check that key selector works and we can select trusted key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -245,7 +245,7 @@ diag "check that key selector works and we can select trusted key";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -266,7 +266,7 @@ diag "check encrypting of attachments";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -281,7 +281,7 @@ diag "check encrypting of attachments";
         'problems with keys'
     );
 
-    my $form = $m->form_number(3);
+    my $form = $m->form_name('TicketModify');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
diff --git a/t/web/gnupg-tickyboxes.t b/t/web/gnupg-tickyboxes.t
index 05239c1..a922f82 100644
--- a/t/web/gnupg-tickyboxes.t
+++ b/t/web/gnupg-tickyboxes.t
@@ -66,7 +66,7 @@ diag "check in read-only mode that queue's props influence create/update ticket
     foreach my $variant ( @variants ) {
         set_queue_crypt_options( %$variant );
         $m->get( $m->rt_base_url . "/Ticket/Update.html?Action=Respond&id=$id" );
-        $m->form_number(3);
+        $m->form_name('TicketModify');
         if ( $variant->{'Encrypt'} ) {
             ok $m->value('Encrypt', 2), "encrypt tick box is checked";
         } else {
diff --git a/t/web/html_template.t b/t/web/html_template.t
index 0976847..99c72b0 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -22,8 +22,8 @@ diag('make Autoreply template a html one and add utf8 chars')
     $m->follow_link_ok( { text => 'Templates' },     '-> Templates' );
     $m->follow_link_ok( { text => 'Autoreply' },     '-> Autoreply' );
 
-    $m->form_number(3);
     $m->submit_form(
+
         fields => {
             Content => <<'EOF',
 Subject: AutoReply: {$Ticket->Subject}
@@ -46,9 +46,8 @@ diag('create a ticket to see the autoreply mail') if $ENV{TEST_VERBOSE};
 {
     $m->get_ok( $baseurl . '/Ticket/Create.html?Queue=1' );
 
-    $m->form_number(3);
     $m->submit_form(
-        form_number => 3,
+        form_name => 'TicketCreate',
         fields      => { Subject => '标题', Content => '测试', },
     );
     $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
diff --git a/t/web/query_builder.t b/t/web/query_builder.t
index fec5128..c0f7b49 100644
--- a/t/web/query_builder.t
+++ b/t/web/query_builder.t
@@ -143,7 +143,7 @@ diag "click advanced, enter 'C1 OR ( C2 AND C3 )', apply, aggregators should sta
 {
     my $response = $agent->get($url."Search/Edit.html");
     ok( $response->is_success, "Fetched /Search/Edit.html" );
-    ok($agent->form_number(3), "found the form");
+    ok($agent->form_name('TicketModify'), "found the form");
     $agent->field("Query", "Status = 'new' OR ( Status = 'open' AND Subject LIKE 'office' )");
     $agent->submit;
     is( getQueryFromForm,
@@ -225,7 +225,7 @@ diag "input a condition, select (several conditions), click delete";
 {
     my $response = $agent->get( $url."Search/Edit.html" );
     ok $response->is_success, "Fetched /Search/Edit.html";
-    ok $agent->form_number(3), "found the form";
+    ok $agent->form_name('TicketModify'), "found the form";
     $agent->field("Query", "( Status = 'new' OR Status = 'open' )");
     $agent->submit;
     is( getQueryFromForm,
diff --git a/t/web/rights.t b/t/web/rights.t
index 01b62c4..886c847 100644
--- a/t/web/rights.t
+++ b/t/web/rights.t
@@ -16,7 +16,7 @@ sub get_rights {
     my $agent = shift;
     my $principal_id = shift;
     my $object = shift;
-    $agent->form_number(3);
+    $agent->form_name('TicketModify');
     my @inputs = $agent->current_form->find_input("SetRights-$principal_id-$object");
     my @rights = sort grep $_, map $_->possible_values, grep $_ && $_->value, @inputs;
     return @rights;
@@ -33,7 +33,7 @@ my ($everyone, $everyone_gid);
 diag "revoke all global rights from Everyone group";
 my @has = get_rights( $m, $everyone_gid, 'RT::System-1' );
 if ( @has ) {
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->untick("SetRights-$everyone_gid-RT::System-1", $_) foreach @has;
     $m->submit;
     
@@ -44,7 +44,7 @@ if ( @has ) {
 
 diag "grant SuperUser right to everyone";
 {
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick("SetRights-$everyone_gid-RT::System-1", 'SuperUser');
     $m->submit;
 
@@ -56,7 +56,7 @@ diag "grant SuperUser right to everyone";
 
 diag "revoke the right";
 {
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->untick("SetRights-$everyone_gid-RT::System-1", 'SuperUser');
     $m->submit;
 
@@ -69,7 +69,7 @@ diag "revoke the right";
 
 diag "return rights the group had in the beginning";
 if ( @has ) {
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->tick("SetRights-$everyone_gid-RT::System-1", $_) for @has;
     $m->submit;
 
diff --git a/t/web/search_bulk_update_links.t b/t/web/search_bulk_update_links.t
index 29b99e9..9307dda 100644
--- a/t/web/search_bulk_update_links.t
+++ b/t/web/search_bulk_update_links.t
@@ -41,7 +41,7 @@ $m->get_ok( $url . "/Search/Bulk.html?Query=id=$search_tickets[0]&Rows=10" );
 $m->content_contains( 'Current Links', 'has current links part' );
 $m->content_lacks( 'DeleteLink--', 'no delete link stuff' );
 $m->submit_form(
-    form_number => 3,
+    form_name => 'BulkUpdate',
     fields      => {
         'Ticket-DependsOn' => $link_tickets[0],
         'Ticket-MemberOf'  => $link_tickets[1],
@@ -77,7 +77,7 @@ $m->get_ok( $url . "/Search/Bulk.html?Query=$query&Rows=10" );
 $m->content_contains( 'Current Links', 'has current links part' );
 $m->content_lacks( 'DeleteLink--', 'no delete link stuff' );
 
-$m->form_number(3);
+$m->form_name('BulkUpdate');
 my @fields = qw/Owner AddRequestor DeleteRequestor AddCc DeleteCc AddAdminCc
 DeleteAdminCc Subject Priority Queue Status Starts_Date Told_Date Due_Date
 Resolved_Date UpdateSubject UpdateContent/;
@@ -87,7 +87,7 @@ for my $field ( @fields ) {
 
 # test DependsOn, MemberOf and RefersTo
 $m->submit_form(
-    form_number => 3,
+    form_name => 'BulkUpdate',
     fields      => {
         'Ticket-DependsOn' => $link_tickets[0],
         'Ticket-MemberOf'  => $link_tickets[1],
@@ -106,7 +106,7 @@ $m->content_contains(
     'found refers to link' );
 
 $m->submit_form(
-    form_number => 3,
+    form_name => 'BulkUpdate',
     fields      => {
         "DeleteLink--DependsOn-fsck.com-rt://$rtname/ticket/$link_tickets[0]" =>
           1,
@@ -122,7 +122,7 @@ $m->content_lacks( 'DeleteLink--', 'links are all deleted' );
 # test DependedOnBy, Members and ReferredToBy
 
 $m->submit_form(
-    form_number => 3,
+    form_name => 'BulkUpdate',
     fields      => {
         'DependsOn-Ticket' => $link_tickets[0],
         'MemberOf-Ticket'  => $link_tickets[1],
@@ -141,7 +141,7 @@ $m->content_contains(
     'found referrd to link' );
 
 $m->submit_form(
-    form_number => 3,
+    form_name => 'BulkUpdate',
     fields      => {
         "DeleteLink-fsck.com-rt://$rtname/ticket/$link_tickets[0]-DependsOn-" =>
           1,
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
index 461ebb8..49fe4ee 100644
--- a/t/web/ticket-create-utf8.t
+++ b/t/web/ticket-create-utf8.t
@@ -32,7 +32,7 @@ ok $m->login, 'logged in';
 # create a ticket with a subject only
 foreach my $test_str ( $ru_test, $l1_test ) {
     ok $m->goto_create_ticket( $q ), "go to create ticket";
-    $m->form_number(3);
+    $m->form_name('TicketModify');
     $m->field( Subject => $test_str );
     $m->submit;
 
@@ -49,7 +49,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
 foreach my $test_str ( $ru_test, $l1_test ) {
     foreach my $support_str ( $ru_support, $l1_support ) {
         ok $m->goto_create_ticket( $q ), "go to create ticket";
-        $m->form_number(3);
+        $m->form_name('TicketModify');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
         $m->submit;
@@ -72,7 +72,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
 foreach my $test_str ( $ru_test, $l1_test ) {
     foreach my $support_str ( $ru_support, $l1_support ) {
         ok $m->goto_create_ticket( $q ), "go to create ticket";
-        $m->form_number(3);
+        $m->form_name('TicketModify');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
         $m->submit;
diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index 2e562f9..815f542 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -95,7 +95,7 @@ diag "user A can not change owner after create";
     my $test_cb = sub {
         my $agent = shift;
         $agent->get("/Ticket/Modify.html?id=$id");
-        my $form = $agent->form_number(3);
+        my $form = $agent->form_name('TicketModify');
         is $form->value('Owner'), $user_b->id, 'correct owner selected';
         $agent->select('Owner', RT->Nobody->id);
         $agent->submit;
@@ -130,7 +130,7 @@ diag "on reply correct owner is selected";
     $agent_a->goto_ticket( $id );
     $agent_a->follow_link_ok({text => 'Reply'}, 'Ticket -> Basics');
 
-    my $form = $agent_a->form_number(3);
+    my $form = $agent_a->form_name('TicketModify');
     is $form->value('Owner'), '', 'empty value selected';
     $agent_a->submit;
 
diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index 6aff007..f2ce71b 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -95,7 +95,7 @@ diag "user A can not change owner after create";
     my $test_cb = sub {
         my $agent = shift;
         $agent->get("/Ticket/Modify.html?id=$id");
-        my $form = $agent->form_number(3);
+        my $form = $agent->form_name('TicketModify');
         is $form->value('Owner'), $user_b->Name, 'correct owner selected';
         $form->value('Owner', RT->Nobody->Name);
         $agent->submit;
@@ -130,7 +130,7 @@ diag "on reply correct owner is selected";
     $agent_a->goto_ticket( $id );
     $agent_a->follow_link_ok({text => 'Reply'}, 'Ticket -> Basics');
 
-    my $form = $agent_a->form_number(3);
+    my $form = $agent_a->form_name('TicketModify');
     is $form->value('Owner'), '', 'empty value selected';
     $agent_a->submit;
 

commit 451a483ab14452f28bb97316904d38eb04c2170f
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 10:53:54 2010 -0400

    further cleanups to menuing. temporarily(?) add back old search and
    ticket create widgets

diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index d03bbe1..2dd99e4 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -47,8 +47,10 @@
 %# END BPS TAGGED BLOCK }}}
 <ul <%$id ? 'id="'.$id.'"' : '' |n%><% $toplevel? 'class="sf-menu sf-js-enabled sf-shadow"' : '' |n %>>
 % for my $child ($menu->children) {
+%   my $item_id = lc($parent_id."-".$child->key);
+%   $item_id =~ s/\s/-/g;
 <li>
-<a id="<%$parent_id%>-<%$child->key%>"  \
+<a id="<%$item_id%>" \
 <% $child->path ? 'href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%> \
 > \
 % if ($child->escape_title) {
@@ -63,6 +65,7 @@
 % }
 </ul>
 <%INIT>
+
 </%INIT>
 <%ARGS>
 $menu
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 40ce353..9324d7a 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -130,13 +130,13 @@ if ( $request_path =~ qr{.*} ) {
         my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
         $queues->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
-        my $cfs = $admin->child( loc('Custom Fields'), path => '/Admin/CustomFields/',
+        my $cfs = $admin->child( customfields => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
         );
-        $cfs->child( loc('Select'), path => "/Admin/CustomFields/" );
-        $cfs->child( loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
+        $cfs->child( select => title => loc('Select'), path => "/Admin/CustomFields/" );
+        $cfs->child( create => title => loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
 
         my $admin_global
-            = $admin->child( loc('Global'), path => '/Admin/Global/', );
+            = $admin->child( global=> title => loc('Global'), path => '/Admin/Global/', );
 
         my $scrips = $admin_global->child( loc('Scrips'), path => '/Admin/Global/Scripshtml', );
         $scrips->child( loc('Select'), path => "/Admin/Global/Scrips.html" );
@@ -414,7 +414,7 @@ if ( $request_path =~ qr'Admin/CustomFields/' ) {
         $tabs->child( loc('User Rights') => path =>
                       "/Admin/CustomFields/UserRights.html?id=" . $id );
 
-        if ( $obj->lookup_type =~ /^RT::Queue-/io ) {
+        if ( $obj->LookupType =~ /^RT::Queue-/io ) {
             $tabs->child( loc('Applies to'),
                        path => "/Admin/CustomFields/Objects.html?id=" . $id );
         }
diff --git a/share/html/Elements/Widgets b/share/html/Elements/Widgets
new file mode 100644
index 0000000..f87a68a
--- /dev/null
+++ b/share/html/Elements/Widgets
@@ -0,0 +1,4 @@
+<div class="widgets">
+<& /Elements/SimpleSearch &>
+<& /Elements/CreateTicket &>
+</div>

commit 8cb37fdf3975aae50ed62067a2d17bdd37df0a58
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 10:54:20 2010 -0400

    continue cleaning up t/web/cf_date.t

diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index 40600db..085f216 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -15,11 +15,7 @@ my $cf_name = 'test cf date';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is( q/RT Administration/, 'admin screen' );
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is( q/Select a Custom Field/, 'admin-cf screen' );
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-customfields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields    => {
@@ -38,13 +34,13 @@ my $queue = RT::Test->load_or_create_queue( Name => 'General' );
 ok $queue && $queue->id, 'loaded or created queue';
 
 {
-    $m->follow_link( text => 'Queues' );
+    $m->follow_link( id => 'config-queues-select');
     $m->title_is( q/Admin queues/, 'admin-queues screen' );
     $m->follow_link( text => 'General' );
-    $m->title_is( q/Editing Configuration for queue General/,
+    $m->title_is( q/Configuration for queue General/,
         'admin-queue: general' );
     $m->follow_link( text => 'Ticket Custom Fields' );
-    $m->title_is( q/Edit Custom Fields for General/,
+    $m->title_is( q/Custom Fields for queue General/,
         'admin-queue: general cfid' );
 
     $m->form_name('EditCustomFields');

commit 780d40f6ad8d2337dbed260c80d4853fd7f511aa
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 11:27:14 2010 -0400

    Menuing HTML is now pretty and ~well indented and easy to read

diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 2dd99e4..a35b7f7 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -45,25 +45,27 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<ul <%$id ? 'id="'.$id.'"' : '' |n%><% $toplevel? 'class="sf-menu sf-js-enabled sf-shadow"' : '' |n %>>
+
+<%" " x $depth%><ul<%$id ? ' id="'.$id.'"' : '' |n%><% $toplevel? ' class="sf-menu sf-js-enabled sf-shadow"' : '' |n %>>
 % for my $child ($menu->children) {
-%   my $item_id = lc($parent_id."-".$child->key);
+%   my $item_id = lc(($parent_id? $parent_id."-" : "") .$child->key);
 %   $item_id =~ s/\s/-/g;
-<li>
-<a id="<%$item_id%>" \
-<% $child->path ? 'href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%> \
-> \
+<%" " x ($depth+1)%><li>\
+<a id="<%$item_id%>" <% $child->path ? ' href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%>>\
 % if ($child->escape_title) {
-<%$child->title |n%>
+<%$child->title |n%>\
 % } else {
-<%$child->title%>
+<%$child->title%>\
 % }
-</a>
-% next unless ($child->has_children);
-<& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key &>
+</a>\
+% if ($child->has_children) {
+<& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key, depth=> ($depth+1) &>
+<%" " x ($depth+1)%></li>
+% } else {
 </li>
 % }
-</ul>
+% }
+<%" " x $depth%></ul>\
 <%INIT>
 
 </%INIT>
@@ -72,4 +74,5 @@ $menu
 $id => undef
 $toplevel => 1
 $parent_id => ''
+$depth => 0
 </%ARGS>

commit dc1eae476993ac6676dc0398a6474728b064a0e2
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 11:37:06 2010 -0400

    Fix two more test files for menuing changes

diff --git a/share/html/Prefs/Other.html b/share/html/Prefs/Other.html
index a3cde93..d342e4d 100644
--- a/share/html/Prefs/Other.html
+++ b/share/html/Prefs/Other.html
@@ -52,7 +52,7 @@
 &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="Other.html">
+<form method="post" action="Other.html" name="ModifyPreferences" id="ModifyPreferences">
 % foreach my $section( RT->Config->Sections ) {
 <&|/Widgets/TitleBox, title => loc( $section ) &>
 % foreach my $option( RT->Config->Options( Section => $section ) ) {
diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index 303bcb2..16f2e08 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -389,7 +389,7 @@ like($m->content, qr/$key1/, "first key shows up in preferences");
 like($m->content, qr/$key2/, "second key shows up in preferences");
 like($m->content, qr/$key1.*?$key2/s, "first key shows up before the second");
 
-$m->form_name('TicketModify');
+$m->form_name('ModifyPreferences');
 $m->select("PreferredKey" => $key2);
 $m->submit;
 

commit ea1f0cb1f3ad4259a212730346ce026180a19fd5
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 11:49:32 2010 -0400

    Fix some lower-case parameters from our backport from 3.999

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 9324d7a..6301aba 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -496,12 +496,12 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
         if ( $obj->CurrentUserHasRight('OwnTicket') ) {
             if ( $obj->OwnerObj->id == RT->Nobody->id ) {
                 $actions->child( loc('Take') => path =>
-                                "/Ticket/Display.html?action=take&id=" . $id )
+                                "/Ticket/Display.html?Action=Take&id=" . $id )
                     if (    $can{'ModifyTicket'}
                          or $obj->CurrentUserHasRight('TakeTicket') );
             } elsif ( $obj->OwnerObj->id != $session{'CurrentUser'}->id ) {
                 $actions->child( loc('Steal') => path =>
-                               "/Ticket/Display.html?action=steal&id=" . $id )
+                               "/Ticket/Display.html?Action=Steal&id=" . $id )
                     if (    $can{'ModifyTicket'}
                          or $obj->CurrentUserHasRight('StealTicket') );
             }

commit 4b159b331c3a1b3e88d85bc78cc58702eba47f91
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 11:49:57 2010 -0400

    Use the correct form name for a ticket reply

diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index 815f542..cd1def6 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -130,7 +130,7 @@ diag "on reply correct owner is selected";
     $agent_a->goto_ticket( $id );
     $agent_a->follow_link_ok({text => 'Reply'}, 'Ticket -> Basics');
 
-    my $form = $agent_a->form_name('TicketModify');
+    my $form = $agent_a->form_name('TicketUpdate');
     is $form->value('Owner'), '', 'empty value selected';
     $agent_a->submit;
 

commit 11040ec0c0a523181d196c21a5cfe348a5e100f9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 12:33:31 2010 -0400

    update two more files with new names for forms and pages

diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index cd1def6..f519951 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -217,8 +217,7 @@ diag "TakeTicket+OwnTicket work";
     is $ticket->Owner, RT->Nobody->id, 'correct owner';
 
     $agent_a->goto_ticket( $id );
-    ok !($agent_a->find_all_links( text => 'Steal' ))[0],
-        'no Steal link';
+    ok !($agent_a->find_all_links( text => 'Steal' ))[0], 'no Steal link';
     $agent_a->follow_link_ok({text => 'Take'}, 'Ticket -> Take');
 
     $ticket = RT::Ticket->new( RT->SystemUser );
diff --git a/t/web/watching-queues.t b/t/web/watching-queues.t
index 8dc536b..4d9ec6b 100644
--- a/t/web/watching-queues.t
+++ b/t/web/watching-queues.t
@@ -64,9 +64,9 @@ diag "add self as AdminCc on General" if $ENV{'TEST_VERBOSE'};
     $m->follow_link( text => 'Queues' );
     $m->title_is('Admin queues', 'queues page');
     $m->follow_link( text => 'General' );
-    $m->title_is('Editing Configuration for queue General');
+    $m->title_is('Configuration for queue General');
     $m->follow_link( text => 'Watchers' );
-    $m->title_is('Modify people related to queue General');
+    $m->title_is('People related to queue General');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -77,7 +77,7 @@ diag "add self as AdminCc on General" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue General', 'caught the right form! :)');
+    $m->title_is('People related to queue General', 'caught the right form! :)');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -86,7 +86,7 @@ diag "add self as AdminCc on General" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue General', 'caught the right form! :)');
+    $m->title_is('People related to queue General', 'caught the right form! :)');
 
     my $queue = RT::Queue->new(RT->SystemUser);
     $queue->Load('General');
@@ -119,9 +119,9 @@ diag "add self as Cc on General" if $ENV{'TEST_VERBOSE'};
     $m->follow_link( text => 'Queues' );
     $m->title_is('Admin queues', 'queues page');
     $m->follow_link( text => 'General' );
-    $m->title_is('Editing Configuration for queue General');
+    $m->title_is('Configuration for queue General');
     $m->follow_link( text => 'Watchers' );
-    $m->title_is('Modify people related to queue General');
+    $m->title_is('People related to queue General');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -132,7 +132,7 @@ diag "add self as Cc on General" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue General', 'caught the right form! :)');
+    $m->title_is('People related to queue General', 'caught the right form! :)');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -141,7 +141,7 @@ diag "add self as Cc on General" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue General', 'caught the right form! :)');
+    $m->title_is('People related to queue General', 'caught the right form! :)');
 
     my $queue = RT::Queue->new(RT->SystemUser);
     $queue->Load('General');
@@ -174,9 +174,9 @@ diag "add self as AdminCc on Fancypants" if $ENV{'TEST_VERBOSE'};
     $m->follow_link( text => 'Queues' );
     $m->title_is('Admin queues', 'queues page');
     $m->follow_link( text => 'Fancypants' );
-    $m->title_is('Editing Configuration for queue Fancypants');
+    $m->title_is('Configuration for queue Fancypants');
     $m->follow_link( text => 'Watchers' );
-    $m->title_is('Modify people related to queue Fancypants');
+    $m->title_is('People related to queue Fancypants');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -187,7 +187,7 @@ diag "add self as AdminCc on Fancypants" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue Fancypants', 'caught the right form! :)');
+    $m->title_is('People related to queue Fancypants', 'caught the right form! :)');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -196,7 +196,7 @@ diag "add self as AdminCc on Fancypants" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue Fancypants', 'caught the right form! :)');
+    $m->title_is('People related to queue Fancypants', 'caught the right form! :)');
 
     ok($other_queue->IsWatcher(Type => 'AdminCc', PrincipalId => $user->PrincipalId), 'added root as AdminCc on Fancypants');
 }
@@ -231,9 +231,9 @@ diag "add group as Cc on Loopy" if $ENV{'TEST_VERBOSE'};
     $m->follow_link( text => 'Queues' );
     $m->title_is('Admin queues', 'queues page');
     $m->follow_link( text => 'Loopy' );
-    $m->title_is('Editing Configuration for queue Loopy');
+    $m->title_is('Configuration for queue Loopy');
     $m->follow_link( text => 'Watchers' );
-    $m->title_is('Modify people related to queue Loopy');
+    $m->title_is('People related to queue Loopy');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -244,7 +244,7 @@ diag "add group as Cc on Loopy" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue Loopy', 'caught the right form! :)');
+    $m->title_is('People related to queue Loopy', 'caught the right form! :)');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -253,7 +253,7 @@ diag "add group as Cc on Loopy" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue Loopy', 'caught the right form! :)');
+    $m->title_is('People related to queue Loopy', 'caught the right form! :)');
 
     ok($loopy_queue->IsWatcher(Type => 'Cc', PrincipalId => $group->PrincipalId), 'added Groupies as Cc on Loopy');
 }
@@ -294,9 +294,9 @@ diag "add other group as AdminCc on Loopy" if $ENV{'TEST_VERBOSE'};
     $m->follow_link( text => 'Queues' );
     $m->title_is('Admin queues', 'queues page');
     $m->follow_link( text => 'Loopy' );
-    $m->title_is('Editing Configuration for queue Loopy');
+    $m->title_is('Configuration for queue Loopy');
     $m->follow_link( text => 'Watchers' );
-    $m->title_is('Modify people related to queue Loopy');
+    $m->title_is('People related to queue Loopy');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -307,7 +307,7 @@ diag "add other group as AdminCc on Loopy" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue Loopy', 'caught the right form! :)');
+    $m->title_is('People related to queue Loopy', 'caught the right form! :)');
 
     $m->submit_form_ok({
         form_number => 3,
@@ -316,7 +316,7 @@ diag "add other group as AdminCc on Loopy" if $ENV{'TEST_VERBOSE'};
         },
     });
 
-    $m->title_is('Modify people related to queue Loopy', 'caught the right form! :)');
+    $m->title_is('People related to queue Loopy', 'caught the right form! :)');
 
     ok($loopy_queue->IsWatcher(Type => 'AdminCc', PrincipalId => $outer_group->PrincipalId), 'added Groupies 2.0 as AdminCc on Loopy');
 }

commit d2721231001fad32a41560796a1da404079e3a2d
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 12:48:34 2010 -0400

    tighten up superfish styles so menuing doesn't break horribly

diff --git a/share/html/NoAuth/css/base/superfish-navbar.css b/share/html/NoAuth/css/base/superfish-navbar.css
index 68c7135..9a3f24c 100644
--- a/share/html/NoAuth/css/base/superfish-navbar.css
+++ b/share/html/NoAuth/css/base/superfish-navbar.css
@@ -2,8 +2,8 @@
 /*** adding the class sf-navbar in addition to sf-menu creates an all-horizontal nav-bar menu ***/
 .sf-navbar {
 	background:		#BDD2FF;
-	height:			2.5em;
-	padding-bottom:	2.5em;
+	height:			2em;
+	padding-bottom:	2em;
 	position:		relative;
 }
 .sf-navbar li {
@@ -59,7 +59,7 @@ ul.sf-navbar .current ul,
 ul.sf-navbar ul li:hover ul,
 ul.sf-navbar ul li.sfHover ul {
 	left:			0;
-	top:			2.5em; /* match top ul list item height */
+	top:			2em; /* match top ul list item height */
 }
 ul.sf-navbar .current ul ul {
 	top: 			-999em;
@@ -90,4 +90,4 @@ ul.sf-navbar .current ul ul {
 	-moz-border-radius-topright: 0;
 	-webkit-border-top-right-radius: 0;
 	-webkit-border-bottom-left-radius: 0;
-}
\ No newline at end of file
+}
diff --git a/share/html/NoAuth/css/base/superfish.css b/share/html/NoAuth/css/base/superfish.css
index cc33fdb..d2ae2f0 100644
--- a/share/html/NoAuth/css/base/superfish.css
+++ b/share/html/NoAuth/css/base/superfish.css
@@ -30,7 +30,7 @@
 .sf-menu li:hover ul,
 .sf-menu li.sfHover ul {
 	left:			0;
-	top:			2.5em; /* match top ul list item height */
+	top:			2em; /* match top ul list item height */
 	z-index:		99;
 }
 ul.sf-menu li:hover li ul,

commit 2e4e710461c0085cc89a429c05957b00d803d5e4
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 13:01:04 2010 -0400

    one more passing test file

diff --git a/share/html/Search/Edit.html b/share/html/Search/Edit.html
index 2d3730f..fb6a1cb 100755
--- a/share/html/Search/Edit.html
+++ b/share/html/Search/Edit.html
@@ -60,7 +60,7 @@
 
 <& Elements/NewListActions, actions => \@actions &>
 
-<form method="post" action="Build.html">
+<form method="post" action="Build.html" id="BuildQueryAdvanced" name="BuildQueryAdvanced">
 <input type="hidden" class="hidden" name="SavedSearchId" value="<% $SavedSearchId %>" />
 <input type="hidden" class="hidden" name="SavedChartSearchId" value="<% $SavedChartSearchId %>" />
 <&|/Widgets/TitleBox, title => loc('Query'), &>
diff --git a/t/web/query_builder.t b/t/web/query_builder.t
index c0f7b49..79df326 100644
--- a/t/web/query_builder.t
+++ b/t/web/query_builder.t
@@ -143,7 +143,7 @@ diag "click advanced, enter 'C1 OR ( C2 AND C3 )', apply, aggregators should sta
 {
     my $response = $agent->get($url."Search/Edit.html");
     ok( $response->is_success, "Fetched /Search/Edit.html" );
-    ok($agent->form_name('TicketModify'), "found the form");
+    ok($agent->form_name('BuildQueryAdvanced'), "found the form");
     $agent->field("Query", "Status = 'new' OR ( Status = 'open' AND Subject LIKE 'office' )");
     $agent->submit;
     is( getQueryFromForm,
@@ -225,7 +225,7 @@ diag "input a condition, select (several conditions), click delete";
 {
     my $response = $agent->get( $url."Search/Edit.html" );
     ok $response->is_success, "Fetched /Search/Edit.html";
-    ok $agent->form_name('TicketModify'), "found the form";
+    ok $agent->form_name('BuildQueryAdvanced'), "found the form";
     $agent->field("Query", "( Status = 'new' OR Status = 'open' )");
     $agent->submit;
     is( getQueryFromForm,

commit 47c3e326ca8e021bcb8a42304db9893cff5be1df
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 13:23:49 2010 -0400

    further updates to making rights clickable

diff --git a/share/html/Admin/CustomFields/GroupRights.html b/share/html/Admin/CustomFields/GroupRights.html
index 4295e70..db4ae39 100644
--- a/share/html/Admin/CustomFields/GroupRights.html
+++ b/share/html/Admin/CustomFields/GroupRights.html
@@ -53,7 +53,7 @@
 &>
 <& /Elements/ListActions, actions => \@results &>
 
-  <form method="post" action="GroupRights.html">
+  <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
     <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" />
 
     <& /Admin/Elements/EditRights, Context => $CustomFieldObj, Principals => \@principals &>
diff --git a/share/html/Admin/CustomFields/UserRights.html b/share/html/Admin/CustomFields/UserRights.html
index a4bbd80..238fc4a 100644
--- a/share/html/Admin/CustomFields/UserRights.html
+++ b/share/html/Admin/CustomFields/UserRights.html
@@ -51,7 +51,7 @@ current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
 Title => $title, &>
 <& /Elements/ListActions, actions => \@results &>
 
-  <form method="post" action="UserRights.html">
+  <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
     <input type="hidden" class="hidden" name="id" value="<% $CustomFieldObj->id %>" />
     <& /Admin/Elements/EditRights, Context => $CustomFieldObj, Principals => \@principals &>
     <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
diff --git a/share/html/Admin/Global/GroupRights.html b/share/html/Admin/Global/GroupRights.html
index 09fe1e9..ca0ac62 100755
--- a/share/html/Admin/Global/GroupRights.html
+++ b/share/html/Admin/Global/GroupRights.html
@@ -51,7 +51,7 @@
     Title => loc('Modify global group rights') &>  
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="GroupRights.html">
+<form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
   <& /Admin/Elements/EditRights, Context => $RT::System, Principals => \@principals &>
   <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
 </form>
diff --git a/share/html/Admin/Global/UserRights.html b/share/html/Admin/Global/UserRights.html
index f92f7ae..2e9e245 100755
--- a/share/html/Admin/Global/UserRights.html
+++ b/share/html/Admin/Global/UserRights.html
@@ -51,7 +51,7 @@
     Title => loc('Modify global user rights') &>  
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="UserRights.html">
+<form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
   <& /Admin/Elements/EditRights, Context => $RT::System, Principals => \@principals &>
   <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
 </form>
diff --git a/share/html/Admin/Groups/GroupRights.html b/share/html/Admin/Groups/GroupRights.html
index f82c60e..268ecf2 100755
--- a/share/html/Admin/Groups/GroupRights.html
+++ b/share/html/Admin/Groups/GroupRights.html
@@ -52,7 +52,7 @@
     Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
 <& /Elements/ListActions, actions => \@results &>
 
-  <form method="post" action="GroupRights.html">
+  <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
     <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
     <& /Admin/Elements/EditRights, Context => $GroupObj, Principals => \@principals &>
     <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
diff --git a/share/html/Admin/Groups/UserRights.html b/share/html/Admin/Groups/UserRights.html
index c7809d1..c0209c6 100755
--- a/share/html/Admin/Groups/UserRights.html
+++ b/share/html/Admin/Groups/UserRights.html
@@ -52,7 +52,7 @@
     Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>  
 <& /Elements/ListActions, actions => \@results &>
 
-  <form method="post" action="UserRights.html">
+  <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
     <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" />
     <& /Admin/Elements/EditRights, Context => $GroupObj, Principals => \@principals &>
     <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
diff --git a/share/html/Admin/Queues/GroupRights.html b/share/html/Admin/Queues/GroupRights.html
index e0073d0..93a9b51 100755
--- a/share/html/Admin/Queues/GroupRights.html
+++ b/share/html/Admin/Queues/GroupRights.html
@@ -52,7 +52,7 @@
     Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="GroupRights.html">
+<form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
   <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" />
 
 % $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results, principals => \@principals );
diff --git a/share/html/Admin/Queues/UserRights.html b/share/html/Admin/Queues/UserRights.html
index 20cbd50..a27b103 100755
--- a/share/html/Admin/Queues/UserRights.html
+++ b/share/html/Admin/Queues/UserRights.html
@@ -52,7 +52,7 @@
     Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" action="UserRights.html">
+<form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
   <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" />
 
 %# XXX TODO put this somewhere more reasonable      
diff --git a/t/web/rights.t b/t/web/rights.t
index 886c847..5c7fc2b 100644
--- a/t/web/rights.t
+++ b/t/web/rights.t
@@ -2,21 +2,19 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 14;
+use RT::Test tests => 12;
 
 my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login, "logged in";
 
-$m->follow_link_ok({ text => 'Configuration' });
-$m->follow_link_ok({ text => 'Global' });
-$m->follow_link_ok({ text => 'Group Rights' });
+$m->follow_link_ok({ id => 'config-global-group-rights'});
 
 
 sub get_rights {
     my $agent = shift;
     my $principal_id = shift;
     my $object = shift;
-    $agent->form_name('TicketModify');
+    $agent->form_name('ModifyGroupRights');
     my @inputs = $agent->current_form->find_input("SetRights-$principal_id-$object");
     my @rights = sort grep $_, map $_->possible_values, grep $_ && $_->value, @inputs;
     return @rights;
@@ -33,7 +31,7 @@ my ($everyone, $everyone_gid);
 diag "revoke all global rights from Everyone group";
 my @has = get_rights( $m, $everyone_gid, 'RT::System-1' );
 if ( @has ) {
-    $m->form_name('TicketModify');
+    $m->form_name('ModifyGroupRights');
     $m->untick("SetRights-$everyone_gid-RT::System-1", $_) foreach @has;
     $m->submit;
     
@@ -44,7 +42,7 @@ if ( @has ) {
 
 diag "grant SuperUser right to everyone";
 {
-    $m->form_name('TicketModify');
+    $m->form_name('ModifyGroupRights');
     $m->tick("SetRights-$everyone_gid-RT::System-1", 'SuperUser');
     $m->submit;
 
@@ -56,7 +54,7 @@ diag "grant SuperUser right to everyone";
 
 diag "revoke the right";
 {
-    $m->form_name('TicketModify');
+    $m->form_name('ModifyGroupRights');
     $m->untick("SetRights-$everyone_gid-RT::System-1", 'SuperUser');
     $m->submit;
 
@@ -69,7 +67,7 @@ diag "revoke the right";
 
 diag "return rights the group had in the beginning";
 if ( @has ) {
-    $m->form_name('TicketModify');
+    $m->form_name('ModifyGroupRights');
     $m->tick("SetRights-$everyone_gid-RT::System-1", $_) for @has;
     $m->submit;
 
diff --git a/t/web/rights1.t b/t/web/rights1.t
index 55544fa..5b284d0 100644
--- a/t/web/rights1.t
+++ b/t/web/rights1.t
@@ -52,7 +52,7 @@ ok ($grantid,$grantmsg);
 $agent->reload();
 $agent->content_contains('Logout', "Reloaded page successfully");
 ok($agent->find_link( 
-		       text => 'Preferences'), "Found prefs pane" );
+		       id => 'preferences-settings' ), "Found prefs pane" );
 ($revokeid,$revokemsg) = $user_obj->PrincipalObj->RevokeRight(Right => 'ModifySelf');
 ok ($revokeid,$revokemsg);
 # Good.  Now load the search page and test Load/Save Search.

commit b91817b9156998af2fe83bfcea2560c4317508de
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:05:14 2010 -0400

    more test file updates

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 6301aba..aabf8a8 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -485,11 +485,9 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                                          );
                 } else {
 
-       #$url .= "Display.html?" .$query_string->(Status => $next, id => $id );
+                   $url .= "Display.html?" .$query_string->(Status => $next, id => $id );
                 }
-                $actions->child(
-                      loc( $schema->transition_label( $current => $next ) ) =>
-                          path => $url );
+                $actions->child( loc( $schema->transition_label( $current => $next ) ) => path => $url );
             }
 
         }
diff --git a/t/lifecycles/basics.t b/t/lifecycles/basics.t
index 60ffbbb..1448d7b 100644
--- a/t/lifecycles/basics.t
+++ b/t/lifecycles/basics.t
@@ -82,7 +82,7 @@ diag "new ->(open it)-> open";
     }
 
     $m->follow_link_ok({text => 'Open It'});
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->click('SubmitTicket');
 
     is $tstatus->($tid), 'open', 'changed status';
@@ -111,7 +111,7 @@ diag "open ->(stall)-> stalled";
     }
 
     $m->follow_link_ok({text => 'Stall'});
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->click('SubmitTicket');
 
     is $tstatus->($tid), 'stalled', 'changed status';
diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index f2ce71b..e5d5604 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -128,7 +128,7 @@ diag "on reply correct owner is selected";
     is $ticket->Owner, $user_b->id, 'correct owner';
 
     $agent_a->goto_ticket( $id );
-    $agent_a->follow_link_ok({text => 'Reply'}, 'Ticket -> Basics');
+    $agent_a->follow_link_ok({id => 'basics'}, 'Ticket -> Basics');
 
     my $form = $agent_a->form_name('TicketModify');
     is $form->value('Owner'), '', 'empty value selected';

commit 6242bce9d5493431bcf00f878688263c0d77cca3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:26:04 2010 -0400

    Added a name/id to ModifyScrip

diff --git a/share/html/Admin/Elements/EditScrip b/share/html/Admin/Elements/EditScrip
index aa0861a..3141541 100755
--- a/share/html/Admin/Elements/EditScrip
+++ b/share/html/Admin/Elements/EditScrip
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/ListActions, actions => \@actions &>
   
-<form method="post" action="Scrip.html">
+<form method="post" action="Scrip.html" id="ModifyScrip" name="ModifyScrip">
 <input type="hidden" class="hidden" name="id" value="<% $id %>" />
 <input type="hidden" class="hidden" name="Queue" value="<% $Queue %>" />
 

commit a553f294352999a526c57420cececb68a608ec01
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:26:27 2010 -0400

    gave pagenav ids a unique prefix

diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 2b92c97..1380940 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -54,7 +54,7 @@
 % if ( $show_menu ) {
 <div id="main-navigation"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
 
-<div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu' &></div>
+<div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu', 'parent_id' => 'page' &></div>
 % }
 <div id="widgets"><& /Elements/Widgets &></div>
 <script type="text/javascript">

commit 63cd673017e8b465420e07140eb3b60853414acd
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:26:48 2010 -0400

    Added Scrips to queue nav

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index aabf8a8..a1c68e5 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -315,6 +315,19 @@ if ( $request_path =~ qr'Admin/Queues' ) {
 );
         $templates->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Template.html?Create=1;Queue=".$id );
 
+        my $scrips = $queue->child( scrips => title => loc('Scrips'),
+                       path => "/Admin/Queues/Scrips.html?id=" . $id );
+
+
+
+        $scrips->child(select => title => loc('Select'), path => "/Admin/Queues/Scrips.html?id=".$id
+);
+        $scrips->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Scrip.html?Create=1;Queue=".$id );
+
+
+
+
+
         $queue->child( loc('Ticket Custom Fields'),
              path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id='
                  . $id );

commit e45ae32dd5584a792f920534bca94277f4024b70
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:27:12 2010 -0400

    updated another scrip testfile

diff --git a/t/ticket/scrips_batch.t b/t/ticket/scrips_batch.t
index d62fb3a..d4004fb 100644
--- a/t/ticket/scrips_batch.t
+++ b/t/ticket/scrips_batch.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => '19';
+use RT::Test tests => '17';
 use_ok('RT');
 use_ok('RT::Ticket');
 
@@ -16,12 +16,10 @@ ok $m->login, 'logged in as root';
 
 my $sid;
 {
-    $m->follow_link_ok( { text => 'Configuration' } );
-    $m->follow_link_ok( { text => 'Queues' } );
+    $m->follow_link_ok( { id => 'config-queues' } );
     $m->follow_link_ok( { text => $queue->Name } );
-    $m->follow_link_ok( { text => 'Scrips' } );
-    $m->follow_link_ok( { url_regex => qr'Scrip.html\?create=1' } );
-    $m->form_name('TicketModify');
+    $m->follow_link_ok( { id => 'page-scrips-create'});
+    $m->form_name('ModifyScrip');
     $m->field('Scrip-new-Description' => 'test');
     $m->select('Scrip-new-ScripCondition' => 'On Transaction');
     $m->select('Scrip-new-ScripAction' => 'User Defined');
@@ -32,9 +30,9 @@ my $sid;
     $m->submit;
     $m->content_contains("Scrip Created");
 
-    ($sid) = ($m->content =~ /Scrip\s*#(\d+)/);
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('ModifyScrip');
+    $sid = $form->value('id');
     is $m->value("Scrip-$sid-Description"), 'test', 'correct description';
     is value_name($form, "Scrip-$sid-ScripCondition"), 'On Transaction', 'correct condition';
     is value_name($form, "Scrip-$sid-ScripAction"), 'User Defined', 'correct action';
@@ -62,13 +60,13 @@ END
     $m->submit;
 
     $m->goto_create_ticket( $queue );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->submit;
 
     is_deeply parse_handle($tmp_fh), ['Create'], 'Create';
 
     $m->follow_link_ok( { text => 'Resolve' } );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->field( "UpdateContent" => 'resolve it' );
     $m->click('SubmitTicket');
 

commit 3ca86877dd99b6bfa524fa3f0a35b8b520ebe02b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:27:35 2010 -0400

    Updates to get scrip edit HTML to not be so painfully unreadable

diff --git a/share/html/Admin/Elements/EditScrip b/share/html/Admin/Elements/EditScrip
index 3141541..37d0dbe 100755
--- a/share/html/Admin/Elements/EditScrip
+++ b/share/html/Admin/Elements/EditScrip
@@ -54,32 +54,32 @@
 <&| /Widgets/TitleBox, title => loc('Scrip Fields') &>
 <table>
 
-<tr><td align="right"><&|/l&>Description</&>:</td><td>
-<input name="Scrip-<% $id %>-Description" 
-    size="60"
+<tr><td class="label"><&|/l&>Description</&>:</td><td class="value">\
+<input name="Scrip-<% $id %>-Description" \
+    size="60" \
     value="<% $ARGS{"Scrip-$id-Description"} || $scrip->Description || '' %>" />
 </td></tr>
 
-<tr><td align="right"><&|/l&>Condition</&>:</td><td>
+<tr><td class="label"><&|/l&>Condition</&>:</td><td class="value">\
 <& /Admin/Elements/SelectScripCondition,
     Name => "Scrip-$id-ScripCondition",
     Default => $ARGS{"Scrip-$id-ScripCondition"} || $scrip->ConditionObj->Id,
 &></td></tr>
 
-<tr><td align="right"><&|/l&>Action</&>:</td><td>
+<tr><td class="label"><&|/l&>Action</&>:</td><td class="value">\
 <& /Admin/Elements/SelectScripAction,
     Name => "Scrip-$id-ScripAction",
     Default => $ARGS{"Scrip-$id-ScripAction"} || $scrip->ActionObj->Id,
 &></td></tr>
 
-<tr><td align="right"><&|/l&>Template</&>:</td><td>
+<tr><td class="label"><&|/l&>Template</&>:</td><td class="value">\
 <& /Admin/Elements/SelectTemplate,
     Name => "Scrip-$id-Template",
     Default => $ARGS{"Scrip-$id-Template"} || $scrip->TemplateObj->Id,
     Queue => $Queue,
 &></td></tr>
 
-<tr><td align="right"><&|/l&>Stage</&>:</td><td>
+<tr><td class="label"><&|/l&>Stage</&>:</td><td class="value">\
 <& /Admin/Elements/SelectStage,
     Name => "Scrip-$id-Stage",
     Default => $ARGS{"Scrip-$id-Stage"} || $scrip->Stage,
@@ -100,21 +100,21 @@
 <i><&|/l&>(Use these fields when you choose 'User Defined' for a condition or action)</&></i>
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td>
+<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td class="value">
 % my $code = $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode || '';
 % my $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
 <textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomIsApplicableCode"><% $code %></textarea>
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td>
+<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td class="value">
 % $code = $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode || '';
 % $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
 <textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomPrepareCode"><% $code %></textarea>
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td>
+<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td class="value">
 % $code = $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode || '';
 % $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
diff --git a/share/html/Admin/Elements/SelectTemplate b/share/html/Admin/Elements/SelectTemplate
index 54001c5..d077389 100755
--- a/share/html/Admin/Elements/SelectTemplate
+++ b/share/html/Admin/Elements/SelectTemplate
@@ -47,19 +47,12 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 <option value="" 
-<% defined($Default) && $Default eq 'none' && qq[ selected="selected"] |n %>
->-</option>
+<% defined($Default) && $Default eq 'none' && qq[ selected="selected"] |n %>>-</option>
 %while  (my $Template = $PrimaryTemplates->Next) {
-<option value="<%$Template->Id%>"
-<% ($Template->Id == $Default) && qq[ selected="selected"] |n %>
-><% loc($Template->Name) %>
-</option>
+<option value="<%$Template->Id%>" <% ($Template->Id == $Default) && qq[ selected="selected"] |n %>><% loc($Template->Name) %></option>
 %}
 %while  (my $Template = $OtherTemplates->Next) {
-<option value="<%$Template->Id%>"
-<% defined($Default) && ($Template->Id == $Default) && qq[ selected="selected"] |n %>
-><&|/l, loc($Template->Name) &>Global template: [_1]</&>
-</option>
+<option value="<%$Template->Id%>" <% defined($Default) && ($Template->Id == $Default) && qq[ selected="selected"] |n %>><&|/l, loc($Template->Name) &>Global template: [_1]</&></option>
 %}
 </select>
 
@@ -78,10 +71,8 @@ $OtherTemplates->OrderBy(FIELD => 'Name');
 
 </%INIT>
 <%ARGS>
-
 $Queue => undef
 $Default => 'none'
 $DefaultQueue => undef
 $Name => 'Template'
-
 </%ARGS>

commit f8afc81d70d21ce3ea1c34203b7a1d8efe10a840
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:41:07 2010 -0400

    canonicalize custom-fields in nav, not customfields.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index a1c68e5..1d6600a 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -130,7 +130,7 @@ if ( $request_path =~ qr{.*} ) {
         my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
         $queues->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
-        my $cfs = $admin->child( customfields => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
+        my $cfs = $admin->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
         );
         $cfs->child( select => title => loc('Select'), path => "/Admin/CustomFields/" );
         $cfs->child( create => title => loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 276293e..9630d2b 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -13,11 +13,7 @@ ok $m->login, 'logged in';
 
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -33,13 +29,11 @@ diag "apply the CF to General queue";
 my ( $cf, $cfid, $tid );
 {
     $m->title_is(q/Created CustomField img/, 'admin-cf created');
-    $m->follow_link( text => 'Queues' );
-    $m->title_is(q/Admin queues/, 'admin-queues screen');
+    $m->follow_link( id => 'config-queues');
     $m->follow_link( text => 'General' );
-    $m->title_is(q/Editing Configuration for queue General/, 'admin-queue: general');
-    $m->follow_link( text => 'Ticket Custom Fields' );
-
-    $m->title_is(q/Edit Custom Fields for General/, 'admin-queue: general cfid');
+    $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
+    $m->follow_link( id => 'page-ticket-custom-fields');
+    $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid');
     $m->form_name('EditCustomFields');
 
     # Sort by numeric IDs in names
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index 085f216..81af084 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -15,7 +15,7 @@ my $cf_name = 'test cf date';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( id => 'config-customfields-create');
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields    => {

commit d13bb19a05ed0e7f5a72559e5b43debbcf1d767e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:57:05 2010 -0400

    work on queue - cf mapping  nav

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 1d6600a..c4e1b42 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -328,29 +328,20 @@ if ( $request_path =~ qr'Admin/Queues' ) {
 
 
 
-        $queue->child( loc('Ticket Custom Fields'),
-             path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id='
-                 . $id );
-
-        $queue->child( loc('Transaction Custom Fields'),
-            path =>
-                '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket-RT::Transaction&id='
-                . $id );
-
-        $queue->child( loc('Group Rights'),
-                       path => "/Admin/Queues/GroupRights.html?id=" . $id );
-        $queue->child( loc('User Rights'),
-                       path => "/Admin/Queues/UserRights.html?id=" . $id );
+        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id=' . $id );
+
+        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id=' . $id );
+
+        $queue->child( loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=" . $id );
+        $queue->child( loc('User Rights'), path => "/Admin/Queues/UserRights.html?id=" . $id );
     }
 }
 
 if ( $request_path =~ qr'/Admin/Users' ) {
-    if ( $session{'CurrentUser'}
-         ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
     {
         PageMenu->child(select => title => loc('Select'), path => "/Admin/Users/" );
-        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1",
-                       );
+        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1");
     }
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );

commit 7d40a896ed3c6bbabb27dce1200ef5616f6145fe
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:57:40 2010 -0400

    fix queue-cf mapping tests

diff --git a/t/customfields/sort_order.t b/t/customfields/sort_order.t
index 3dfdf3f..d210f31 100644
--- a/t/customfields/sort_order.t
+++ b/t/customfields/sort_order.t
@@ -51,8 +51,7 @@ diag "reorder CFs: C, A and B";
 {
     $m->get( '/Admin/Queues/' );
     $m->follow_link_ok( {text => $queue->id} );
-    $m->follow_link_ok( {text => 'Ticket Custom Fields'} );
-
+    $m->follow_link_ok( {id  => 'page-ticket-custom-fields'} );
     my @tmp = ($m->content =~ /(CF [ABC])/g);
     is_deeply(\@tmp, ['CF B', 'CF A', 'CF C']);
 
@@ -83,8 +82,7 @@ diag "check ticket create, display and edit pages";
     
     @tmp = ($m->content =~ /(CF [ABC])/g);
     is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
-
-    $m->follow_link_ok( {text => 'Custom Fields'} );
+    $m->follow_link_ok( {id => 'page-basics'});
 
     @tmp = ($m->content =~ /(CF [ABC])/g);
     is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);

commit f589d944a74ffc60527552429d77cc9385def400
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 15:52:45 2010 -0400

    generalized the "Redirect and show results" mechanism

diff --git a/share/html/Elements/MaybeRedirectForResults b/share/html/Elements/MaybeRedirectForResults
new file mode 100644
index 0000000..0cf933b
--- /dev/null
+++ b/share/html/Elements/MaybeRedirectForResults
@@ -0,0 +1,66 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# 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 }}}
+<%args>
+$Actions => []
+$ARGSRef => {}
+$Path
+$id
+</%args>
+<%init>
+if ( @$Actions ) {
+    # We've done something, so we need to clear the decks to avoid
+    # resubmission on refresh.
+    # But we need to store Actions somewhere too, so we don't lose them.
+    my $key = Digest::MD5::md5_hex( rand(1024) );
+    push @{ $session{"Actions"}->{$key} ||= [] }, @$Actions;
+    $session{'i'}++;
+    my $url = RT->Config->Get('WebURL') . "$Path?id=" . $id . "&results=" . $key;
+    $url .= '#' . $ARGSRef->{Anchor} if $ARGSRef->{Anchor};
+    RT::Interface::Web::Redirect($url);
+}
+</%init>
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index c8c5b27..155d300 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -197,10 +197,10 @@ $m->callback(
 
 # This code does automatic redirection if any updates happen. 
 $m->comp(
-    'Elements/MaybeRedirectForResults',
+    '/Elements/MaybeRedirectForResults',
     Actions     => \@Actions,
     Path        => 'Ticket/Display.html',
-    TicketObj   => $TicketObj,
+    id          => $TicketObj->id,
     ARGSRef     => \%ARGS
 );
 

commit 670c1e262a966fc8761d7b4e52f98794e7f26954
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 15:53:13 2010 -0400

    get dashboard create/modify to use the redirect mechanism

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index cb90aa9..edca4cb 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -148,6 +148,17 @@ if (!$Create && !$tried_create && $id && $ARGS{'Save'}) {
 
 }
 
+
+# This code does automatic redirection if any updates happen.
+$m->comp(
+    '/Elements/MaybeRedirectForResults',
+    Actions     => \@results,
+    Path        => 'Dashboards/Modify.html',
+    id              => $id,
+    ARGSRef     => \%ARGS
+);
+
+
 my $can_delete = $Dashboard->CurrentUserCanDelete;
 
 if (!$Create && !$tried_create && $id && $ARGS{'Delete'}) {

commit 3e5e6a82a67c661ddadb3d4de87538566f1e8454
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:10:57 2010 -0400

    Give modifydashboard a form id

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index edca4cb..3f9402d 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -47,13 +47,12 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
 <& /Dashboards/Elements/Tabs,
-    current_subtab => $current_subtab,
     Title => $title,
     $Create ? () : (DashboardObj => $Dashboard),
 &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form action="<%RT->Config->Get('WebPath')%>/Dashboards/Modify.html" method="post" enctype="multipart/form-data" name="ModifyDashboard">
+<form action="<%RT->Config->Get('WebPath')%>/Dashboards/Modify.html" method="post" enctype="multipart/form-data" name="ModifyDashboard" id="ModifyDashboard">
 
 %unless ($Dashboard->Id) {
 <input type="hidden" class="hidden" name="id" value="new" />
diff --git a/share/html/Ticket/Elements/MaybeRedirectForResults b/share/html/Ticket/Elements/MaybeRedirectForResults
deleted file mode 100644
index e31b5a5..0000000
--- a/share/html/Ticket/Elements/MaybeRedirectForResults
+++ /dev/null
@@ -1,66 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<%args>
-$Actions => []
-$ARGSRef => {}
-$Path    => 'Ticket/Display.html'
-$TicketObj
-</%args>
-<%init>
-if ( @$Actions ) {
-    # We've done something, so we need to clear the decks to avoid
-    # resubmission on refresh.
-    # But we need to store Actions somewhere too, so we don't lose them.
-    my $key = Digest::MD5::md5_hex( rand(1024) );
-    push @{ $session{"Actions"}->{$key} ||= [] }, @$Actions;
-    $session{'i'}++;
-    my $url = RT->Config->Get('WebURL') . "$Path?id=" . $TicketObj->id . "&results=" . $key;
-    $url .= '#' . $ARGSRef->{Anchor} if $ARGSRef->{Anchor};
-    RT::Interface::Web::Redirect($url);
-}
-</%init>

commit fb21884ac9e63d08d0700c0c94b74673b6c9af7d
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:11:13 2010 -0400

    Slightly improve css on the dashboard modification page

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 3f9402d..a04be04 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -62,16 +62,14 @@
 
 <&|/Widgets/TitleBox, title => loc('Basics') &>
 <table>
-<tr><td align="right">
-<&|/l&>Name</&>:
-</td>
-<td><input name="Name" value="<%$Dashboard->Name%>" /></td>
+    <tr>
+     <td class="label"><&|/l&>Name</&>:</td>
+     <td class="value"><input name="Name" value="<%$Dashboard->Name%>" /></td>
+    </tr>
+    <tr>
+    <td class="label"><&|/l&>Privacy</&>:</td>
+    <td><& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &></td>
 </tr>
-<tr><td align="right">
-<&|/l&>Privacy</&>:
-</td><td>
-<& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &>
-</td></tr>
 </table>
 </&>
 <& /Elements/Submit, Name => 'Save', Label =>( $Create ? loc('Create') : loc('Save Changes') ) &>

commit db43b8ff04f684ff5a113725cfb5d2d89b761499
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:11:40 2010 -0400

    remove dead code

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index a04be04..ada08be 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -80,7 +80,6 @@
 </form>
 <%INIT>
 
-my $current_subtab;
 my ($title, @results);
 my $tried_create = 0;
 
@@ -96,7 +95,6 @@ my @privacies = $Dashboard->$method;
 Abort(loc("Permission denied")) if @privacies == 0;
 
 if ($Create) {
-    $current_subtab = 'Dashboards/Modify.html?Create=1';
     $title = loc("Create a new dashboard");
 }
 else {
@@ -122,12 +120,10 @@ else {
 
     if ($id) {
         $title = loc("Modify the dashboard [_1]", $Dashboard->Name);
-        $current_subtab = 'Dashboards/Modify.html?id=' . $id;
     }	
     # If the create failed
     else {
         $Create = 1;
-        $current_subtab = 'Dashboards/Modify.html?Create=1';
         $title = loc("Create a new dashboard");
     }
 }

commit 913514374b87fd2938e369ec23a8819e04ac1cab
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:11:54 2010 -0400

    fix a broken refactoring in Dashboards

diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index dc17cd7..d9134a1 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -53,7 +53,7 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<%RT->Config->Get('WebPath')%>/Dashboards/Subscription.html" method="post" enctype="multipart/form-data" name="SubscribeDashboard">
-<input type="hidden" class="hidden" name="Id" value="<% $fields{'Id'} %>" />
+<input type="hidden" class="hidden" name="id" value="<% $fields{'DashboardId'} %>" />
 <table width="100%" border="0">
 <tr>
 

commit b9159152f946dc93a5c71ddc1ba58a055476c506
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:12:23 2010 -0400

    Tidy the html we generate a bit

diff --git a/share/html/Elements/CreateTicket b/share/html/Elements/CreateTicket
index e2d61dc..f14e837 100755
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Elements/CreateTicket
@@ -45,13 +45,9 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form
-    action="<% RT->Config->Get('WebPath') %><% $SendTo %>"
-    name="CreateTicketInQueue"
-    id="CreateTicketInQueue"
+<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
 % $m->callback(CallbackName => 'InFormElement');
 >
-
 <&|/l, $m->scomp('/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()', SendTo => $SendTo ) &><input type="submit" class="button" value="New ticket in" />&nbsp;[_1]</&>
 % $m->callback(CallbackName => 'BeforeFormEnd');
 </form>
diff --git a/share/html/Widgets/TitleBoxStart b/share/html/Widgets/TitleBoxStart
index 84bbf16..62663db 100755
--- a/share/html/Widgets/TitleBoxStart
+++ b/share/html/Widgets/TitleBoxStart
@@ -48,21 +48,17 @@
 <div class="titlebox<% $class ? " $class " : '' %>" id="<% $id %>">
   <div class="titlebox-title<% $title_class ? " $title_class" : ''%>">
 % if ($hideable) {
-    <span class="widget"><a href="#" 
-	onclick="return rollup('<%$tid%>');" 
-	title="Toggle visibility"></a>
-	</span>
+    <span class="widget"><a href="#" onclick="return rollup('<%$tid%>');" title="Toggle visibility"></a></span>
 % }
-    <span class="left">
-      	<% $title_href ? qq[<a href="$title_href">] : '' | n 
+    <span class="left"><%
+            $title_href ? qq[<a href="$title_href">] : '' | n
         %><% $title %><% $title_raw |n %><% $title_href ? "</a>" : '' |n%></span>
-    <span class="right<%($titleright_href || $titleright || $titleright_raw) ? '' : '-empty' %>">
-	<% $titleright_href ? qq[<a href="$titleright_href">] : '' | n %>
-	<% $titleright  %><% $titleright_raw |n%><% $titleright_href ? "</a>" : '' |n%>
+    <span class="right<%($titleright_href || $titleright || $titleright_raw) ? '' : '-empty' %>">\
+	<% $titleright_href ? qq[<a href="$titleright_href">] : '' | n %>\
+	<% $titleright  %><% $titleright_raw |n%><% $titleright_href ? "</a>" : '' |n%>\
     </span>
   </div>
   <div class="titlebox-content <% $bodyclass %>" id="<% $tid %>">
-
 <%ARGS>
 $class => ''
 $bodyclass => ''

commit 225674cc7f371d7ddbcbbe7981ac3f20d2c5bf86
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:12:36 2010 -0400

    fix a 3.999 backport bug in "Reply"

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index c4e1b42..3d30f35 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -468,7 +468,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
              or $obj->CurrentUserHasRight('ReplyToTicket') )
         {
             $actions->child( loc('Reply'),
-                     path => "/Ticket/Update.html?action=respond&id=" . $id );
+                     path => "/Ticket/Update.html?Action=Respond&id=" . $id );
         }
 
         if ( $can{'ModifyTicket'} ) {

commit 98a2cb5b7623e2a7d1f1e2c867e70b1bafb1b22e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:12:52 2010 -0400

    Grammar nit

diff --git a/t/customfields/access_via_queue.t b/t/customfields/access_via_queue.t
index 3bc4c62..2612fec 100644
--- a/t/customfields/access_via_queue.t
+++ b/t/customfields/access_via_queue.t
@@ -98,7 +98,7 @@ ok( RT::Test->set_rights(
 my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login( tester => 'password' ), 'logged in';
 
-diag "check that we have no the CF on the create";
+diag "check that we don't have the cf on create";
 {
     $m->submit_form(
         form_name => "CreateTicketInQueue",

commit c11a19972689b8a299e94cea705606b436b99468
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:13:41 2010 -0400

    Numerous fixes to form names in tests

diff --git a/t/customfields/access_via_queue.t b/t/customfields/access_via_queue.t
index 2612fec..b6a1abe 100644
--- a/t/customfields/access_via_queue.t
+++ b/t/customfields/access_via_queue.t
@@ -117,7 +117,7 @@ diag "check that we don't have the cf on create";
     ok $tid, "created a ticket succesfully";
     $m->content_lacks($cf_name, "don't see CF");
 
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $form = $m->form_name('TicketModify');
     $cf_field = "Object-RT::Ticket-$tid-CustomField-". $cf->id ."-Value";
     ok !$form->find_input( $cf_field ), 'no form field on the page';
@@ -142,13 +142,13 @@ diag "check that owner can see and edit CF";
     ok $m->goto_ticket( $tid ), "opened ticket";
     $m->content_contains($cf_name, "see CF");
 
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     my $form = $m->form_name('TicketModify');
     my $cf_field = "Object-RT::Ticket-$tid-CustomField-". $cf->id ."-Value";
     ok $form->find_input( $cf_field ), 'form field on the page';
 
     $m->submit_form(
-        form_number => 3,
+        form_name => 'TicketModify',
         fields => {
             $cf_field => "changed cf",
         },
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index 81af084..7a28806 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 35;
+use RT::Test tests => 33;
 
 my ( $baseurl, $m ) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -84,7 +84,7 @@ diag 'check search build page';
 {
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
 
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     my ($cf_op) =
       $m->find_all_inputs( type => 'option', name_regex => qr/test cf date/ );
     is_deeply(
@@ -108,7 +108,7 @@ diag 'check search build page';
     $m->content_lacks( '2010-05-06', 'did not get the wrong ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -119,7 +119,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
@@ -130,7 +130,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -141,7 +141,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 0 tickets', 'Found 0 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -152,7 +152,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 0 tickets', 'Found 0 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index 33b868d..6019859 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -124,7 +124,7 @@ diag 'check search build page';
 {
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
 
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     my ($cf_op) =
       $m->find_all_inputs( type => 'option', name_regex => qr/test cf datetime/ );
     is_deeply(
@@ -159,7 +159,7 @@ diag 'check search build page';
     $m->login( 'shanghai', 'password', logout => 1 );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -170,7 +170,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -181,7 +181,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 2 ticket', 'Found 2 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
@@ -192,7 +192,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 2 tickets', 'Found 2 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -203,7 +203,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
diff --git a/t/web/dashboards-permissions.t b/t/web/dashboards-permissions.t
index bce51dd..dc66d8a 100644
--- a/t/web/dashboards-permissions.t
+++ b/t/web/dashboards-permissions.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test nodata => 1, tests => 7;
+use RT::Test nodata => 1, tests => 6;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -28,9 +28,8 @@ $user_obj->PrincipalObj->GrantRight(Right => $_, Object => $RT::System)
 
 ok $m->login(customer => 'customer'), "logged in";
 
-$m->get_ok("$url/Dashboards");
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok( {id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id], "the only selectable privacy is user");
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index 64f1370..a1ed228 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -64,7 +64,7 @@ $m->content_contains("Create");
 $m->get_ok($url."Dashboards/index.html");
 $m->content_contains("New", "'New' link because we now have ModifyOwnDashboard");
 
-$m->follow_link_ok({ id => 'Tools-Dashboards-Create'});
+$m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 $m->field("Name" => 'different dashboard');
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
@@ -141,7 +141,7 @@ $ticket->Create(
 	Subject   => 'dashboard test',
 );
 
-$m->follow_link_ok({text => 'different dashboard'});
+$m->follow_link_ok({id => 'page-show'});
 $m->content_contains("50 highest priority tickets I own");
 $m->content_contains("50 newest unowned tickets");
 $m->content_lacks("Bookmarked Tickets");
@@ -153,7 +153,7 @@ $m->content_contains("50 newest unowned tickets");
 $m->content_lacks("Bookmarked Tickets");
 $m->content_contains("dashboard test", "ticket subject");
 
-$m->get_ok("/Dashboards/Subscription.html?DashboardId=$id");
+$m->get_ok("/Dashboards/Subscription.html?id=$id");
 $m->form_name('SubscribeDashboard');
 $m->click_button(name => 'Save');
 $m->content_contains("Permission denied");
@@ -231,7 +231,7 @@ $m->click_button(value => 'Create');
 $m->content_lacks("No permission to create dashboards");
 $m->content_contains("Saved dashboard system dashboard");
 
-$m->follow_link_ok({text => 'Content'});
+$m->follow_link_ok({id => 'page-content'});
 
 $form = $m->form_name('Dashboard-Searches-body');
 @input = $form->find_input('Searches-body-Available');
@@ -244,7 +244,7 @@ $m->content_contains("Dashboard updated");
 
 $m->content_contains("The following queries may not be visible to all users who can see this dashboard.");
 
-$m->follow_link_ok({text => 'system dashboard'});
+$m->follow_link_ok({id => 'page-show'});
 $m->content_contains("personal search", "saved search shows up");
 $m->content_contains("dashboard test", "matched ticket shows up");
 
diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index a91af23..377bc28 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -20,7 +20,7 @@ diag "check that signing doesn't work if there is no key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Sign => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -47,7 +47,7 @@ diag "check that things don't work if there is no key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -61,7 +61,7 @@ diag "check that things don't work if there is no key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok !$form->find_input( 'UseKey-rt-test at example.com' ), 'no key selector';
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -85,7 +85,7 @@ diag "check that things still doesn't work if key is not trusted";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -99,7 +99,7 @@ diag "check that things still doesn't work if key is not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 1, 'one option';
 
@@ -134,7 +134,7 @@ diag "check that things still doesn't work if two keys are not trusted";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -148,7 +148,7 @@ diag "check that things still doesn't work if two keys are not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -181,7 +181,7 @@ diag "check that we see key selector even if only one key is trusted but there a
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -195,7 +195,7 @@ diag "check that we see key selector even if only one key is trusted but there a
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -210,7 +210,7 @@ diag "check that key selector works and we can select trusted key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -224,7 +224,7 @@ diag "check that key selector works and we can select trusted key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -244,7 +244,7 @@ diag "check encrypting of attachments";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -259,7 +259,7 @@ diag "check encrypting of attachments";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index 29482dd..2f4cdbf 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -33,7 +33,7 @@ diag "check that signing doesn't work if there is no key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Sign => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -63,7 +63,7 @@ diag "check that things don't work if there is no key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -77,7 +77,7 @@ diag "check that things don't work if there is no key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok !$form->find_input( 'UseKey-rt-test at example.com' ), 'no key selector';
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -103,7 +103,7 @@ diag "check that things still doesn't work if key is not trusted";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -117,7 +117,7 @@ diag "check that things still doesn't work if key is not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 1, 'one option';
 
@@ -153,7 +153,7 @@ diag "check that things still doesn't work if two keys are not trusted";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -167,7 +167,7 @@ diag "check that things still doesn't work if two keys are not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -201,7 +201,7 @@ diag "check that we see key selector even if only one key is trusted but there a
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -215,7 +215,7 @@ diag "check that we see key selector even if only one key is trusted but there a
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -231,7 +231,7 @@ diag "check that key selector works and we can select trusted key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -245,7 +245,7 @@ diag "check that key selector works and we can select trusted key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -266,7 +266,7 @@ diag "check encrypting of attachments";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -281,7 +281,7 @@ diag "check encrypting of attachments";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
diff --git a/t/web/gnupg-tickyboxes.t b/t/web/gnupg-tickyboxes.t
index a922f82..12741a0 100644
--- a/t/web/gnupg-tickyboxes.t
+++ b/t/web/gnupg-tickyboxes.t
@@ -66,7 +66,7 @@ diag "check in read-only mode that queue's props influence create/update ticket
     foreach my $variant ( @variants ) {
         set_queue_crypt_options( %$variant );
         $m->get( $m->rt_base_url . "/Ticket/Update.html?Action=Respond&id=$id" );
-        $m->form_name('TicketModify');
+        $m->form_name('TicketUpdate');
         if ( $variant->{'Encrypt'} ) {
             ok $m->value('Encrypt', 2), "encrypt tick box is checked";
         } else {
diff --git a/t/web/search_rss.t b/t/web/search_rss.t
index da68dcf..d273e36 100644
--- a/t/web/search_rss.t
+++ b/t/web/search_rss.t
@@ -22,7 +22,7 @@ $agent->form_name('BuildQuery');
 $agent->field('idOp', '>');
 $agent->field('ValueOfid', '0');
 $agent->submit('DoSearch');
-$agent->follow_link_ok({text=>'Show Results'});
+$agent->follow_link_ok({id => 'search-current_search-results'});
 
 for ( 1 .. 5 ) {
     $agent->content_contains('Ticket ' . $_);
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
index 49fe4ee..a43ee4c 100644
--- a/t/web/ticket-create-utf8.t
+++ b/t/web/ticket-create-utf8.t
@@ -32,7 +32,7 @@ ok $m->login, 'logged in';
 # create a ticket with a subject only
 foreach my $test_str ( $ru_test, $l1_test ) {
     ok $m->goto_create_ticket( $q ), "go to create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->field( Subject => $test_str );
     $m->submit;
 
@@ -49,7 +49,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
 foreach my $test_str ( $ru_test, $l1_test ) {
     foreach my $support_str ( $ru_support, $l1_support ) {
         ok $m->goto_create_ticket( $q ), "go to create ticket";
-        $m->form_name('TicketModify');
+        $m->form_name('TicketCreate');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
         $m->submit;
@@ -72,7 +72,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
 foreach my $test_str ( $ru_test, $l1_test ) {
     foreach my $support_str ( $ru_support, $l1_support ) {
         ok $m->goto_create_ticket( $q ), "go to create ticket";
-        $m->form_name('TicketModify');
+        $m->form_name('TicketCreate');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
         $m->submit;

commit e880c2dc659fe96bad2547664f25f0d127fafa16
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 19:37:13 2010 -0400

    add personal saved searches to prefs menus

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 3d30f35..e175114 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -221,12 +221,26 @@ if ( $request_path =~ qr{.*} ) {
         $about_me->child( about_me => title => loc('About me'), path => '/User/Prefs.html', );
         $about_me->child( search_options => title => loc('Search options'),
                           path => '/Prefs/SearchOptions.html', );
-        $about_me->child( myrt => title =>  loc('RT at a glance'), path => '/Prefs/MyRT.html',
-        );
-        $about_me->child( quicksearch => title => 'Quick search' => title => loc('Quick search'),
-                          path => '/Prefs/Quicksearch.html' );
-    }
+        $about_me->child( myrt => title => loc('RT at a glance'),
+                          path => '/Prefs/MyRT.html', );
+        $about_me->child( quicksearch => title => 'Quick search' => title =>
+                              loc('Quick search'),
+                          path => '/Prefs/Quicksearch.html'
+                        );
+
+        my $searches = [ $m->comp(
+                          "/Search/Elements/SearchesForObject",
+                          Object => RT::System->new( $session{'CurrentUser'} )) ];
+        my $i = 0;
+        for my $search (@$searches) {
+            $about_me->child( "search-" . $i++,
+                      title => $search->[0],
+                      path  => "/Prefs/Search.html?" . $query_string->(
+                          name => ref( $search->[1] ) . '-' . $search->[1]->Id),
+            );
 
+        }
+    }
     if ( $session{'CurrentUser'}->Name
          && (   !RT->Config->Get('WebExternalAuth')
               || RT->Config->Get('WebFallbackToInternalAuth') )

commit abe3547bcdf48d4dc89a0590d804451a1bab35b0
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 19:37:40 2010 -0400

    perltidy

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e175114..3ca7098 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -69,7 +69,7 @@ my $query_string = sub {
 };
 
 if ( $request_path =~ qr{.*} ) {
-    Menu->child( home => title =>  loc('HomePage'), path => '/' );
+    Menu->child( home => title => loc('HomePage'), path => '/' );
     my $tickets = Menu->child( search => title => loc('Tickets'),
                                path => '/Search/Build.html' );
     $tickets->child( simple => title => loc('Simple Search') => path =>
@@ -88,12 +88,14 @@ if ( $request_path =~ qr{.*} ) {
     }
 
     my $tools = Menu->child( loc('Tools'), path => '/Tools/index.html' );
-    my $dashes = $tools->child( loc('Dashboards'), path => '/Dashboards/index.html' );
+    my $dashes = $tools->child( loc('Dashboards'),
+                                path => '/Dashboards/index.html' );
 
     $dashes->child( loc('Select'), path => "/Dashboards/index.html" );
     my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
     if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
-        $dashes->child( loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
+        $dashes->child(
+                loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
     }
     my $reports = $tools->child( loc('Reports'),
                                  path => '/Tools/Reports/index.html' );
@@ -116,35 +118,46 @@ if ( $request_path =~ qr{.*} ) {
     {
         my $admin = Menu->child( Config => title => loc('Configuration'),
                                  path   => '/Admin/' );
-        my $users = $admin->child( loc('Users'),  path => '/Admin/Users/', );
+        my $users = $admin->child( loc('Users'), path => '/Admin/Users/', );
         $users->child( loc('Select'), path => "/Admin/Users/" );
-        $users->child( loc('Create'), path => "/Admin/Users/Modify.html?Create=1" );
+        $users->child( loc('Create'),
+                       path => "/Admin/Users/Modify.html?Create=1" );
 
-
-        my $groups = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
+        my $groups
+            = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
 
         $groups->child( loc('Select'), path => "/Admin/Groups/" );
-        $groups->child( loc('Create'), path => "/Admin/Groups/Modify.html?Create=1" );
-
+        $groups->child( loc('Create'),
+                        path => "/Admin/Groups/Modify.html?Create=1" );
 
-        my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
+        my $queues = $admin->child( queues => title => loc('Queues'),
+                                    path => '/Admin/Queues/', );
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
-        $queues->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
-        my $cfs = $admin->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
-        );
-        $cfs->child( select => title => loc('Select'), path => "/Admin/CustomFields/" );
-        $cfs->child( create => title => loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
-
-        my $admin_global
-            = $admin->child( global=> title => loc('Global'), path => '/Admin/Global/', );
-
-        my $scrips = $admin_global->child( loc('Scrips'), path => '/Admin/Global/Scripshtml', );
+        $queues->child( loc('Create'),
+                        path => "/Admin/Queues/Modify.html?Create=1" );
+        my $cfs = $admin->child(
+                             'custom-fields' => title => loc('Custom Fields'),
+                             path => '/Admin/CustomFields/', );
+        $cfs->child( select => title => loc('Select'),
+                     path   => "/Admin/CustomFields/" );
+        $cfs->child( create => title => loc('Create'),
+                     path => "/Admin/CustomFields/Modify.html?Create=1" );
+
+        my $admin_global =
+            $admin->child( global => title => loc('Global'),
+                           path   => '/Admin/Global/', );
+
+        my $scrips = $admin_global->child( loc('Scrips'),
+                                        path => '/Admin/Global/Scripshtml', );
         $scrips->child( loc('Select'), path => "/Admin/Global/Scrips.html" );
-        $scrips->child( loc('Create'), path => "/Admin/Global/Scrip.html?Create=1" );
+        $scrips->child( loc('Create'),
+                        path => "/Admin/Global/Scrip.html?Create=1" );
         my $templates = $admin_global->child( loc('Templates'),
-                              path => '/Admin/Global/Templates.html', );
-        $templates->child( loc('Select'), path => "/Admin/Global/Templates.html" );
-        $templates->child( loc('Create'), path => "/Admin/Global/Template.html?Create=1" );
+                                    path => '/Admin/Global/Templates.html', );
+        $templates->child( loc('Select'),
+                           path => "/Admin/Global/Templates.html" );
+        $templates->child( loc('Create'),
+                           path => "/Admin/Global/Template.html?Create=1" );
 
 #        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
 #        {
@@ -206,7 +219,8 @@ if ( $request_path =~ qr{.*} ) {
     }
     my $about_me = Menu->child(
                     'preferences' => title =>
-                        loc('Logged in as <span class="current-user">[_1]</span>',
+                        loc(
+                        'Logged in as <span class="current-user">[_1]</span>',
                         $session{'CurrentUser'}->Name
                         ),
                     escape_title => 1,
@@ -217,8 +231,10 @@ if ( $request_path =~ qr{.*} ) {
                                                Object => $RT::System )
        )
     {
-        $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html', );
-        $about_me->child( about_me => title => loc('About me'), path => '/User/Prefs.html', );
+        $about_me->child( settings => title => loc('Settings'),
+                          path     => '/Prefs/Other.html', );
+        $about_me->child( about_me => title => loc('About me'),
+                          path     => '/User/Prefs.html', );
         $about_me->child( search_options => title => loc('Search options'),
                           path => '/Prefs/SearchOptions.html', );
         $about_me->child( myrt => title => loc('RT at a glance'),
@@ -261,7 +277,7 @@ if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
             $tabs->child( loc('Content'),
                           path => "/Dashboards/Queries.html?id=" . $obj->id );
             $tabs->child( loc('Subscription'),
-                         path => "/Dashboards/Subscription.html?id=" . $obj->id )
+                      path => "/Dashboards/Subscription.html?id=" . $obj->id )
                 if $obj->CurrentUserCanSubscribe;
             $tabs->child( loc('Show'),
                         path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
@@ -308,54 +324,67 @@ if ( $request_path =~ qr'/SelfService' ) {
 }
 
 if ( $request_path =~ qr'Admin/Queues' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
     {
     }
-    if ( my $id = $m->request_args->{'id'} ||$m->request_args->{'Queue'}) {
+    if ( my $id = $m->request_args->{'id'} || $m->request_args->{'Queue'} ) {
         my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
         $queue_obj->Load($id);
 
         my $queue = PageMenu();
-        $queue->child( basics => title =>loc('Basics'),
+        $queue->child( basics => title => loc('Basics'),
                        path => "/Admin/Queues/Modify.html?id=" . $id );
         $queue->child( people => title => loc('Watchers'),
                        path => "/Admin/Queues/People.html?id=" . $id );
-        my $templates = $queue->child( templates => title => loc('Templates'),
-                       path => "/Admin/Queues/Templates.html?id=" . $id );
-
-
-
-        $templates->child(select => title => loc('Select'), path => "/Admin/Queues/Templates.html?id=".$id
-);
-        $templates->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Template.html?Create=1;Queue=".$id );
-
-        my $scrips = $queue->child( scrips => title => loc('Scrips'),
-                       path => "/Admin/Queues/Scrips.html?id=" . $id );
-
-
-
-        $scrips->child(select => title => loc('Select'), path => "/Admin/Queues/Scrips.html?id=".$id
-);
-        $scrips->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Scrip.html?Create=1;Queue=".$id );
-
+        my $templates = $queue->child(
+                              templates => title => loc('Templates'),
+                              path => "/Admin/Queues/Templates.html?id=" . $id
+        );
 
+        $templates->child( select => title => loc('Select'),
+                           path => "/Admin/Queues/Templates.html?id=" . $id );
+        $templates->child(
+                   create => title => loc('Create'),
+                   path => "/Admin/Queues/Template.html?Create=1;Queue=" . $id
+        );
 
+        my $scrips = $queue->child(
+                                 scrips => title => loc('Scrips'),
+                                 path => "/Admin/Queues/Scrips.html?id=" . $id
+        );
 
+        $scrips->child( select => title => loc('Select'),
+                        path => "/Admin/Queues/Scrips.html?id=" . $id );
+        $scrips->child(
+                      create => title => loc('Create'),
+                      path => "/Admin/Queues/Scrip.html?Create=1;Queue=" . $id
+        );
 
-        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id=' . $id );
+        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'),
+              path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='
+                  . $id );
 
-        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id=' . $id );
+        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'),
+            path =>
+                '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='
+                . $id );
 
-        $queue->child( loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=" . $id );
-        $queue->child( loc('User Rights'), path => "/Admin/Queues/UserRights.html?id=" . $id );
+        $queue->child( loc('Group Rights'),
+                       path => "/Admin/Queues/GroupRights.html?id=" . $id );
+        $queue->child( loc('User Rights'),
+                       path => "/Admin/Queues/UserRights.html?id=" . $id );
     }
 }
 
 if ( $request_path =~ qr'/Admin/Users' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
     {
-        PageMenu->child(select => title => loc('Select'), path => "/Admin/Users/" );
-        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1");
+        PageMenu->child( select => title => loc('Select'),
+                         path   => "/Admin/Users/" );
+        PageMenu->child( create => title => loc('Create'),
+                         path => "/Admin/Users/Modify.html?Create=1" );
     }
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
@@ -389,20 +418,20 @@ if ( $request_path =~ qr'Admin/Groups' ) {
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
-        if ($obj->id) {
-        my $tabs = PageMenu->child( $obj->Name,
+        if ( $obj->id ) {
+            my $tabs = PageMenu->child( $obj->Name,
                         path => "/Admin/CustomFields/Modify.html?id=" . $id );
-        $tabs->child( loc('Basics') => path => "/Admin/Groups/Modify.html?id="
-                      . $obj->id );
-        $tabs->child(
+            $tabs->child(
+                      loc('Basics') => path => "/Admin/Groups/Modify.html?id="
+                          . $obj->id );
+            $tabs->child(
                     loc('Members') => path => "/Admin/Groups/Members.html?id="
                         . $obj->id );
-        $tabs->child( loc('Group Rights') => path =>
-                      "/Admin/Groups/GroupRights.html?id=" . $obj->id );
-        $tabs->child(
-             loc('User Rights') => path => "/Admin/Groups/UserRights.html?id="
-                 . $obj->id );
-        $tabs->child(
+            $tabs->child( loc('Group Rights') => path =>
+                          "/Admin/Groups/GroupRights.html?id=" . $obj->id );
+            $tabs->child( loc('User Rights') => path =>
+                          "/Admin/Groups/UserRights.html?id=" . $obj->id );
+            $tabs->child(
                     loc('History') => path => "/Admin/Groups/History.html?id="
                         . $obj->id );
         }
@@ -448,8 +477,9 @@ if ( $request_path =~ qr'Admin/Rules' ) {
 }
 
 if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
-    my $search = Menu()->child('search');
-    my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order => 99 );
+    my $search  = Menu()->child('search');
+    my $actions = PageMenu()
+        ->child( transitions => title => loc('Actions'), sort_order => 99 );
     if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
         my $id  = $1;
         my $obj = RT::Ticket->new( $session{'CurrentUser'} );
@@ -503,9 +533,12 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                                          );
                 } else {
 
-                   $url .= "Display.html?" .$query_string->(Status => $next, id => $id );
+                    $url .= "Display.html?"
+                        . $query_string->( Status => $next, id => $id );
                 }
-                $actions->child( loc( $schema->transition_label( $current => $next ) ) => path => $url );
+                $actions->child(
+                      loc( $schema->transition_label( $current => $next ) ) =>
+                          path => $url );
             }
 
         }
@@ -591,17 +624,20 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
         Order => $m->request_args->{'Order'} || $current_search->{'Order'},
         Page  => $m->request_args->{'Page'}  || $current_search->{'Page'},
         RowsPerPage => ( defined $m->request_args->{'RowsPerPage'}
-                           ? $m->request_args->{'RowsPerPage'}
-                           : $current_search->{'RowsPerPage'}
-                         )
+                         ? $m->request_args->{'RowsPerPage'}
+                         : $current_search->{'RowsPerPage'}
+                       )
                      );
 
     $args = "?" . $query_string->(%query_args);
 
-
-        my $current_search_menu = $search->child( current_search => title => loc('Current Search'));
-        $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" );
+    my $current_search_menu
+        = $search->child( current_search => title => loc('Current Search') );
+    $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 =~ qr|^Search/Results.html|
             &&                        #XXX TODO better abstraction
@@ -611,67 +647,64 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
         {
             my $shred_args =
                 URI->new->query_param(
-                               search          => 1,
-                               plugin          => 'Tickets',
-                               'Tickets:query' => $query_args{'Query'},
-                               'Tickets:limit' => $query_args{'RowsPerPage'}
+                                 search          => 1,
+                                 plugin          => 'Tickets',
+                                 'Tickets:query' => $query_args{'Query'},
+                                 'Tickets:limit' => $query_args{'RowsPerPage'}
                 );
 
-            $current_search_menu->child( 'shredder' => title => loc('Shredder'),
-                            path => 'Admin/Tools/Shredder/?' . $shred_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(
+                            results => title => loc('Show Results') => path =>
+                                "/Search/Results.html$args" );
 
-        $current_search_menu->child( bulk => title =>
-                     loc('Bulk Update') => path => "/Search/Bulk.html$args" );
+        $current_search_menu->child(
+                                bulk => title => loc('Bulk Update') => path =>
+                                    "/Search/Bulk.html$args" );
 
     }
 
 }
 
+if ( $request_path =~ /^\/(?:index.html|$)/ ) {
 
-    if ( $request_path =~ /^\/(?:index.html|$)/ ) {
+    my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
+    my $limit      = 7;
 
-        my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
-        my $limit      = 7;
-
-        $m->callback( Dashboards   => \@dashboards,
-                      Limit        => \$limit,
-                      CallbackName => 'MassageDashboards',
-                    );
+    $m->callback( Dashboards   => \@dashboards,
+                  Limit        => \$limit,
+                  CallbackName => 'MassageDashboards',
+                );
 
-        my $more = 0;
-        if ( @dashboards > $limit ) {
-            $more = 1;
-            splice @dashboards, $limit;
-        }
+    my $more = 0;
+    if ( @dashboards > $limit ) {
+        $more = 1;
+        splice @dashboards, $limit;
+    }
 
-        my $position = 0;
+    my $position = 0;
 
-        for my $dash (@dashboards) {
-            PageMenu->child(
-                        'dashboard-' . $dash->id,
+    for my $dash (@dashboards) {
+        PageMenu->child('dashboard-' . $dash->id,
                         title => $dash->Name,
                         path => 'Dashboards/' . $dash->id . '/' . $dash->Name,
-            );
-        }
-
-        PageMenu()->child( home => title => loc('Home'), path => 'index.html' );
-
-        if ($more) {
-            $tabs->{"D-more"} = { title => loc('More'),
-                                  path  => 'Dashboards/index.html',
-                                };
-        }
-
+                       );
     }
 
+    PageMenu()->child( home => title => loc('Home'), path => 'index.html' );
 
+    if ($more) {
+        $tabs->{"D-more"} = { title => loc('More'),
+                              path  => 'Dashboards/index.html',
+                            };
+    }
 
-
-
+}
 
 
 </%INIT>

commit cec40987725fbc4d43c047b2114c868a7a9e1337
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 19:37:58 2010 -0400

    two more test files now passing

diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 9630d2b..2f87cdc 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 26;
+use RT::Test tests => 25;
 $RT::Test::SKIP_REQUEST_WORK_AROUND = 1;
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -150,8 +150,7 @@ diag "create a ticket with an image";
 }
 
 $m->get( $m->rt_base_url );
-$m->follow_link( text => 'Tickets' );
-$m->follow_link( text => 'New Query' );
+$m->follow_link( id => 'search-new-query');
 
 $m->title_is(q/Query Builder/, 'Query building');
 $m->submit_form(
diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index 2f75eda..4f90e77 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test nodata => 1, tests => 40;
+use RT::Test nodata => 1, tests => 39;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -53,16 +53,16 @@ ok($inner_group->HasMemberRecursively($user_obj->PrincipalId), "inner has user r
 
 ok $m->login(customer => 'customer'), "logged in";
 
-$m->get_ok("$url/Dashboards");
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id], "the only selectable privacy is user");
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 
 $user_obj->PrincipalObj->GrantRight(Right => 'CreateGroupDashboard', Object => $inner_group);
+$user_obj->PrincipalObj->GrantRight(Right => 'SeeGroupDashboard', Object => $inner_group);
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id, "RT::Group-" . $inner_group->Id], "the only selectable privacies are user and inner group (not outer group)");
 $m->field("Name" => 'inner dashboard');
@@ -73,7 +73,6 @@ $m->click_button(value => 'Create');
 $m->content_lacks("No permission to create dashboards");
 $m->content_contains("Saved dashboard inner dashboard");
 $m->content_lacks('Delete', "Delete button hidden because we lack DeleteDashboard");
-
 my $dashboard = RT::Dashboard->new($currentuser);
 my ($id) = $m->content =~ /name="id" value="(\d+)"/;
 ok($id, "got an ID, $id");

commit e82206b6e2f66df7614e21250cf7cb83d13d5cb2
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 20:03:46 2010 -0400

    added ids to template modification code

diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index 86d93a7..ef206ff 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -53,7 +53,7 @@
     Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" name="ModifyTemplate" action="Template.html">
+<form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
 %if ($Create ) {
 <input type="hidden" class="hidden" name="Template" value="new" />
 % } else {
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index d3295b9..a46390d 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -51,7 +51,7 @@
      Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" name="ModifyTemplate" action="Template.html">
+<form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
 %if ($Create ) {
 <input type="hidden" class="hidden" name="Template" value="new" />
 % } else {

commit 0495924f8ac4f81c943f4a29e9c06385647559f4
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 20:05:42 2010 -0400

    add back a couple now-missing tabs

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 3ca7098..412885b 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -106,7 +106,11 @@ if ( $request_path =~ qr{.*} ) {
     $reports->child( loc('Created in a date range'),
                      path => '/Tools/Reports/CreatedByDates.html', );
 
-    $tools->child( loc('My Day'), path => '/Tools/MyDay.html' );
+    $tools->child( my_day => title => loc('My Day'), path => '/Tools/MyDay.html' );
+
+    $tools->child( offline => title => loc('Offline'), path => '/Tools/Offline.html');
+    $tools->child( watching => title => loc('Watching Queues'), path => '/Tools/Watching.html');
+
     if ( $session{'CurrentUser'}
          ->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
     {

commit 1852221e4fc1efc45c0506e73aaba1bcd46b5d4e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 20:06:28 2010 -0400

    two more passing test files

diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index fd57883..207ffe8 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 46;
+use RT::Test tests => 43;
 
 my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -13,11 +13,7 @@ my $cf_name = 'test select one value';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -54,12 +50,11 @@ ok $queue && $queue->id, 'loaded or created queue';
 
 diag "apply the CF to General queue";
 {
-    $m->follow_link( text => 'Queues' );
-    $m->title_is(q/Admin queues/, 'admin-queues screen');
+    $m->follow_link( id => 'config-queues');
     $m->follow_link( text => 'General' );
-    $m->title_is(q/Editing Configuration for queue General/, 'admin-queue: general');
-    $m->follow_link( text => 'Ticket Custom Fields' );
-    $m->title_is(q/Edit Custom Fields for General/, 'admin-queue: general cfid');
+    $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
+    $m->follow_link( id => 'page-ticket-custom-fields');
+    $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid');
 
     $m->form_name('EditCustomFields');
     $m->tick( "AddCustomField" => $cfid );
@@ -91,7 +86,7 @@ diag "create a ticket using API with 'asd'(not 'ASD') as value of the CF";
 diag "check that values of the CF are case insensetive(asd vs. ASD)";
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
@@ -113,7 +108,7 @@ diag "check that values of the CF are case insensetive(asd vs. ASD)";
 diag "check that 0 is ok value of the CF";
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
@@ -137,7 +132,7 @@ diag "check that 0 is ok value of the CF";
 diag "check that we can set empty value when the current is 0";
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
diff --git a/t/web/html_template.t b/t/web/html_template.t
index 99c72b0..fccd368 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 18;
+use RT::Test tests => 16;
 use Encode;
 my ( $baseurl, $m ) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -17,13 +17,10 @@ diag('make Autoreply template a html one and add utf8 chars')
   if $ENV{TEST_VERBOSE};
 
 {
-    $m->follow_link_ok( { text => 'Configuration' }, '-> Configuration' );
-    $m->follow_link_ok( { text => 'Global' },        '-> Global' );
-    $m->follow_link_ok( { text => 'Templates' },     '-> Templates' );
+    $m->follow_link_ok( { id => 'config-global-templates' },     '-> Templates' );
     $m->follow_link_ok( { text => 'Autoreply' },     '-> Autoreply' );
-
     $m->submit_form(
-
+        form_name => 'ModifyTemplate',
         fields => {
             Content => <<'EOF',
 Subject: AutoReply: {$Ticket->Subject}

commit deb0a32570b96ae3f6d2cee2f6e1e51b08b3a843
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 21:55:00 2010 -0400

    further test updates

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 412885b..a03302b 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -632,6 +632,12 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                          : $current_search->{'RowsPerPage'}
                        )
                      );
+    for my $field (qw(Order OrderBy)) {
+        if (ref($query_args{$field}) eq 'ARRAY') {
+        $query_args{$field} = join("|",@{$query_args{$field}});
+        }
+    }
+
 
     $args = "?" . $query_string->(%query_args);
 
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 2f87cdc..2a183a8 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 25;
+use RT::Test tests => 23;
 $RT::Test::SKIP_REQUEST_WORK_AROUND = 1;
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -107,7 +107,7 @@ diag "check that we have no the CF on the create"
     $tid = $1 if $m->content =~ /Ticket (\d+) created/i;
     ok $tid, "a ticket is created succesfully";
 
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->content_lacks('Upload multiple images', 'has no upload image field');
     $form = $m->form_name('TicketModify');
     $upload_field = "Object-RT::Ticket-$tid-CustomField-$cfid-Upload";
@@ -150,8 +150,7 @@ diag "create a ticket with an image";
 }
 
 $m->get( $m->rt_base_url );
-$m->follow_link( id => 'search-new-query');
-
+$m->follow_link( id => 'search-new');
 $m->title_is(q/Query Builder/, 'Query building');
 $m->submit_form(
     form_name => "BuildQuery",
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index 6019859..5b67579 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 44;
+use RT::Test tests => 42;
 RT->Config->Set( 'Timezone' => 'EST5EDT' ); # -04:00
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -16,11 +16,7 @@ my $cf_name = 'test cf datetime';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -42,9 +38,9 @@ ok $queue && $queue->id, 'loaded or created queue';
     $m->follow_link( text => 'Queues' );
     $m->title_is(q/Admin queues/, 'admin-queues screen');
     $m->follow_link( text => 'General' );
-    $m->title_is(q/Editing Configuration for queue General/, 'admin-queue: general');
+    $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
     $m->follow_link( text => 'Ticket Custom Fields' );
-    $m->title_is(q/Edit Custom Fields for General/, 'admin-queue: general cfid');
+    $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid');
 
     $m->form_name('EditCustomFields');
     $m->tick( "AddCustomField" => $cfid );
diff --git a/t/web/cf_onqueue.t b/t/web/cf_onqueue.t
index 86eaa4d..511606d 100644
--- a/t/web/cf_onqueue.t
+++ b/t/web/cf_onqueue.t
@@ -1,18 +1,14 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 14;
+use RT::Test tests => 12;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 ok $m->login, 'logged in';
 
 diag "Create a queue CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -47,7 +43,7 @@ diag "Edit the CF value for default queue";
     $m->follow_link( url => '/Admin/Queues/' );
     $m->title_is(q/Admin queues/, 'queues configuration screen');
     $m->follow_link( text => "1" );
-    $m->title_is(q/Editing Configuration for queue General/, 'default queue configuration screen');
+    $m->title_is(q/Configuration for queue General/, 'default queue configuration screen');
     $m->content_contains('QueueCFTest', 'CF QueueCFTest displayed on default queue' );
     $m->submit_form(
         form_number => 3,

commit 15fea6b2e88bec0f8e13545e3d586f39f8feefcb
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 22:07:19 2010 -0400

    added a property to menuing to determine whether to <a> menu items

diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index f996358..b70dda7 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -58,6 +58,7 @@ use Scalar::Util qw(weaken);
 
 __PACKAGE__->mk_accessors(qw(
     title sort_order link target escape_title class render_children_inline
+    link_item
     raw_html key
 ));
 
@@ -221,10 +222,11 @@ sub child {
             $child->parent($self);
         } else {
             $child = $proto->new(
-                {   parent     => $self,
+                {   parent      => $self,
                     key         => $key,
-                    title        => $key,
-                    escape_title => 1,
+                    title       => $key,
+                    escape_title=> 1,
+                    link_item   => 1,
                     %args
                 }
             );
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index a35b7f7..08fa385 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -51,13 +51,17 @@
 %   my $item_id = lc(($parent_id? $parent_id."-" : "") .$child->key);
 %   $item_id =~ s/\s/-/g;
 <%" " x ($depth+1)%><li>\
+% if ($child->link_item) {
 <a id="<%$item_id%>" <% $child->path ? ' href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%>>\
+% }
 % if ($child->escape_title) {
-<%$child->title |n%>\
-% } else {
 <%$child->title%>\
+% } else {
+<%$child->title |n%>\
 % }
+% if ($child->link_item) {
 </a>\
+% }
 % if ($child->has_children) {
 <& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key, depth=> ($depth+1) &>
 <%" " x ($depth+1)%></li>

commit 9a35a0bb9824a2be29eda3342910ab064cd94363
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 22:07:55 2010 -0400

    bring back "star" links.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index a03302b..e49b740 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -227,7 +227,7 @@ if ( $request_path =~ qr{.*} ) {
                         'Logged in as <span class="current-user">[_1]</span>',
                         $session{'CurrentUser'}->Name
                         ),
-                    escape_title => 1,
+                    escape_title => 0,
                     sort_order   => 99
     );
     if ( $session{'CurrentUser'}->UserObj
@@ -491,6 +491,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
 
         my $tabs = PageMenu()
             ; #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
+        $tabs->child ( bookmark => title => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ), escape_title => 0, link_item => 0);
 
         $tabs->child(
                  loc('Display') => path => "/Ticket/Display.html?id=" . $id );
@@ -567,7 +568,6 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                              "/Ticket/Update.html?action=comment&id=" . $id );
         }
 
-# $actions->{'_ZZ'} = { html => $m->scomp( '/Ticket/Elements/Bookmark', id => $obj->id ), };
 
         if ( defined $session{"tickets"} ) {
 

commit 4ac665580d28d531dfc7877f830a61597ef3676c
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 22:15:32 2010 -0400

    fix more t/ navigation

diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index e5d5604..84cf0a9 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -128,7 +128,7 @@ diag "on reply correct owner is selected";
     is $ticket->Owner, $user_b->id, 'correct owner';
 
     $agent_a->goto_ticket( $id );
-    $agent_a->follow_link_ok({id => 'basics'}, 'Ticket -> Basics');
+    $agent_a->follow_link_ok({id => 'page-basics'}, 'Ticket -> Basics');
 
     my $form = $agent_a->form_name('TicketModify');
     is $form->value('Owner'), '', 'empty value selected';

commit 211ab767a606a6a459a1bea8ae4aaecda9049f94
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 2 14:52:08 2010 +0800

    fix dashboards tests

diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index 4f90e77..668fa84 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test nodata => 1, tests => 39;
+use RT::Test nodata => 1, tests => 35;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -60,7 +60,6 @@ is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 
 $user_obj->PrincipalObj->GrantRight(Right => 'CreateGroupDashboard', Object => $inner_group);
-$user_obj->PrincipalObj->GrantRight(Right => 'SeeGroupDashboard', Object => $inner_group);
 
 $m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
@@ -70,9 +69,17 @@ $m->field("Privacy" => "RT::Group-" . $inner_group->Id);
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 
 $m->click_button(value => 'Create');
-$m->content_lacks("No permission to create dashboards");
+
+$m->content_contains("Permission denied", "we lack SeeGroupDashboard");
+$user_obj->PrincipalObj->GrantRight(
+    Right  => 'SeeGroupDashboard',
+    Object => $inner_group,
+);
+$m->reload;
+$m->content_lacks("Permission denied", "we now have SeeGroupDashboard");
 $m->content_contains("Saved dashboard inner dashboard");
 $m->content_lacks('Delete', "Delete button hidden because we lack DeleteDashboard");
+
 my $dashboard = RT::Dashboard->new($currentuser);
 my ($id) = $m->content =~ /name="id" value="(\d+)"/;
 ok($id, "got an ID, $id");
@@ -82,18 +89,10 @@ is($dashboard->Name, "inner dashboard");
 is($dashboard->Privacy, 'RT::Group-' . $inner_group->Id, "correct privacy");
 is($dashboard->PossibleHiddenSearches, 0, "all searches are visible");
 
-$m->no_warnings_ok;
-
-$m->get_ok("/Dashboards/Modify.html?id=$id");
-$m->content_lacks("inner dashboard", "no SeeGroupDashboard right");
-$m->content_contains("Permission denied");
-
-$m->warning_like(qr/Permission denied/, "got a permission denied warning");
+$m->warning_like(qr/Permission denied/, "got a permission denied warning when trying to see the dashboard");
 
-$user_obj->PrincipalObj->GrantRight(Right => 'SeeGroupDashboard', Object => $inner_group);
 $m->get_ok("/Dashboards/Modify.html?id=$id");
 $m->content_contains("inner dashboard", "we now have SeeGroupDashboard right");
 $m->content_lacks("Permission denied");
-
 $m->content_contains('Subscription', "Subscription link not hidden because we have SubscribeDashboard");
 
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index a1ed228..b5d07d9 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 109;
+use RT::Test tests => 110;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -63,20 +63,19 @@ $m->content_contains("Create");
 
 $m->get_ok($url."Dashboards/index.html");
 $m->content_contains("New", "'New' link because we now have ModifyOwnDashboard");
-
 $m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 $m->field("Name" => 'different dashboard');
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 $m->click_button(value => 'Create');
-$m->content_lacks("No permission to create dashboards");
-$m->content_contains("Saved dashboard different dashboard");
-$m->content_lacks('Delete', "Delete button hidden because we lack DeleteOwnDashboard");
-
-$m->get_ok($url."Dashboards/index.html");
-$m->content_lacks("different dashboard", "we lack SeeOwnDashboard");
 
+$m->content_contains("Permission denied", "we lack SeeOwnDashboard");
 $user_obj->PrincipalObj->GrantRight(Right => 'SeeOwnDashboard', Object => $RT::System);
+$m->reload;
+$m->content_lacks("Permission denied", "we now have SeeOwnDashboard");
+$m->content_contains("Saved dashboard different dashboard");
+$m->content_lacks('Delete', "Delete button hidden because we lack DeleteOwnDashboard");
+$m->warning_like(qr/Permission denied/, "got a permission denied warning when trying to see the dashboard");
 
 $m->get_ok($url."Dashboards/index.html");
 $m->content_contains("different dashboard", "we now have SeeOwnDashboard");
@@ -144,13 +143,15 @@ $ticket->Create(
 $m->follow_link_ok({id => 'page-show'});
 $m->content_contains("50 highest priority tickets I own");
 $m->content_contains("50 newest unowned tickets");
-$m->content_lacks("Bookmarked Tickets");
+$m->content_unlike( qr/Bookmarked Tickets.*Bookmarked Tickets/s,
+    'only dashboard queries show up' );
 $m->content_contains("dashboard test", "ticket subject");
 
 $m->get_ok("/Dashboards/$id/This fragment left intentionally blank");
 $m->content_contains("50 highest priority tickets I own");
 $m->content_contains("50 newest unowned tickets");
-$m->content_lacks("Bookmarked Tickets");
+$m->content_unlike( qr/Bookmarked Tickets.*Bookmarked Tickets/s,
+    'only dashboard queries show up' );
 $m->content_contains("dashboard test", "ticket subject");
 
 $m->get_ok("/Dashboards/Subscription.html?id=$id");
@@ -169,7 +170,8 @@ $m->follow_link_ok({text => "Subscription"});
 $m->content_contains("Subscribe to dashboard different dashboard");
 $m->content_contains("Unowned Tickets");
 $m->content_contains("My Tickets");
-$m->content_lacks("Bookmarked Tickets", "only dashboard queries show up");
+$m->content_unlike( qr/Bookmarked Tickets.*Bookmarked Tickets/s,
+    'only dashboard queries show up' );
 
 $m->form_name('SubscribeDashboard');
 $m->click_button(name => 'Save');

commit 5b811380c91e1654e1f52ab139c928591202a22c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 2 14:58:38 2010 +0800

    fix ticket_owner_autocomplete.t: we meant the reply page

diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index 84cf0a9..0da37dd 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -127,10 +127,10 @@ diag "on reply correct owner is selected";
     ok $id, 'created a ticket #'. $id or diag "error: $msg";
     is $ticket->Owner, $user_b->id, 'correct owner';
 
-    $agent_a->goto_ticket( $id );
-    $agent_a->follow_link_ok({id => 'page-basics'}, 'Ticket -> Basics');
+    $agent_a->goto_ticket($id);
+    $agent_a->follow_link_ok( { id => 'page-transitions-reply' }, 'Reply' );
 
-    my $form = $agent_a->form_name('TicketModify');
+    my $form = $agent_a->form_number(3);
     is $form->value('Owner'), '', 'empty value selected';
     $agent_a->submit;
 

commit 07d514e8681e89e651c00d21d5d10e8f66874bea
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 2 16:03:15 2010 +0800

    tabs fixes

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e49b740..7243594 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -152,7 +152,7 @@ if ( $request_path =~ qr{.*} ) {
                            path   => '/Admin/Global/', );
 
         my $scrips = $admin_global->child( loc('Scrips'),
-                                        path => '/Admin/Global/Scripshtml', );
+                                        path => '/Admin/Global/Scrips.html', );
         $scrips->child( loc('Select'), path => "/Admin/Global/Scrips.html" );
         $scrips->child( loc('Create'),
                         path => "/Admin/Global/Scrip.html?Create=1" );
@@ -211,13 +211,15 @@ if ( $request_path =~ qr{.*} ) {
                               path => '/Admin/Global/UserRights.html', );
         $admin_global->child( loc('RT at a glance'),
                               path => '/Admin/Global/MyRT.html', );
-        $admin_global->child( loc('System'),
-                              path => '/Admin/Global/System.html', );
+        $admin_global->child( loc('Theme'),
+                              path => '/Admin/Global/Theme.html', );
 
         my $admin_tools
             = $admin->child( loc('Tools'), path => '/Admin/Tools/', );
         $admin_tools->child( loc('System Configuration'),
                              path => '/Admin/Tools/Configuration.html', );
+        $admin_tools->child( loc('SQL Queries'),
+                             path => '/Admin/Tools/Queries.html', );
         $admin_tools->child( loc('Shredder'),
                              path => '/Admin/Tools/Shredder', );
     }
@@ -267,7 +269,7 @@ if ( $request_path =~ qr{.*} ) {
        )
     {
         $about_me->child( logout => title => loc('Logout'),
-                          path   => 'NoAuth/Logout.html' );
+                          path   => '/NoAuth/Logout.html' );
     }
 }
 if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
@@ -420,11 +422,11 @@ if ( $request_path =~ qr'Admin/Groups' ) {
                 loc('Create') => path => "/Admin/Groups/Modify.html?Create=1",
                 separator     => 1 );
     if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::User->new( $session{'CurrentUser'} );
+        my $obj = RT::Group->new( $session{'CurrentUser'} );
         $obj->Load($id);
         if ( $obj->id ) {
             my $tabs = PageMenu->child( $obj->Name,
-                        path => "/Admin/CustomFields/Modify.html?id=" . $id );
+                        path => "/Admin/Groups/Modify.html?id=" . $id );
             $tabs->child(
                       loc('Basics') => path => "/Admin/Groups/Modify.html?id="
                           . $obj->id );

commit 0c5d8799a92caa58d61229b44a3e1a64d848ac51
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 2 16:03:32 2010 +0800

    update walk.t

diff --git a/t/web/walk.t b/t/web/walk.t
index 87a78c2..af41398 100644
--- a/t/web/walk.t
+++ b/t/web/walk.t
@@ -52,8 +52,8 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->back;
 
         $m->follow_link_ok( { text => 'root' }, '-> root' );
-        for my $tab ( 'History', 'Memberships', 'RT at a glance', 'Basics' ) {
-            $m->follow_link_ok( { text => $tab }, "-> $tab" );
+        for my $id ( 'rt-at-a-glance', 'memberships', 'history', 'basics' ) {
+            $m->follow_link_ok( { id => 'page-current-' . $id }, "-> $id" );
         }
     }
 
@@ -69,10 +69,10 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->back;
 
         $m->follow_link_ok( { text => 'group_foo' }, '-> group_foo' );
-        for my $tab ( 'History', 'Members', 'Group Rights', 'User Rights',
-            'Basics' )
+        for my $id ( 'history', 'members', 'group-rights', 'user-rights',
+            'basics' )
         {
-            $m->follow_link_ok( { text => $tab }, "-> $tab" );
+            $m->follow_link_ok( { id => 'page-group_foo-' . $id }, "-> $id" );
         }
     }
 
@@ -85,22 +85,27 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->back;
 
         $m->follow_link_ok( { text => 'General' }, '-> General' );
-        for my $tab (
-            'Watchers',                  'Scrips',
-            'Templates',                 'Ticket Custom Fields',
-            'Transaction Custom Fields', 'Group Rights',
-            'User Rights',               'History',
-            'Basics',
+        for my $id (
+            'people',                    'scrips',
+            'templates',                 'ticket-custom-fields',
+            'transaction-custom-fields', 'group-rights',
+            'user-rights',               'basics',
           )
         {
-            $m->follow_link_ok( { text => $tab }, "-> $tab" );
+            $m->follow_link_ok( { id => 'page-' . $id }, "-> $id" );
         }
     }
 
     diag 'walk into /Admin/CustomFields' if $ENV{TEST_VERBOSE};
     {
         my $cf = RT::CustomField->new($RT::SystemUser);
-        ok( $cf->Create( Name => 'cf_foo', Type => 'Freeform' ) );
+        ok(
+            $cf->Create(
+                Name       => 'cf_foo',
+                Type       => 'Freeform',
+                LookupType => 'RT::Queue-RT::Ticket',
+            )
+        );
         $m->get_ok( $baseurl, 'homepage' );
         $m->follow_link_ok( { text => 'Configuration' }, '-> Configuration' );
         $m->follow_link_ok( { text => 'Custom Fields' }, '-> Custom Fields' );
@@ -109,12 +114,8 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
 
         $m->follow_link_ok( { text => 'cf_foo' }, '-> cf_foo' );
 
-        for my $tab ( 'Applies to', 'Group Rights', 'User Rights', 'Basics' ) {
-
-            # very weird, 'Applies to' fails with ->follow_link_ok
-            #        $m->follow_link_ok( { text => $tab }, "-> $tab" );
-            $m->follow_link( text => $tab );
-            is( $m->status, 200, "-> $tab" );
+        for my $id ( 'applies-to', 'group-rights', 'user-rights', 'basics' ) {
+            $m->follow_link_ok( { id => 'page-cf_foo-' . $id }, "-> $id" );
         }
     }
 
@@ -124,11 +125,9 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->follow_link_ok( { text => 'Configuration' }, '-> Configuration' );
         $m->follow_link_ok( { text => 'Tools' },         '-> Tools' );
 
-        for my $tab ( 'System Configuration', 'SQL Queries', 'Shredder' ) {
-
-            #            $m->follow_link_ok( { text => $tab }, "-> $stab" );
-            $m->follow_link( text => $tab );
-            is( $m->status, 200, "-> $tab" );
+        for my $tab ( 'Configuration.html', 'Queries.html', 'Shredder' ) {
+            $m->follow_link_ok( { url_regex => qr!/Admin/Tools/$tab! },
+                "-> /Admin/Tools/$tab" );
         }
     }
 
@@ -138,32 +137,21 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->follow_link_ok( { text => 'Configuration' }, '-> Configuration' );
         $m->follow_link_ok( { text => 'Global' },        '-> Global' );
 
-        for my $tab ( 'Group Rights', 'User Rights', 'RT at a glance', 'Theme' )
+        for my $id ( 'group-rights', 'user-rights', 'rt-at-a-glance', 'theme' )
         {
-            $m->follow_link_ok( { text => $tab }, "-> $tab" );
+            $m->follow_link_ok( { id => 'config-global-' . $id }, "-> $id" );
         }
 
-        for my $tab ( 'Scrips', 'Templates' ) {
-            $m->follow_link_ok( { text => 'Global' }, '-> Global' );
-            $m->follow_link_ok( { text => $tab },     "-> $tab" );
-            $m->follow_link_ok( { text => 'Create' }, '-> Create' );
-            $m->back;
-            $m->follow_link_ok( { text => '1' },      '-> 1' );
-            $m->follow_link_ok( { text => 'Select' }, '-> Select' );
+        for my $tab ( 'scrips', 'templates' ) {
+            $m->follow_link_ok( { id => "config-global-" . $tab }, "-> $tab" );
+            for my $id (qw/create select/) {
+                $m->follow_link_ok( { id => "config-global-" . $tab . "-$id" },
+                    "-> $id" );
+            }
+            $m->follow_link_ok( { text => '1' }, '-> 1' );
         }
     }
 
-    diag 'walk into /Prefs' if $ENV{TEST_VERBOSE};
-    {
-        $m->get_ok( $baseurl, 'homepage' );
-        $m->follow_link_ok( { text => 'Preferences' }, '-> Preferences' );
-
-        for
-          my $tab ( 'Settings', 'About me', 'Search options', 'RT at a glance' )
-        {
-            $m->follow_link_ok( { text => $tab }, "-> $tab" );
-        }
-    }
 }
 
 diag 'walk into /Approvals' if $ENV{TEST_VERBOSE};
@@ -175,3 +163,14 @@ diag 'walk into /Approvals' if $ENV{TEST_VERBOSE};
     is( $m->status, 200, '-> Approvals' );
 }
 
+diag 'walk into /Prefs' if $ENV{TEST_VERBOSE};
+{
+    for my $id (
+        'settings',    'about_me', 'search_options', 'myrt',
+        'quicksearch', 'search-0', 'search-1',       'search-2',
+        'logout'
+      )
+    {
+        $m->follow_link_ok( { id => 'preferences-' . $id }, "-> $id" );
+    }
+}

commit ccc4ce40ea1df10af7fee5633408d249ae215571
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 09:51:33 2010 -0400

    add more unique ids to some menu items

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 7243594..c7bd72d 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -114,17 +114,17 @@ if ( $request_path =~ qr{.*} ) {
     if ( $session{'CurrentUser'}
          ->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
     {
-        $tools->child( loc('Approval'), path => '/Approvals/' );
+        $tools->child( approval => title => loc('Approval'), path => '/Approvals/' );
     }
 
     if ( $session{'CurrentUser'}
          ->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
     {
-        my $admin = Menu->child( Config => title => loc('Configuration'),
+        my $admin = Menu->child( config => title => loc('Configuration'),
                                  path   => '/Admin/' );
-        my $users = $admin->child( loc('Users'), path => '/Admin/Users/', );
-        $users->child( loc('Select'), path => "/Admin/Users/" );
-        $users->child( loc('Create'),
+        my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', );
+        $users->child( select => title => loc('Select'), path => "/Admin/Users/" );
+        $users->child( create => title => loc('Create'),
                        path => "/Admin/Users/Modify.html?Create=1" );
 
         my $groups

commit e37fc373bfbc15bef9262b270b8564b7eaa5f616
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 09:52:01 2010 -0400

    move Configuration under the tools menu

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index c7bd72d..5693902 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -120,7 +120,7 @@ if ( $request_path =~ qr{.*} ) {
     if ( $session{'CurrentUser'}
          ->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
     {
-        my $admin = Menu->child( config => title => loc('Configuration'),
+        my $admin = $tools->child( config => title => loc('Configuration'),
                                  path   => '/Admin/' );
         my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', );
         $users->child( select => title => loc('Select'), path => "/Admin/Users/" );

commit 636b143487b1d2b80228c532bde08089807a7442
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 10:03:09 2010 -0400

    move config to be under tools

diff --git a/t/ticket/scrips_batch.t b/t/ticket/scrips_batch.t
index d4004fb..1cfc732 100644
--- a/t/ticket/scrips_batch.t
+++ b/t/ticket/scrips_batch.t
@@ -16,7 +16,7 @@ ok $m->login, 'logged in as root';
 
 my $sid;
 {
-    $m->follow_link_ok( { id => 'config-queues' } );
+    $m->follow_link_ok( { id => 'tools-config-queues' } );
     $m->follow_link_ok( { text => $queue->Name } );
     $m->follow_link_ok( { id => 'page-scrips-create'});
     $m->form_name('ModifyScrip');
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 2a183a8..cf7279f 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -13,7 +13,7 @@ ok $m->login, 'logged in';
 
 diag "Create a CF";
 {
-    $m->follow_link( id => 'config-custom-fields-create');
+    $m->follow_link( id => 'tools-config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -29,7 +29,7 @@ diag "apply the CF to General queue";
 my ( $cf, $cfid, $tid );
 {
     $m->title_is(q/Created CustomField img/, 'admin-cf created');
-    $m->follow_link( id => 'config-queues');
+    $m->follow_link( id => 'tools-config-queues');
     $m->follow_link( text => 'General' );
     $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
     $m->follow_link( id => 'page-ticket-custom-fields');
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index 7a28806..be421a7 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -15,7 +15,7 @@ my $cf_name = 'test cf date';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( id => 'config-custom-fields-create');
+    $m->follow_link( id => 'tools-config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields    => {
@@ -34,7 +34,7 @@ my $queue = RT::Test->load_or_create_queue( Name => 'General' );
 ok $queue && $queue->id, 'loaded or created queue';
 
 {
-    $m->follow_link( id => 'config-queues-select');
+    $m->follow_link( id => 'tools-config-queues-select');
     $m->title_is( q/Admin queues/, 'admin-queues screen' );
     $m->follow_link( text => 'General' );
     $m->title_is( q/Configuration for queue General/,
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index 5b67579..95f5c17 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -16,7 +16,7 @@ my $cf_name = 'test cf datetime';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( id => 'config-custom-fields-create');
+    $m->follow_link( id => 'tools-config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
diff --git a/t/web/cf_onqueue.t b/t/web/cf_onqueue.t
index 511606d..2c020b7 100644
--- a/t/web/cf_onqueue.t
+++ b/t/web/cf_onqueue.t
@@ -8,7 +8,7 @@ ok $m->login, 'logged in';
 
 diag "Create a queue CF";
 {
-    $m->follow_link( id => 'config-custom-fields-create');
+    $m->follow_link( id => 'tools-config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index 207ffe8..86f05cd 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -13,7 +13,7 @@ my $cf_name = 'test select one value';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( id => 'config-custom-fields-create');
+    $m->follow_link( id => 'tools-config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -50,7 +50,7 @@ ok $queue && $queue->id, 'loaded or created queue';
 
 diag "apply the CF to General queue";
 {
-    $m->follow_link( id => 'config-queues');
+    $m->follow_link( id => 'tools-config-queues');
     $m->follow_link( text => 'General' );
     $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
     $m->follow_link( id => 'page-ticket-custom-fields');
diff --git a/t/web/html_template.t b/t/web/html_template.t
index fccd368..e836de0 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -17,7 +17,7 @@ diag('make Autoreply template a html one and add utf8 chars')
   if $ENV{TEST_VERBOSE};
 
 {
-    $m->follow_link_ok( { id => 'config-global-templates' },     '-> Templates' );
+    $m->follow_link_ok( { id => 'tools-config-global-templates' },     '-> Templates' );
     $m->follow_link_ok( { text => 'Autoreply' },     '-> Autoreply' );
     $m->submit_form(
         form_name => 'ModifyTemplate',
diff --git a/t/web/rights.t b/t/web/rights.t
index 5c7fc2b..63a0878 100644
--- a/t/web/rights.t
+++ b/t/web/rights.t
@@ -7,7 +7,7 @@ use RT::Test tests => 12;
 my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login, "logged in";
 
-$m->follow_link_ok({ id => 'config-global-group-rights'});
+$m->follow_link_ok({ id => 'tools-config-global-group-rights'});
 
 
 sub get_rights {
diff --git a/t/web/walk.t b/t/web/walk.t
index af41398..90fd030 100644
--- a/t/web/walk.t
+++ b/t/web/walk.t
@@ -139,13 +139,13 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
 
         for my $id ( 'group-rights', 'user-rights', 'rt-at-a-glance', 'theme' )
         {
-            $m->follow_link_ok( { id => 'config-global-' . $id }, "-> $id" );
+            $m->follow_link_ok( { id => 'tools-config-global-' . $id }, "-> $id" );
         }
 
         for my $tab ( 'scrips', 'templates' ) {
-            $m->follow_link_ok( { id => "config-global-" . $tab }, "-> $tab" );
+            $m->follow_link_ok( { id => "tools-config-global-" . $tab }, "-> $tab" );
             for my $id (qw/create select/) {
-                $m->follow_link_ok( { id => "config-global-" . $tab . "-$id" },
+                $m->follow_link_ok( { id => "tools-config-global-" . $tab . "-$id" },
                     "-> $id" );
             }
             $m->follow_link_ok( { text => '1' }, '-> 1' );

commit 3006c53ea3380c5ce3034910caead5a5ae6ffc8e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 10:24:50 2010 -0400

    cleanup of the top-of-page widgets

diff --git a/share/html/Elements/Widgets b/share/html/Elements/Widgets
index f87a68a..778a846 100644
--- a/share/html/Elements/Widgets
+++ b/share/html/Elements/Widgets
@@ -1,4 +1,4 @@
-<div class="widgets">
+<div id="topactions">
 <& /Elements/SimpleSearch &>
 <& /Elements/CreateTicket &>
 </div>
diff --git a/share/html/NoAuth/css/web2/layout.css b/share/html/NoAuth/css/web2/layout.css
index 511418e..af99a8b 100644
--- a/share/html/NoAuth/css/web2/layout.css
+++ b/share/html/NoAuth/css/web2/layout.css
@@ -84,8 +84,8 @@ div#body {
 #topactions {
  position: absolute;
  background: transparent;
- top: 3.8em; 
- right: 1em;
+ top: 3.2em;
+ right: 0.7em;
  width: auto;
  min-width: 42em;
  font-size: 0.9em;
@@ -169,7 +169,7 @@ div#footer #bpscredits {
 
 /* logo stuff */
 
-div#logo a {
+div#logo {
     position: absolute;
     left: 2px;
     top: 0;
@@ -183,12 +183,11 @@ div#logo a img {
 }
 
 div#logo .rtname {
-    position: absolute;
+    position: relative;
     font-weight: bold;
-    top: 0.5em;
-    left: 30%;
-    right: 30%;
     text-align: center;
+    top: -0.8em;
+    left: 0.5em;
 }
 
 
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index 652a38e..ed1103a 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -55,7 +55,7 @@
 
 #page-navigation {
     position: absolute;
-    top: 5.5em;
+    top: 5.4em;
     right: 0em;
     left: auto;
     z-index: 9995;
@@ -75,3 +75,11 @@
 .sf-menu li, .sf-menu li li, .sf-menu li li li {
     background-color: #eee;
 }
+
+#page-navigation .sf-menu li, #page-navigation .sf-menu li li, #page-navigation .sf-menu li li li {
+    background-color: #fff;
+}
+
+#page-navigation .sf-menu a:visited, #page-navigation .sf-menu a {
+    border: none;
+}

commit ca8e797d63a8bff75e6a44ee084d23d8fed46f8a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 11:17:56 2010 -0400

    Move Dashboards under the "homepage" menu.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 5693902..40c19dc 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -69,7 +69,43 @@ my $query_string = sub {
 };
 
 if ( $request_path =~ qr{.*} ) {
-    Menu->child( home => title => loc('HomePage'), path => '/' );
+    my $home = Menu->child( home => title => loc('HomePage'), path => '/' );
+
+    my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
+    my $limit      = 7;
+
+    $m->callback( Dashboards   => \@dashboards,
+                  Limit        => \$limit,
+                  CallbackName => 'MassageDashboards',
+                );
+
+    my $more = 0;
+    if ( @dashboards > $limit ) {
+        $more = 1;
+        splice @dashboards, $limit;
+    }
+
+    my $position = 0;
+
+    if (@dashboards) {
+    my $dashes = Menu()->child('home');
+    for my $dash (@dashboards) {
+        $home->child('dashboard-' . $dash->id,
+                        title => $dash->Name,
+                        path => '/Dashboards/' . $dash->id . '/' . $dash->Name,
+                       );
+    }
+
+
+    if ($more) {
+        $dashes->child( title => loc('More...'),
+                              path  => 'Dashboards/index.html',
+                            );
+    }
+    }
+
+
+
     my $tickets = Menu->child( search => title => loc('Tickets'),
                                path => '/Search/Build.html' );
     $tickets->child( simple => title => loc('Simple Search') => path =>
@@ -97,6 +133,12 @@ if ( $request_path =~ qr{.*} ) {
         $dashes->child(
                 loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
     }
+
+
+
+
+
+
     my $reports = $tools->child( loc('Reports'),
                                  path => '/Tools/Reports/index.html' );
     $reports->child( loc('Resolved by owner'),
@@ -685,37 +727,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
 
 if ( $request_path =~ /^\/(?:index.html|$)/ ) {
 
-    my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
-    my $limit      = 7;
-
-    $m->callback( Dashboards   => \@dashboards,
-                  Limit        => \$limit,
-                  CallbackName => 'MassageDashboards',
-                );
-
-    my $more = 0;
-    if ( @dashboards > $limit ) {
-        $more = 1;
-        splice @dashboards, $limit;
-    }
-
-    my $position = 0;
-
-    for my $dash (@dashboards) {
-        PageMenu->child('dashboard-' . $dash->id,
-                        title => $dash->Name,
-                        path => 'Dashboards/' . $dash->id . '/' . $dash->Name,
-                       );
-    }
-
-    PageMenu()->child( home => title => loc('Home'), path => 'index.html' );
-
-    if ($more) {
-        $tabs->{"D-more"} = { title => loc('More'),
-                              path  => 'Dashboards/index.html',
-                            };
-    }
-
+    PageMenu()->child(edit => title => loc('Edit'), path => '/Prefs/MyRT.html');
 }
 
 

commit 2dd63b7d2764712dc3392c05772b5175e00c347e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 12:35:51 2010 -0400

    Start abstracting away some cachebusting for dashboard attributes

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 8ff462e..77d0b65 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -224,7 +224,9 @@ Deletes all attributes with the matching name for this object.
 sub DeleteAttribute {
     my $self = shift;
     my $name = shift;
-    return $self->Attributes->DeleteEntry( Name => $name );
+    my ($val,$msg) =  $self->Attributes->DeleteEntry( Name => $name );
+    $self->ClearAttributes;
+    return ($val,$msg);
 }
 
 =head2 FirstAttribute NAME
@@ -245,6 +247,12 @@ sub FirstAttribute {
 }
 
 
+sub ClearAttributes {
+    my $self = shift;
+    delete $self->{'attributes'};
+
+}
+
 sub _Handle { return $RT::Handle }
 
 
@@ -352,7 +360,7 @@ sub LoadByCols {
     my $self = shift;
 
     # We don't want to hang onto this
-    delete $self->{'attributes'};
+    $self->ClearAttributes;
 
     return $self->SUPER::LoadByCols( @_ ) unless $self->_Handle->CaseSensitive;
 
diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
index 32a515d..89c2a98 100644
--- a/lib/RT/SharedSetting.pm
+++ b/lib/RT/SharedSetting.pm
@@ -258,11 +258,11 @@ where status is true upon success.
 
 sub Delete {
     my $self = shift;
-
     return (0, $self->loc("Permission denied"))
         unless $self->CurrentUserCanDelete;
 
     my ($status, $msg) = $self->{'Attribute'}->Delete;
+    $self->CurrentUser->ClearAttributes; # force the current user's attribute cache to be cleaned up
     if ($status) {
         return (1, $self->loc("Deleted [_1]", $self->ObjectName));
     } else {

commit 34ca111aaa8bbf457c3c918e2c8c2e7152603026
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 12:36:43 2010 -0400

    a bit more menu reorganization

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 40c19dc..054032d 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -70,15 +70,9 @@ my $query_string = sub {
 
 if ( $request_path =~ qr{.*} ) {
     my $home = Menu->child( home => title => loc('HomePage'), path => '/' );
-
     my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
     my $limit      = 7;
 
-    $m->callback( Dashboards   => \@dashboards,
-                  Limit        => \$limit,
-                  CallbackName => 'MassageDashboards',
-                );
-
     my $more = 0;
     if ( @dashboards > $limit ) {
         $more = 1;
@@ -279,25 +273,26 @@ if ( $request_path =~ qr{.*} ) {
                                                Object => $RT::System )
        )
     {
-        $about_me->child( settings => title => loc('Settings'),
+        my $settings = $about_me->child( settings => title => loc('Settings'),
                           path     => '/Prefs/Other.html', );
-        $about_me->child( about_me => title => loc('About me'),
+        $settings->child( about_me => title => loc('About me'),
                           path     => '/User/Prefs.html', );
-        $about_me->child( search_options => title => loc('Search options'),
+        $settings->child( search_options => title => loc('Search options'),
                           path => '/Prefs/SearchOptions.html', );
-        $about_me->child( myrt => title => loc('RT at a glance'),
+        $settings->child( myrt => title => loc('RT at a glance'),
                           path => '/Prefs/MyRT.html', );
-        $about_me->child( quicksearch => title => 'Quick search' => title =>
+        $settings->child( quicksearch => title => 'Quick search' => title =>
                               loc('Quick search'),
                           path => '/Prefs/Quicksearch.html'
                         );
 
+        my $search_menu = $settings->child( 'saved-searches' => title => 'Saved Searches');
         my $searches = [ $m->comp(
                           "/Search/Elements/SearchesForObject",
                           Object => RT::System->new( $session{'CurrentUser'} )) ];
         my $i = 0;
         for my $search (@$searches) {
-            $about_me->child( "search-" . $i++,
+            $search_menu->child( "search-" . $i++,
                       title => $search->[0],
                       path  => "/Prefs/Search.html?" . $query_string->(
                           name => ref( $search->[1] ) . '-' . $search->[1]->Id),

commit d9fb0f295bf320b641ffed35fcd5a5bf471c74cc
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 12:37:06 2010 -0400

    a bit more work on dashboard menuing and tests for the same

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index ada08be..5c1d646 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -86,6 +86,9 @@ my $tried_create = 0;
 # user went directly to Modify.html
 $Create = 1 if !$id;
 
+
+my $redirect_to ='/Dashboards/Modify.html';
+
 use RT::Dashboard;
 
 my $Dashboard = RT::Dashboard->new($session{'CurrentUser'});
@@ -112,6 +115,10 @@ else {
 
         push @results, $msg;
         $id = $Dashboard->Id;
+        if (!$Doashboard->CurrentUserCanSee) {
+            $redirect_to='/Dashboards/index.html';
+
+        }
     }
     else {
         my ($ok, $msg) = $Dashboard->LoadById($id);
@@ -142,26 +149,27 @@ if (!$Create && !$tried_create && $id && $ARGS{'Save'}) {
 }
 
 
+my $can_delete = $Dashboard->CurrentUserCanDelete;
+
+if (!$Create && !$tried_create && $id && $ARGS{'Delete'}) {
+    my ($ok, $msg) = $Dashboard->Delete();
+    if (!$ok) {
+             Abort(loc("Couldn't delete dashboard [_1]: [_2]", $id, $msg));
+             }
+
+    push @results, $msg;
+    $redirect_to = '/Dashboards/index.html';
+}
+
 # This code does automatic redirection if any updates happen.
 $m->comp(
     '/Elements/MaybeRedirectForResults',
     Actions     => \@results,
-    Path        => 'Dashboards/Modify.html',
+    Path        => $redirect_to,
     id              => $id,
     ARGSRef     => \%ARGS
 );
 
-
-my $can_delete = $Dashboard->CurrentUserCanDelete;
-
-if (!$Create && !$tried_create && $id && $ARGS{'Delete'}) {
-    my ($ok, $msg) = $Dashboard->Delete();
-    $ok || Abort(loc("Couldn't delete dashboard [_1]: [_2]", $id, $msg));
-
-    # put the user back into a useful place with a message
-    RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Dashboards/index.html?Deleted=$id");
-
-}
 </%INIT>
 
 <%ARGS>
diff --git a/share/html/Dashboards/index.html b/share/html/Dashboards/index.html
index 2bda8be..505cc95 100644
--- a/share/html/Dashboards/index.html
+++ b/share/html/Dashboards/index.html
@@ -79,9 +79,6 @@ use RT::Dashboard;
 my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects");
 
 my @actions;
-if (defined $Deleted) {
-    push @actions, loc("Deleted dashboard [_1]", $Deleted);
-}
 
 my @personal_dashboards = sort { $a->Id <=> $b->Id } @{ $dashboards->{personal} || [] };
 my @system_dashboards = sort { $a->Id <=> $b->Id } @{ $dashboards->{system} || [] };
@@ -101,7 +98,4 @@ $m->callback(
     CallbackName       => 'MassageDashboards',
 );
 </%INIT>
-<%ARGS>
-$Deleted => undef
-</%ARGS>
 
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index b5d07d9..351c722 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 110;
+use RT::Test tests => 111;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -70,12 +70,16 @@ $m->content_lacks('Delete', "Delete button hidden because we are creating");
 $m->click_button(value => 'Create');
 
 $m->content_contains("Permission denied", "we lack SeeOwnDashboard");
+$m->warning_like(qr/Permission denied/, "got a permission denied warning when trying to see the dashboard");
+TODO: {
+    local $TODO = "Dashboard create-without-see permissions are crazy and this will be a real bear to fix";
+    $m->content_contains("Saved dashboard different dashboard");
+}
 $user_obj->PrincipalObj->GrantRight(Right => 'SeeOwnDashboard', Object => $RT::System);
-$m->reload;
+$m->get($url."Dashboards/index.html");
+$m->follow_link_ok({ text => 'different dashboard'});
 $m->content_lacks("Permission denied", "we now have SeeOwnDashboard");
-$m->content_contains("Saved dashboard different dashboard");
 $m->content_lacks('Delete', "Delete button hidden because we lack DeleteOwnDashboard");
-$m->warning_like(qr/Permission denied/, "got a permission denied warning when trying to see the dashboard");
 
 $m->get_ok($url."Dashboards/index.html");
 $m->content_contains("different dashboard", "we now have SeeOwnDashboard");
diff --git a/t/web/walk.t b/t/web/walk.t
index 90fd030..a062bcc 100644
--- a/t/web/walk.t
+++ b/t/web/walk.t
@@ -166,8 +166,8 @@ diag 'walk into /Approvals' if $ENV{TEST_VERBOSE};
 diag 'walk into /Prefs' if $ENV{TEST_VERBOSE};
 {
     for my $id (
-        'settings',    'about_me', 'search_options', 'myrt',
-        'quicksearch', 'search-0', 'search-1',       'search-2',
+        'settings',    'settings-about_me', 'settings-search_options', 'settings-myrt',
+        'settings-quicksearch', 'settings-saved-searches-search-0', 'settings-saved-searches-search-1',       'settings-saved-searches-search-2',
         'logout'
       )
     {

commit 3466cfbfbf324d6b593a8b6b0e4cc9db69e673d2
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 12:52:27 2010 -0400

    After custom field update, redirect back to the same page, so it's a GET
    rather than a POST

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 51f162b..2a2c8d5 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -269,8 +269,23 @@ CustomFieldObj => $CustomFieldObj, CustomFieldValueObj => $cfv, ARGSRef => \%ARG
     }
 }
 
+
+
+
 $id = $CustomFieldObj->id if $CustomFieldObj->id;
 
+
+# This code does automatic redirection if any updates happen.
+$m->comp(
+    '/Elements/MaybeRedirectForResults',
+    Actions     => \@results,
+    Path        => '/Admin/CustomFields/Modify.html',
+    id              => $id,
+    ARGSRef     => \%ARGS
+);
+
+
+
 my $EnabledChecked = qq[checked="checked"];
 $EnabledChecked = '' if $CustomFieldObj->Disabled;
 

commit 5ceb330c94c1e6ee339d298272ac16424244e6ce
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 13:09:21 2010 -0400

    typo fix

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 5c1d646..b55a7c5 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -115,7 +115,7 @@ else {
 
         push @results, $msg;
         $id = $Dashboard->Id;
-        if (!$Doashboard->CurrentUserCanSee) {
+        if (!$Dashboard->id || ! $Dashboard->CurrentUserCanSee) {
             $redirect_to='/Dashboards/index.html';
 
         }

commit f2b0a52aad6f8ec843182692ef2669db626f7940
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 13:09:27 2010 -0400

    warning avoidance

diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
index 89c2a98..6a527a2 100644
--- a/lib/RT/SharedSetting.pm
+++ b/lib/RT/SharedSetting.pm
@@ -333,7 +333,7 @@ This does not deal with ACLs, this only looks at membership.
 sub IsVisibleTo {
     my $self    = shift;
     my $to      = shift;
-    my $privacy = $self->Privacy;
+    my $privacy = $self->Privacy || '';
 
     # if the privacies are the same, then they can be seen. this handles
     # a personal setting being visible to that user.

commit 74a27b69dc98e82fbcb975e163e57033f4aa54ed
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 13:09:38 2010 -0400

    update tests to keep pace with new redirect behavior

diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index cf7279f..3a741f6 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -28,7 +28,7 @@ diag "Create a CF";
 diag "apply the CF to General queue";
 my ( $cf, $cfid, $tid );
 {
-    $m->title_is(q/Created CustomField img/, 'admin-cf created');
+    $m->title_is(q/Editing CustomField img/, 'admin-cf created');
     $m->follow_link( id => 'tools-config-queues');
     $m->follow_link( text => 'General' );
     $m->title_is(q/Configuration for queue General/, 'admin-queue: general');

commit 3a49caf38ffe16312d36b52c6d70e58915998cea
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 13:27:44 2010 -0400

    Updated dashboard tests to better match the new world order

diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index 668fa84..776e9b5 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test nodata => 1, tests => 35;
+use RT::Test nodata => 1, tests => 33;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -70,7 +70,7 @@ $m->content_lacks('Delete', "Delete button hidden because we are creating");
 
 $m->click_button(value => 'Create');
 
-$m->content_contains("Permission denied", "we lack SeeGroupDashboard");
+$m->content_contains("created", "we lack SeeGroupDashboard, so we end up back at the index.");
 $user_obj->PrincipalObj->GrantRight(
     Right  => 'SeeGroupDashboard',
     Object => $inner_group,
@@ -89,7 +89,6 @@ is($dashboard->Name, "inner dashboard");
 is($dashboard->Privacy, 'RT::Group-' . $inner_group->Id, "correct privacy");
 is($dashboard->PossibleHiddenSearches, 0, "all searches are visible");
 
-$m->warning_like(qr/Permission denied/, "got a permission denied warning when trying to see the dashboard");
 
 $m->get_ok("/Dashboards/Modify.html?id=$id");
 $m->content_contains("inner dashboard", "we now have SeeGroupDashboard right");
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index 351c722..81765a2 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 111;
+use RT::Test tests => 108;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -68,13 +68,7 @@ $m->form_name('ModifyDashboard');
 $m->field("Name" => 'different dashboard');
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 $m->click_button(value => 'Create');
-
-$m->content_contains("Permission denied", "we lack SeeOwnDashboard");
-$m->warning_like(qr/Permission denied/, "got a permission denied warning when trying to see the dashboard");
-TODO: {
-    local $TODO = "Dashboard create-without-see permissions are crazy and this will be a real bear to fix";
-    $m->content_contains("Saved dashboard different dashboard");
-}
+$m->content_contains("Saved dashboard different dashboard");
 $user_obj->PrincipalObj->GrantRight(Right => 'SeeOwnDashboard', Object => $RT::System);
 $m->get($url."Dashboards/index.html");
 $m->follow_link_ok({ text => 'different dashboard'});
@@ -204,7 +198,7 @@ $m->content_contains('Delete', "Delete button shows because we have DeleteOwnDas
 
 $m->form_name('ModifyDashboard');
 $m->click_button(name => 'Delete');
-$m->content_contains("Deleted dashboard $id");
+$m->content_contains("Deleted dashboard");
 
 $m->get("/Dashboards/Modify.html?id=$id");
 $m->content_lacks("different dashboard", "dashboard was deleted");

commit a5fa902d63c7ef3c8b6e2375b45899897c3b1595
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 13:50:50 2010 -0400

    Modifying a group now redirects after submit

diff --git a/share/html/Admin/Groups/Modify.html b/share/html/Admin/Groups/Modify.html
index 0ec934e..b81c9f8 100755
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -160,6 +160,19 @@ if  ( ($SetEnabled) and ( $Disabled != $Group->Disabled) ) {
     push @results, $msg;
 }
 
+# This code does automatic redirection if any updates happen.
+$m->comp(
+    '/Elements/MaybeRedirectForResults',
+    Actions     => \@results,
+    Path        => '/Admin/Groups/Modify.html',
+    id              => $id,
+    ARGSRef     => \%ARGS
+);
+
+
+
+
+
 unless ($Group->Disabled()) {
     $EnabledChecked ='checked="checked"';
 }

commit 0df24f44731b0c81075fa78693ae7d952eb1a35d
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 15:34:58 2010 -0400

    fully ported the current state of ticket/elements/tabs

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 054032d..e8ab4f0 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -530,42 +530,78 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
 
         my $tabs = PageMenu()
             ; #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
-        $tabs->child ( bookmark => title => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ), escape_title => 0, link_item => 0);
+        $tabs->child( bookmark => title =>
+                          $m->scomp( '/Ticket/Elements/Bookmark', id => $id ),
+                      escape_title => 0,
+                      link_item    => 0
+                    );
 
         $tabs->child(
                  loc('Display') => path => "/Ticket/Display.html?id=" . $id );
 
         $tabs->child(
                  loc('History') => path => "/Ticket/History.html?id=" . $id );
-        $tabs->child(
-                   loc('Basics') => path => "/Ticket/Modify.html?id=" . $id );
 
-        $tabs->child(
-               loc('Dates') => path => "/Ticket/ModifyDates.html?id=" . $id );
-        $tabs->child( loc('People'),
-                      path => "/Ticket/ModifyPeople.html?id=" . $id );
-        $tabs->child( loc('Links'),
-                      path => "/Ticket/ModifyLinks.html?id=" . $id );
-        $tabs->child( loc('Jumbo'),
-                      path => "/Ticket/ModifyAll.html?id=" . $id );
-
-        my %can
-            = ( ModifyTicket => $obj->CurrentUserHasRight('ModifyTicket') );
-
-        if (    $can{'ModifyTicket'}
-             or $obj->CurrentUserHasRight('ReplyToTicket') )
+        my %can = (
+              ModifyTicket    => $obj->CurrentUserHasRight('ModifyTicket'),
+              OwnTicket       => $obj->CurrentUserHasRight('OwnTicket'),
+              StealTicket     => $obj->CurrentUserHasRight('StealTicket'),
+              TakeTicket      => $obj->CurrentUserHasRight('TakeTicket'),
+              ReplyToTicket   => $obj->CurrentUserHasRight('ReplyToTicket'),
+              CommentOnTicket => $obj->CurrentUserHasRight('CommentOnTicket'),
+              ModifyCustomField => $obj->CurrentUserHasRight('ModifyCustomField'),
+              _ModifyOwner => (       $obj->CurrentUserHasRight('OwnTicket')
+                                   || $obj->CurrentUserHasRight('TakeTicket')
+                                   || $obj->CurrentUserHasRight('StealTicket')
+                              )
+                  );
+
+        if ( $can{ModifyTicket} || $can{ModifyCustomField} ) {
+            $tabs->child( basics => title => loc('Basics'),
+                          path => "/Ticket/Modify.html?id=" . $id, );
+        }
+
+        if ( $can{ModifyTicket} || $can{_ModifyOwner} ) {
+            $tabs->child( people => title => loc('People'),
+                          path => "/Ticket/ModifyPeople.html?id=" . $id, );
+        }
+
+        if ( $can{ModifyTicket} ) {
+            $tabs->child( dates => title => loc('Dates'), path => "/Ticket/ModifyDates.html?id=" . $id, );
+            $tabs->child( links => title => loc('Links'), path => "/Ticket/ModifyLinks.html?id=" . $id, );
+        }
+
+        if (    $can{ModifyTicket}
+             || $can{ModifyCustomField}
+             || $can{_ModifyOwner} )
         {
-            $actions->child( loc('Reply'),
-                     path => "/Ticket/Update.html?Action=Respond&id=" . $id );
+            $tabs->child( jumbo => title => loc('Jumbo'), path => "/Ticket/ModifyAll.html?id=" . $id, );
+        }
+
+        if ( RT->Config->Get('EnableReminders') ) {
+            $tabs->child( reminders => title => loc('Reminders'), path => "/Ticket/Reminders.html?id=" . $id, );
+        }
+
+        if ( $can{'ModifyTicket'} or $can{'ReplyToTicket'} ) {
+            $actions->child(
+                        reply => title => loc('Reply'), path => "/Ticket/Update.html?Action=Respond;id=" . $id,
+            );
+        }
+
+        if ( $obj->CurrentUserHasRight('ForwardMessage') ) {
+            $actions->child( forward => title => loc('Forward'), path => "/Ticket/Forward.html?id=" . $id, );
         }
 
         if ( $can{'ModifyTicket'} ) {
             my $current = $obj->Status;
-            my $schema  = $obj->QueueObj->lifecycle;
+            my $lifecycle  = $obj->QueueObj->lifecycle;
             my $i       = 1;
-            foreach my $next ( $schema->transitions($current) ) {
-                my $action = $schema->transition_action( $current => $next );
+            foreach my $next ( $lifecycle->transitions($current) ) {
+                my $action = $lifecycle->transition_action( $current => $next );
                 next if $action eq 'hide';
+            my $check = $lifecycle->check_right( $current => $next );
+            $can{$check} = $obj->CurrentUserHasRight($check) unless exists $can{$check};
+            next unless $can{$check};
 
                 my $url = '/Ticket/';
                 if ($action) {
@@ -581,32 +617,40 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                         . $query_string->( Status => $next, id => $id );
                 }
                 $actions->child(
-                      loc( $schema->transition_label( $current => $next ) ) =>
+                      loc( $lifecycle->transition_label( $current => $next ) ) =>
                           path => $url );
             }
 
         }
-        if ( $obj->CurrentUserHasRight('OwnTicket') ) {
-            if ( $obj->OwnerObj->id == RT->Nobody->id ) {
-                $actions->child( loc('Take') => path =>
-                                "/Ticket/Display.html?Action=Take&id=" . $id )
-                    if (    $can{'ModifyTicket'}
-                         or $obj->CurrentUserHasRight('TakeTicket') );
-            } elsif ( $obj->OwnerObj->id != $session{'CurrentUser'}->id ) {
-                $actions->child( loc('Steal') => path =>
-                               "/Ticket/Display.html?Action=Steal&id=" . $id )
-                    if (    $can{'ModifyTicket'}
-                         or $obj->CurrentUserHasRight('StealTicket') );
+        if ( $can{OwnTicket} ) {
+            if ( $obj->OwnerObj->Id == RT->Nobody->id
+                 && ( $can{'ModifyTicket'} or $can{'TakeTicket'} ) )
+            {
+                $actions->child(
+                         take => path => "/Ticket/Display.html?Action=Take;id="
+                             . $id,
+                         title => loc('Take')
+                    ),
+                    ;
             }
-        }
 
-        if (    $can{'ModifyTicket'}
-             or $obj->CurrentUserHasRight('CommentOnTicket') )
+        } elsif (    $obj->OwnerObj->id != RT->Nobody->id
+                  && $obj->OwnerObj->id != $session{CurrentUser}->id
+                  && ( $can{'ModifyTicket'} or $can{'StealTicket'} ) )
         {
-            $actions->child( loc('Comment') => path =>
-                             "/Ticket/Update.html?action=comment&id=" . $id );
+
+            $actions->child(
+                         steal => title => loc('Steal'),
+                         path => "/Ticket/Display.html?Action=Steal;id=" . $id,
+            );
         }
 
+        if ( $can{'ModifyTicket'} || $can{'CommentOnTicket'} ) {
+            $actions->child(
+                        comment => title => loc('Comment'),
+                        path => "/Ticket/Update.html?Action=Comment;id=" . $id,
+            );
+        }
 
         if ( defined $session{"tickets"} ) {
 
@@ -623,22 +667,26 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
             # Don't display prev links if we're on the first ticket
             if ( $item_map->{$id}->{prev} ) {
                 $search->child(
-                       '<< ' . loc('First') => class => "nav",
+                       'first',
+                       title => '<< ' . loc('First') => class => "nav",
                        path => "/Ticket/Display.html?id=" . $item_map->{first}
                 );
-                $search->child( '< ' . loc('Prev') => class => "nav",
-                                path => "/Ticket/Display.html?id="
-                                    . $item_map->{$id}->{prev}
-                              );
+                $search->child(
+                        prev => title => '< ' . loc('Prev') => class => "nav",
+                        path => "/Ticket/Display.html?id="
+                            . $item_map->{$id}->{prev}
+                );
 
                 # Don't display next links if we're on the last ticket
                 if ( $item_map->{$id}->{next} ) {
-                    $search->child( loc('next') . ' >' => class => "nav",
-                                    path => "/Ticket/Display.html?id="
-                                        . $item_map->{$id}->{next}
-                                  );
                     $search->child(
-                        loc('Last') . ' >>' => class => "nav",
+                        next => title => loc('next') . ' >' => class => "nav",
+                        path => "/Ticket/Display.html?id="
+                            . $item_map->{$id}->{next}
+                    );
+                    $search->child(
+                        last        => title => loc('Last')
+                            . ' >>' => class => "nav",
                         path => "/Ticket/Display.html?id=" . $item_map->{last}
                     );
                 }
@@ -660,6 +708,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
     my %query_args = (
 
         SavedSearchId => ( $search_id eq 'new' ) ? undef : $search_id,
+    SavedChartSearchId => $m->request_args->{'SavedChartSearchId'} || $current_search->{SavedChartSearchId},
         Query  => $m->request_args->{'Query'}  || $current_search->{'Query'},
         Format => $m->request_args->{'Format'} || $current_search->{'Format'},
         OrderBy => $m->request_args->{'OrderBy'}
@@ -699,7 +748,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                                  search          => 1,
                                  plugin          => 'Tickets',
                                  'Tickets:query' => $query_args{'Query'},
-                                 'Tickets:limit' => $query_args{'RowsPerPage'}
+                                 'Tickets:limit' => $query_args{'Rows'}
                 );
 
             $current_search_menu->child(
@@ -715,6 +764,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
         $current_search_menu->child(
                                 bulk => title => loc('Bulk Update') => path =>
                                     "/Search/Bulk.html$args" );
+    $current_search_menu->child( chart => path  => "Search/Chart.html$args", title => loc('Graph'),);
 
     }
 
diff --git a/share/html/Ticket/Elements/Tabs b/share/html/Ticket/Elements/Tabs
index 828396c..979ab78 100755
--- a/share/html/Ticket/Elements/Tabs
+++ b/share/html/Ticket/Elements/Tabs
@@ -1,398 +1 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<%INIT>
-my $tabs       = {};
-my $searchtabs = {};
-my $actions;
-
-if ($Ticket) {
-
-    my $id = $Ticket->id();
-
-    my $current = $Ticket->Status;
-    my $lifecycle  = $Ticket->QueueObj->lifecycle;
-    my %has;
-    my $i = 1;
-
-    if ( defined $session{'tickets'} ) {
-
-        # we have to update session data if we get new ItemMap
-        my $updatesession = 1 unless ( $session{'tickets'}->{'item_map'} );
-
-        my $item_map = $session{'tickets'}->ItemMap;
-
-        if ($updatesession) {
-            $session{'i'}++;
-            $session{'tickets'}->PrepForSerialization();
-        }
-
-        # Don't display prev links if we're on the first ticket
-        if ( $item_map->{ $Ticket->Id }->{prev} ) {
-            if ( $item_map->{first} ) {
-                $searchtabs->{'_a'} = {
-                    class => "nav",
-                    path  => "Ticket/Display.html?id=" . $item_map->{first},
-                    title => '<< ' . loc('First')
-                };
-            }
-            $searchtabs->{"_b"} = {
-                class => "nav",
-                path  => "Ticket/Display.html?id=" . $item_map->{ $Ticket->Id }->{prev},
-                title => '< ' . loc('Prev')
-            };
-        }
-
-        # Don't display next links if we're on the last ticket
-        if ( $item_map->{ $Ticket->Id }->{next} ) {
-            $searchtabs->{'d'} = {
-                class => "nav",
-                path  => "Ticket/Display.html?id=" . $item_map->{ $Ticket->Id }->{next},
-                title => loc('Next') . ' >'
-            };
-            if ( $item_map->{last} ) {
-                $searchtabs->{'e'} = {
-                    class => "nav",
-                    path  => "Ticket/Display.html?id=" . $item_map->{last},
-                    title => loc('Last') . ' >>'
-                };
-            }
-        }
-    }
-
-    $tabs->{"this"} = {
-        class          => "currentnav",
-        path           => "Ticket/Display.html?id=" . $Ticket->id,
-        title          => "#" . $id,
-        current_subtab => $current_subtab
-    };
-
-    my %can = (
-        ModifyTicket      => $Ticket->CurrentUserHasRight('ModifyTicket'),
-        OwnTicket         => $Ticket->CurrentUserHasRight('OwnTicket'),
-        StealTicket         => $Ticket->CurrentUserHasRight('StealTicket'),
-        TakeTicket         => $Ticket->CurrentUserHasRight('TakeTicket'),
-        ReplyToTicket     => $Ticket->CurrentUserHasRight('ReplyToTicket'),
-        CommentOnTicket     => $Ticket->CurrentUserHasRight('CommentOnTicket'),
-        ModifyCustomField => $Ticket->CurrentUserHasRight('ModifyCustomField'),
-        _ModifyOwner      => (
-                   $Ticket->CurrentUserHasRight('OwnTicket')
-                || $Ticket->CurrentUserHasRight('TakeTicket')
-                || $Ticket->CurrentUserHasRight('StealTicket')
-        )
-    );
-
-    my $ticket_page_tabs = {
-        _A => {
-            title => loc('Display'),
-            path  => "Ticket/Display.html?id=" . $id,
-        },
-
-        _Ab => {
-            title => loc('History'),
-            path  => "Ticket/History.html?id=" . $id,
-        },
-    };
-
-    if ( $can{ModifyTicket} || $can{ModifyCustomField} ) {
-        $ticket_page_tabs->{_B} = {
-            title => loc('Basics'),
-            path  => "Ticket/Modify.html?id=" . $id,
-        };
-    }
-
-    if ( $can{ModifyTicket} || $can{_ModifyOwner} ) {
-        $ticket_page_tabs->{_D} = {
-            title => loc('People'),
-            path  => "Ticket/ModifyPeople.html?id=" . $id,
-        };
-    }
-
-    if ( $can{ModifyTicket} ) {
-        $ticket_page_tabs->{_C} = {
-            title => loc('Dates'),
-            path  => "Ticket/ModifyDates.html?id=" . $id,
-        };
-        $ticket_page_tabs->{_E} = {
-            title => loc('Links'),
-            path  => "Ticket/ModifyLinks.html?id=" . $id,
-        };
-    }
-
-    if ( $can{ModifyTicket} || $can{ModifyCustomField} || $can{_ModifyOwner} ) {
-        $ticket_page_tabs->{_X} = {
-            title => loc('Jumbo'),
-            path  => "Ticket/ModifyAll.html?id=" . $id,
-        };
-    }
-
-    if ( RT->Config->Get('EnableReminders') ) {
-        $ticket_page_tabs->{_F} = {
-            title     => loc('Reminders'),
-            path      => "Ticket/Reminders.html?id=" . $id,
-            separator => 1,
-        };
-    }
-
-    foreach my $tab ( sort keys %{$ticket_page_tabs} ) {
-        if ( $ticket_page_tabs->{$tab}->{'path'} eq $current_tab ) {
-            $ticket_page_tabs->{$tab}->{"subtabs"} = $subtabs;
-            $tabs->{'this'}->{"current_subtab"} = $ticket_page_tabs->{$tab}->{"path"};
-        }
-    }
-    $tabs->{'this'}->{"subtabs"} = $ticket_page_tabs;
-    $current_tab = "Ticket/Display.html?id=" . $id;
-
-    if ( $can{'ModifyTicket'} or $can{'ReplyToTicket'} ) {
-        $actions->{'E'} = {
-            title => loc('Reply'),
-            path  => "Ticket/Update.html?Action=Respond;id=" . $id,
-        };
-    }
-
-    if ( $Ticket->CurrentUserHasRight('ForwardMessage') ) {
-        $actions->{'FA'} = {
-            title => loc('Forward'),
-            path  => "Ticket/Forward.html?id=" . $id,
-        };
-    }
-
-    if ( $can{'ModifyTicket'} ) {
-        foreach my $next ( $lifecycle->transitions($current) ) {
-            my $action = $lifecycle->transition_action( $current => $next );
-            next if $action eq 'hide';
-
-            my $check = $lifecycle->check_right( $current => $next );
-            $has{$check} = $Ticket->CurrentUserHasRight($check)
-                unless exists $has{$check};
-            next unless $has{$check};
-
-            my $path = 'Ticket/';
-            if ($action) {
-                $path .= "Update.html?"
-                    . $m->comp(
-                    '/Elements/QueryString',
-                    Action        => $action,
-                    DefaultStatus => $next,
-                    id            => $id
-                    );
-            } else {
-                $path .= "Display.html?"
-                    . $m->comp(
-                    '/Elements/QueryString',
-                    Status => $next,
-                    id     => $id
-                    );
-            }
-            $actions->{ 'G' . $i++ } = {
-                path  => $path,
-                title => loc( $lifecycle->transition_label( $current => $next ) ),
-            };
-        }
-    }
-    if ( $can{OwnTicket} ) {
-        if ($Ticket->OwnerObj->Id == RT->Nobody->id
-            && (   $can{'ModifyTicket'} or $can{'TakeTicket'})
-            )
-        {
-            $actions->{'B'} = {
-                path  => "Ticket/Display.html?Action=Take;id=" . $id,
-                title => loc('Take'),
-                }
-
-        } elsif ( $Ticket->OwnerObj->id != RT->Nobody->id
-                    && $Ticket->OwnerObj->id != $session{CurrentUser}->id
-                    && ( $can{'ModifyTicket'} or $can{'StealTicket'})
-                )
-        {
-
-            $actions->{'C'} = {
-                path  => "Ticket/Display.html?Action=Steal;id=" . $id,
-                title => loc('Steal'),
-            };
-        }
-    }
-
-    if (   $can{'ModifyTicket'} || $can{'CommentOnTicket'}) {
-        $actions->{'F'} = {
-            title => loc('Comment'),
-            path  => "Ticket/Update.html?Action=Comment;id=" . $id,
-        };
-    }
-
-    $actions->{'_ZZ'} = { html => $m->scomp( '/Ticket/Elements/Bookmark', id => $Ticket->id ), };
-
-
-if (( defined $actions->{B} || defined $actions->{C} )
-    && (   defined $actions->{E}
-        || defined $actions->{F}
-        || defined $actions->{G} )
-    )
-{
-
-    if    ( defined $actions->{C} ) { $actions->{C}->{separator} = 1 }
-    elsif ( defined $actions->{B} ) { $actions->{B}->{separator} = 1 }
-}
-
-$actions->{ 'G' . 1 }{pre_separator} = 1;
-
-# Separator between the last status and the next set of actions
-$actions->{ 'G' . ( $i - 1 ) }{separator} = 1;
-}
-
-$actions = $ARGS{actions} if defined $ARGS{actions};
-
-my $args      = '';
-my $has_query = '';
-my %query_args;
-my $search_id
-    = $ARGS{'SavedSearchId'}
-    || $session{'CurrentSearchHash'}->{'SearchId'}
-    || '';
-my $chart_search_id = $ARGS{'SavedChartSearchId'} || '';
-
-$has_query = 1 if ( $ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'} );
-
-%query_args = (
-    SavedSearchId => ( $search_id eq 'new' ) ? undef : $search_id,
-    SavedChartSearchId => $chart_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'},
-    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" . ( ($has_query) ? $args : '' ),
-    title => loc('Edit Search')
-};
-$tabs->{"h"} = {
-    path      => "Search/Edit.html$args",
-    title     => loc('Advanced'),
-    separator => 1
-};
-
-if ($has_query) {
-
-    if ( $current_tab =~ m{Search/Results.html} ) {
-        $current_tab = "Search/Results.html$args";
-
-        if ( $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System ) ) {
-            my $shred_args = $m->comp(
-                '/Elements/QueryString',
-                Search          => 1,
-                Plugin          => 'Tickets',
-                'Tickets:query' => $query_args{'Query'},
-                'Tickets:limit' => $query_args{'Rows'}
-            );
-
-            $tabs->{"shredder"} = {
-                path  => 'Admin/Tools/Shredder/?' . $shred_args,
-                title => loc('Shredder')
-            };
-
-        }
-    }
-    if ( $current_tab =~ m{Search/(Bulk|Build|Edit)\.html} ) {
-        $current_tab = "Search/$1.html$args";
-    }
-
-    $tabs->{"i"} = {
-        path  => "Search/Results.html$args",
-        title => loc('Show Results'),
-    };
-
-    $tabs->{"j"} = {
-        path  => "Search/Bulk.html$args",
-        title => loc('Bulk Update'),
-    };
-
-    $tabs->{"k"} = {
-        path  => "Search/Chart.html$args",
-        title => loc('Graph'),
-    };
-
-}
-
-foreach my $searchtab ( keys %{$searchtabs} ) {
-    ( $searchtab =~ /^_/ )
-        ? $tabs->{ "s" . $searchtab }
-        = $searchtabs->{$searchtab}
-        : $tabs->{ "z_" . $searchtab } = $searchtabs->{$searchtab};
-}
-
-$m->callback( Ticket => $Ticket, actions => $actions, tabs => $tabs, %ARGS, args => \%ARGS );
-$m->comp(
-    "/Elements/Tabs",
-    tabs           => $tabs,
-    actions        => $actions,
-    current_tab    => $current_tab,
-    current_toptab => $ARGS{current_toptab} || 'Search/Build.html',
-    Title          => $Title
-);
-
-return;
-
-</%INIT>
-
-  
-<%ARGS>
-$Ticket => undef
-$subtabs => undef
-$current_tab => ''
-$current_subtab => ''
-$Title => undef
-$RowsPerPage => undef
-</%ARGS>
+<&/Elements/Tabs &>

commit 418732fd989e314fa72e2a9d146d02f98d5cc095
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 16:08:29 2010 -0400

    added an id to ModifyCustomField

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 2a2c8d5..75be4d9 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -53,7 +53,7 @@
 <& /Elements/ListActions, actions => \@results &>
 
 
-<form method="post" action="Modify.html" name="ModifyCustomField">
+<form method="post" action="Modify.html" name="ModifyCustomField" id="ModifyCustomField">
 <input type="hidden" class="hidden" name="id" value="<% $id %>" />
 
 <table>

commit aab0e7ab8112b125d9f840bb584702667afbc348
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 16:08:49 2010 -0400

    test modernization for ticket forwarding

diff --git a/share/html/Ticket/Forward.html b/share/html/Ticket/Forward.html
index 1ad025f..6554026 100644
--- a/share/html/Ticket/Forward.html
+++ b/share/html/Ticket/Forward.html
@@ -54,7 +54,7 @@
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
 <& /Elements/ListActions, actions => \@results &>
 
-<form action="Forward.html" name="ForwardMessage" method="post">
+<form action="Forward.html" id="ForwardMessage" name="ForwardMessage" method="post">
 % $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
 <input type="hidden" class="hidden" name="id" value="<% $id %>" /><br />
 <input type="hidden" class="hidden" name="QuoteTransaction" value="<% $ARGS{'QuoteTransaction'} || '' %>" />
diff --git a/t/web/ticket_forward.t b/t/web/ticket_forward.t
index 045cdf5..af7d82a 100644
--- a/t/web/ticket_forward.t
+++ b/t/web/ticket_forward.t
@@ -10,9 +10,8 @@ ok $m->login, 'logged in as root';
 RT::Test->set_mail_catcher;
 $m->get_ok( $baseurl . '/Ticket/Create.html?Queue=1' );
 
-$m->form_number(3);
 $m->submit_form(
-    form_number => 3,
+    form_name   => 'TicketCreate',
     fields      => {
         Subject => 'test forward',
         Content => 'this is content',
@@ -23,11 +22,10 @@ RT::Test->clean_caught_mails;
 
 diag "Foward Ticket" if $ENV{TEST_VERBOSE};
 {
-    $m->follow_link_ok( { text => 'Forward' },
+    $m->follow_link_ok( { id => 'page-transitions-forward'},
         'follow 1st Forward to forward ticket' );
-
     $m->submit_form(
-        form_number => 3,
+        form_name   => 'ForwardMessage',
         fields      => {
             To  => 'rt-test, rt-to at example.com',
             Cc  => 'rt-cc at example.com',
@@ -50,7 +48,7 @@ diag "Foward Transaction" if $ENV{TEST_VERBOSE};
 {
     $m->follow_link_ok( { text => 'Forward', n => 2 }, 'follow 2nd Forward' );
     $m->submit_form(
-        form_number => 3,
+        form_name   => 'ForwardMessage',
         fields      => {
             To  => 'rt-test, rt-to at example.com',
             Cc  => 'rt-cc at example.com',

commit 14c3f080bc988d79ac0f1df9329e7e9674d1af01
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 16:09:45 2010 -0400

    less strict acl checking on ticket tabs, since it wasn't accurate enough

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e8ab4f0..a6d1d3a 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -544,6 +544,8 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
 
         my %can = (
               ModifyTicket    => $obj->CurrentUserHasRight('ModifyTicket'),
+              Watch    => $obj->CurrentUserHasRight('Watch'),
+              WatchAsAdminCc    => $obj->CurrentUserHasRight('WatchAsAdminCc'),
               OwnTicket       => $obj->CurrentUserHasRight('OwnTicket'),
               StealTicket     => $obj->CurrentUserHasRight('StealTicket'),
               TakeTicket      => $obj->CurrentUserHasRight('TakeTicket'),
@@ -555,13 +557,13 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                                    || $obj->CurrentUserHasRight('StealTicket')
                               )
                   );
-
-        if ( $can{ModifyTicket} || $can{ModifyCustomField} ) {
+        # comment out until we can do it for an individual custom field
+        #if ( $can{ModifyTicket} || $can{ModifyCustomField} ) {
             $tabs->child( basics => title => loc('Basics'),
                           path => "/Ticket/Modify.html?id=" . $id, );
-        }
+        #}
 
-        if ( $can{ModifyTicket} || $can{_ModifyOwner} ) {
+        if ( $can{ModifyTicket} || $can{_ModifyOwner} ||$can{Watch} ||$can{WatchAsAdminCc}) {
             $tabs->child( people => title => loc('People'),
                           path => "/Ticket/ModifyPeople.html?id=" . $id, );
         }
@@ -571,12 +573,9 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
             $tabs->child( links => title => loc('Links'), path => "/Ticket/ModifyLinks.html?id=" . $id, );
         }
 
-        if (    $can{ModifyTicket}
-             || $can{ModifyCustomField}
-             || $can{_ModifyOwner} )
-        {
+        #if (    $can{ModifyTicket} || $can{ModifyCustomField} || $can{_ModifyOwner} ) {
             $tabs->child( jumbo => title => loc('Jumbo'), path => "/Ticket/ModifyAll.html?id=" . $id, );
-        }
+        #}
 
         if ( RT->Config->Get('EnableReminders') ) {
             $tabs->child( reminders => title => loc('Reminders'), path => "/Ticket/Reminders.html?id=" . $id, );
@@ -627,22 +626,23 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                  && ( $can{'ModifyTicket'} or $can{'TakeTicket'} ) )
             {
                 $actions->child(
-                         take => path => "/Ticket/Display.html?Action=Take;id="
-                             . $id,
-                         title => loc('Take')
+                        take => path => "/Ticket/Display.html?Action=Take;id="
+                            . $id,
+                        title => loc('Take')
                     ),
                     ;
             }
 
-        } elsif (    $obj->OwnerObj->id != RT->Nobody->id
-                  && $obj->OwnerObj->id != $session{CurrentUser}->id
-                  && ( $can{'ModifyTicket'} or $can{'StealTicket'} ) )
-        {
+            elsif (    $obj->OwnerObj->id != RT->Nobody->id
+                    && $obj->OwnerObj->id != $session{CurrentUser}->id
+                    && ( $can{'ModifyTicket'} or $can{'StealTicket'} ) )
+            {
 
-            $actions->child(
-                         steal => title => loc('Steal'),
-                         path => "/Ticket/Display.html?Action=Steal;id=" . $id,
-            );
+                $actions->child(
+                        steal => title => loc('Steal'),
+                        path => "/Ticket/Display.html?Action=Steal;id=" . $id,
+                );
+            }
         }
 
         if ( $can{'ModifyTicket'} || $can{'CommentOnTicket'} ) {

commit 2f13422aaf3641919d33b1f69e6e6c1c41f035ed
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 16:10:12 2010 -0400

    Pass arguments passed to Ticket/Elements/Tabs

diff --git a/share/html/Ticket/Elements/Tabs b/share/html/Ticket/Elements/Tabs
index 979ab78..4b15fbf 100755
--- a/share/html/Ticket/Elements/Tabs
+++ b/share/html/Ticket/Elements/Tabs
@@ -1 +1 @@
-<&/Elements/Tabs &>
+<&/Elements/Tabs, %ARGS &>

commit 7be0aeac60a980209241e198f41b0a87ffc54283
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 16:11:51 2010 -0400

    A bunch of whitespace removal in generated html

diff --git a/share/html/Elements/Footer b/share/html/Elements/Footer
index d221a66..d004663 100755
--- a/share/html/Elements/Footer
+++ b/share/html/Elements/Footer
@@ -51,22 +51,13 @@
 % $m->callback( %ARGS );
 <div id="footer">
 % if ($m->{'rt_base_time'}) {
-  <p id="time">
-    <span><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></span>
-  </p>
+  <p id="time"><span><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></span></p>
 %}
-  <p id="bpscredits">
-    <span>
-<&|/l,     '&#187;&#124;&#171;', $RT::VERSION, '2010', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
-</span>
-</p>
+  <p id="bpscredits"><span><&|/l,     '&#187;&#124;&#171;', $RT::VERSION, '2010', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
+</span></p>
 % if (!$Menu) {
-  <p id="legal">
-<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br />
-<&|/l, '<a href="mailto:sales at bestpractical.com">sales at bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br />
-  </p>
+  <p id="legal"><&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br /><&|/l, '<a href="mailto:sales at bestpractical.com">sales at bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br /></p>
 % }
-
 </div>
 % if ($Debug >= 2 ) {
 % require Data::Dumper;
@@ -75,10 +66,8 @@
 <%$d->Dump() %>
 </pre>
 % }
-
   </body>
 </html>
-
 <%ARGS>
 $Debug => 0
 $Menu => 1
diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index 15db6d7..eff8c50 100755
--- a/share/html/Elements/ShowLinks
+++ b/share/html/Elements/ShowLinks
@@ -47,13 +47,12 @@
 %# END BPS TAGGED BLOCK }}}
 <table>
   <tr>
-    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:\
 % if ($can_create) {
         <span class="create">(<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</span>
 % }
     </td>
     <td class="value">
-
 <%PERL>
 my ( @active, @inactive, @not_tickets );
 for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
@@ -71,8 +70,6 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     }
 }
 </%PERL>
-
-
 <ul>
 % for my $Link (@not_tickets, @active, @inactive) {
 <li><& ShowLink, URI => $Link &></li>
@@ -81,7 +78,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:\
 % if ($can_create) {
         <span class="create">(<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</span>
 % }
@@ -95,7 +92,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:\
 % if ($can_create) {
         <span class="create">(<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</span>
 % }
@@ -103,7 +100,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     <td class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></td>
   </tr>
   <tr>
-    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:\
 % if ($can_create) {
         <span class="create">(<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</span>
 % }
@@ -111,7 +108,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     <td class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></td>
   </tr>
   <tr>
-    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:\
 % if ($can_create) {
         <span class="create">(<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</span>
 % }
@@ -125,7 +122,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:\
 % if ($can_create) {
         <span class="create">(<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</span>
 % }
@@ -139,13 +136,9 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
 </ul>
     </td>
   </tr>
-
-
 % # Allow people to add more rows to the table
 % $m->callback( %ARGS );
-
 </table>
-
 <%INIT>
 
 my $id = $Ticket->id;
@@ -179,7 +172,6 @@ for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) {
 }
 
 </%INIT>
-
 <%ARGS>
 $Ticket => undef
 </%ARGS>
diff --git a/share/html/Ticket/Elements/EditBasics b/share/html/Ticket/Elements/EditBasics
index 50a0b7a..31249b6 100755
--- a/share/html/Ticket/Elements/EditBasics
+++ b/share/html/Ticket/Elements/EditBasics
@@ -132,10 +132,10 @@ for my $field (@fields) {
 <table>
 % }
 % for my $field (@fields) {
-  <tr class="<% lc $field->{'name'} %>">
-    <td class="label"><&|/l&><% $field->{'name'} %></&>:</td>
-    <td class="value"><% $field->{'html'} |n %></td>
-  </tr>
+ <tr class="<% lc $field->{'name'} %>">\
+<td class="label"><&|/l&><% $field->{'name'} %></&>:</td>\
+<td class="value"><% $field->{'html'} |n %></td>\
+</tr>
 % }
 % $m->callback( CallbackName => 'EndOfList', TicketObj => $TicketObj, %ARGS, Fields => \@fields );
 % unless ($InTable) {
diff --git a/share/html/Ticket/Elements/Reminders b/share/html/Ticket/Elements/Reminders
index 678f441..be95a0f 100644
--- a/share/html/Ticket/Elements/Reminders
+++ b/share/html/Ticket/Elements/Reminders
@@ -129,9 +129,7 @@ $Ticket
 <table>
 <tr class="input-row">
 <td class="label"><label class="horizontal" for="NewReminder-Subject" ><&|/l&>Subject</&>:</label></td>
-<td class="value">
-<input type="text" size="15" name="NewReminder-Subject" id="NewReminder-Subject" />
-</td>
+<td class="value"><input type="text" size="15" name="NewReminder-Subject" id="NewReminder-Subject" /></td>
 </tr>
 <tr class="input-row">
 <td class="label">
@@ -141,9 +139,7 @@ $Ticket
 </tr>
 <tr class="input-row">
 <td class="label"><label class="horizontal" for="NewReminder-Due" ><&|/l&>Due</&>:</label></td>
-<td class="value">
-<& /Elements/SelectDate, Name => "NewReminder-Due", Default => "" &>
-</td>
+<td class="value"><& /Elements/SelectDate, Name => "NewReminder-Due", Default => "" &></td>
 </tr>
 </table>
 </%method>
@@ -152,11 +148,8 @@ $Ticket
 $Reminder
 $Ticket
 </%args>
-<input
-    type="checkbox" 
-    name="Complete-Reminder-<%$Reminder->id%>" 
-    <% $Reminder->Status eq 'resolved' ? 'checked="checked"' : '' %> 
-/> 
+<input type="checkbox" name="Complete-Reminder-<%$Reminder->id%>" \
+    <% $Reminder->Status eq 'resolved' ? 'checked="checked"' : '' %> />
     <input type="text" size="15" name="Reminder-Subject-<% $Reminder->id %>" value="<%$Reminder->Subject%>" /> &bull; 
     <& /Elements/SelectOwner, Name => 'Reminder-Owner-'.$Reminder->id, Queue => $Ticket->QueueObj, Default => $Reminder->Owner, DefaultValue => 0  &>
     <& /Elements/SelectDate, Name => 'Reminder-Due-'.$Reminder->id, Default => $Reminder->DueObj->Date &>
@@ -167,12 +160,9 @@ $Ticket
 $Reminder
 $Ticket
 </%args>
-<input
-    type="checkbox" 
-    name="Complete-Reminder-<%$Reminder->id%>" 
-    <% $Reminder->Status eq 'resolved' ? 'checked="checked"' : '' %> 
-/> 
-    <%$Reminder->Subject%> &bull; 
-    <%$Reminder->OwnerObj->Name%>
+<input type="checkbox" name="Complete-Reminder-<%$Reminder->id%>" \
+    <% $Reminder->Status eq 'resolved' ? 'checked="checked"' : '' %> />
+    <%$Reminder->Subject%> &bull; \
+    <%$Reminder->OwnerObj->Name%> \
     <%$Reminder->DueObj->Unix>0  ? "&bull; ". $Reminder->DueObj->AgeAsString : '' |n%><br />
 </%method>
diff --git a/share/html/Ticket/Elements/ShowDates b/share/html/Ticket/Elements/ShowDates
index 2c3a8e2..141dec7 100755
--- a/share/html/Ticket/Elements/ShowDates
+++ b/share/html/Ticket/Elements/ShowDates
@@ -47,23 +47,23 @@
 %# END BPS TAGGED BLOCK }}}
 <table>
   <tr class="date created">
-    <td class="label"><&|/l&>Created</&>:</td>
+    <td class="label"><&|/l&>Created</&>:</td>\
     <td class="value"><% $Ticket->CreatedObj->AsString %></td>
   </tr>
   <tr class="date starts">
-    <td class="label"><&|/l&>Starts</&>:</td>
+    <td class="label"><&|/l&>Starts</&>:</td>\
     <td class="value"><% $Ticket->StartsObj->AsString %></td>
   </tr>
   <tr class="date started">
-    <td class="label"><&|/l&>Started</&>:</td>
+    <td class="label"><&|/l&>Started</&>:</td>\
     <td class="value"><% $Ticket->StartedObj->AsString %></td>
   </tr>
   <tr class="date told">
-    <td class="label"><a href="<% RT->Config->Get('WebPath') %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</td>
+    <td class="label"><a href="<% RT->Config->Get('WebPath') %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</td>\
     <td class="value"><% $Ticket->ToldObj->AsString %></td>
   </tr>
   <tr class="date due">
-    <td class="label"><&|/l&>Due</&>:</td>
+    <td class="label"><&|/l&>Due</&>:</td>\
 % my $due = $Ticket->DueObj;
 % if ( $due && $due->Unix > 0 && $due->Diff < 0 ) {
     <td class="value"><% $due->AsString  %></span></td>
@@ -72,11 +72,11 @@
 % }
   </tr>
   <tr class="date resolved">
-    <td class="label"><&|/l&>Closed</&>:</td>
+    <td class="label"><&|/l&>Closed</&>:</td>\
     <td class="value"><% $Ticket->ResolvedObj->AsString  %></td>
   </tr>
   <tr class="date updated">
-    <td class="label"><&|/l&>Updated</&>:</td>
+    <td class="label"><&|/l&>Updated</&>:</td>\
 % my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never");
 % if ($UpdatedLink) {
     <td class="value"><a href="#lasttrans"><% $UpdatedString | h %></a></td>
diff --git a/share/html/Ticket/Elements/ShowHistory b/share/html/Ticket/Elements/ShowHistory
index d0e7fc5..1af57a8 100755
--- a/share/html/Ticket/Elements/ShowHistory
+++ b/share/html/Ticket/Elements/ShowHistory
@@ -79,7 +79,6 @@ if ($ShowDisplayModes or $ShowTitle) {
 <div class="history">
 <& /Widgets/TitleBoxStart, title => $title, titleright_raw => $titleright &>
 % }
-
 <div id="ticket-history">
 <%perl>
 my $trans_content = {};
diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
index 101a3de..6d0871e 100755
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@ -49,41 +49,26 @@
 <tr>
   <td valign="top" class="boxcontainer">
 % $m->callback( %ARGS, CallbackName => 'LeftColumnTop' );
-
     <&| /Widgets/TitleBox, title => loc('The Basics'),
         (($can_modify || $can_modify_cf) ? (title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id) : ()),
         class => 'ticket-info-basics',
-    &>
-        <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
-    </&>
-
+    &><& /Ticket/Elements/ShowBasics, Ticket => $Ticket &></&>
 % if ($Ticket->CustomFields->First) {
     <&| /Widgets/TitleBox, title => loc('Custom Fields'),
         (($can_modify || $can_modify_cf) ? (title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id) : ()),
         class => 'ticket-info-cfs',
-    &>
-        <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
-    </&>
+    &><& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &></&>
 % }
-
     <&| /Widgets/TitleBox, title => loc('People'),
         (($can_modify || $can_modify_owner) ? (title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id) : ()),
         class => 'ticket-info-people',
-    &>
-        <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
-    </&>
-
+    &><& /Ticket/Elements/ShowPeople, Ticket => $Ticket &></&>
     <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
-
     <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
-
 % $m->callback( %ARGS, CallbackName => 'LeftColumn' );
-
   </td>
   <td valign="top" class="boxcontainer">
-
 % $m->callback( %ARGS, CallbackName => 'RightColumnTop' );
-
 % if ( RT->Config->Get('EnableReminders') ) {
     <&|/Widgets/TitleBox, title => loc("Reminders"),
         title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id,
@@ -97,14 +82,10 @@
         </td></tr></table>
     </&>
 % }
-
     <&| /Widgets/TitleBox, title => loc("Dates"),
         ($can_modify ? (title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id) : ()),
         class => 'ticket-info-dates',
-    &>
-        <& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
-    </&>
-
+    &><& /Ticket/Elements/ShowDates, Ticket => $Ticket &></&>
 % my (@extra);
 % push @extra, titleright_raw => '<a href="'. RT->Config->Get('WebPath'). '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'.loc('Graph').'</a>' unless RT->Config->Get('DisableGraphViz');
 % $m->callback( %ARGS, CallbackName => 'LinksExtra', extra => \@extra );
@@ -112,12 +93,8 @@
         ($can_modify ? (title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id) : ()),
         class => 'ticket-info-links',
         @extra,
-    &>
-        <& /Elements/ShowLinks, Ticket => $Ticket &>
-    </&>
-
+    &><& /Elements/ShowLinks, Ticket => $Ticket &></&>
 % $m->callback( %ARGS, CallbackName => 'RightColumn' );
-
   </td>
 </tr>
 </table>
diff --git a/share/html/Ticket/Elements/ShowTransaction b/share/html/Ticket/Elements/ShowTransaction
index 7dd55c0..d20653a 100755
--- a/share/html/Ticket/Elements/ShowTransaction
+++ b/share/html/Ticket/Elements/ShowTransaction
@@ -47,37 +47,33 @@
 %# END BPS TAGGED BLOCK }}}
 <div class="ticket-transaction <% $type_class %> <% $RowNum % 2 ? 'odd' : 'even' %>">
 % $m->callback( titlebar_cmd => \$titlebar_commands, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );
-
 <div class="ticket-transaction">
 % $m->callback( titlebar_cmd => \$titlebar_commands, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyCommand' );
   <div class="metadata">
     <span class="type">
-      <a name="txn-<% $Transaction->Id %>" href="<% $DisplayPath %>#txn-<% $Transaction->Id %>">#</a>
+      <a name="txn-<% $Transaction->Id %>" href="<% $DisplayPath %>#txn-<% $Transaction->Id %>">#</a>\
       <% $LastTransaction ? '<a id="lasttrans" name="lasttrans"></a>' : ''|n %>
     </span>
 % $m->callback( Transaction => $Transaction, %ARGS, CallbackName => 'AfterAnchor' );
     <span class="date"><% $transdate|n %></span>
 % my $desc = $Transaction->BriefDescription;
 % $m->callback( text => \$desc, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );
-    <span class="description">
-      <& /Elements/ShowUser, User => $Transaction->CreatorObj &> - <% $TicketString %> <% $desc %>
+    <span class="description">\
+<& /Elements/ShowUser, User => $Transaction->CreatorObj &> - <% $TicketString %> <% $desc %>\
 % $m->callback( Transaction => $Transaction, %ARGS, CallbackName => 'AfterDescription' );
-    </span>
+</span>
 % $m->callback( TimeTaken => \$TimeTaken, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyTimeTaken' );
-    <span class="time-taken"><% $TimeTaken %></span>
+    <span class="time-taken"><% $TimeTaken %></span>\
     <span class="actions<% $titlebar_commands ? '': ' hidden'%>"><% $titlebar_commands |n %></span>
   </div>
-
     <div class="content">
 % if ( $type_class eq 'message' ) {
       <& /Elements/ShowCustomFields, Object => $Transaction &>
 % }
 % $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);
     </div>
-
 </div>
 </div>
-
 <%ARGS>
 $Ticket => undef
 $Transaction => undef
diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index ab904eb..c49d328 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -63,18 +63,15 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
     if ( $size ) {
 </%PERL>
 <div class="downloadattachment">
-<a href="<% $AttachPath %>/<% $Transaction->Id %>/<% $message->Id %>/<% ($message->Filename ||'')| u%>"><&|/l&>Download</&> <% $message->Filename || loc('(untitled)') %></a>
+<a href="<% $AttachPath %>/<% $Transaction->Id %>/<% $message->Id %>/<% ($message->Filename ||'')| u%>"><&|/l&>Download</&> <% $message->Filename || loc('(untitled)') %></a>\
 % if ( $DownloadableHeaders && !$message->Filename && $message->ContentType =~ /text/  ) {
  / <a href="<% $AttachPath %>/WithHeaders/<% $message->Id %>"><% loc('with headers') %></a>
 % }
-
 % $m->callback(CallbackName => 'AfterDownloadLinks', ARGSRef => \%ARGS, Ticket => $Ticket, Transaction => $Transaction, Attachment => $message);
-
 <br />
 <span class="downloadcontenttype"><% $message->ContentType %> <% $size_to_str->( $size ) %></span>
 </div>
 %   }
-
 %# If there is sub-messages, open a dedicated div
 % if ( scalar ( grep $_->__Value('Parent') == $message->id, @$Attachments ) ) {
 <div class="messageattachments">

commit 11997dfb8252b5b33ebfa955042e730b1e8b62e1
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 18:39:28 2010 -0400

    remove a duplicated sub

diff --git a/t/web/gnupg-tickyboxes.t b/t/web/gnupg-tickyboxes.t
index 12741a0..e6829c0 100644
--- a/t/web/gnupg-tickyboxes.t
+++ b/t/web/gnupg-tickyboxes.t
@@ -81,35 +81,6 @@ diag "check in read-only mode that queue's props influence create/update ticket
 }
 
 
-sub create_a_ticket {
-    my %args = (@_);
-
-    RT::Test->clean_caught_mails;
-
-    $m->goto_create_ticket( $queue );
-    $m->form_name('TicketCreate');
-    $m->field( Subject    => 'test' );
-    $m->field( Requestors => 'rt-test at example.com' );
-    $m->field( Content    => 'Some content' );
-
-    foreach ( qw(Sign Encrypt) ) {
-        if ( $args{ $_ } ) {
-            $m->tick( $_ => 1 );
-        } else {
-            $m->untick( $_ => 1 );
-        }
-    }
-
-    $m->submit;
-    is $m->status, 200, "request successful";
-
-    $m->content_lacks('unable to sign outgoing email messages');
-
-    $m->get_ok('/'); # ensure that the mail has been processed
-
-    my @mail = RT::Test->fetch_caught_mails;
-    check_text_emails( \%args, @mail );
-}
 
 sub set_queue_crypt_options {
     my %args = @_;

commit 800ba4fceda12f38b88e546400d69311cdd134c9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 18:44:33 2010 -0400

    remove a duplicate sub

diff --git a/t/web/gnupg-tickyboxes.t b/t/web/gnupg-tickyboxes.t
index e6829c0..29f2b4e 100644
--- a/t/web/gnupg-tickyboxes.t
+++ b/t/web/gnupg-tickyboxes.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test::GnuPG tests => 29, gnupg_options => { passphrase => 'rt-test' };
+use RT::Test::GnuPG tests => 20, gnupg_options => { passphrase => 'rt-test' };
 
 use RT::Action::SendEmail;
 
@@ -37,7 +37,7 @@ my %mail = (
 diag "check in read-only mode that queue's props influence create/update ticket pages";
 {
     foreach my $variant ( @variants ) {
-        set_queue_crypt_options( %$variant );
+        set_queue_crypt_options( $queue =>  %$variant );
         $m->goto_create_ticket( $queue );
         $m->form_name('TicketCreate');
         if ( $variant->{'Encrypt'} ) {
@@ -53,7 +53,7 @@ diag "check in read-only mode that queue's props influence create/update ticket
     }
 
     # to avoid encryption/signing during create
-    set_queue_crypt_options();
+    set_queue_crypt_options($queue);
 
     my $ticket = RT::Ticket->new( RT->SystemUser );
     my ($id) = $ticket->Create(
@@ -64,7 +64,7 @@ diag "check in read-only mode that queue's props influence create/update ticket
     ok $id, 'ticket created';
 
     foreach my $variant ( @variants ) {
-        set_queue_crypt_options( %$variant );
+        set_queue_crypt_options( $queue => %$variant );
         $m->get( $m->rt_base_url . "/Ticket/Update.html?Action=Respond&id=$id" );
         $m->form_name('TicketUpdate');
         if ( $variant->{'Encrypt'} ) {
@@ -82,17 +82,3 @@ diag "check in read-only mode that queue's props influence create/update ticket
 
 
 
-sub set_queue_crypt_options {
-    my %args = @_;
-    $m->get_ok("/Admin/Queues/Modify.html?id=". $queue->id);
-    $m->form_with_fields('Sign', 'Encrypt');
-    foreach my $opt ('Sign', 'Encrypt') {
-        if ( $args{$opt} ) {
-            $m->tick($opt => 1);
-        } else {
-            $m->untick($opt => 1);
-        }
-    }
-    $m->submit;
-}
-

commit ffe7600985a00dba68924ca3825309a4404fd27c
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 19:24:54 2010 -0400

    more tabs cleanup

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index a6d1d3a..5b4f9bd 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -158,11 +158,12 @@ if ( $request_path =~ qr{.*} ) {
     {
         my $admin = $tools->child( config => title => loc('Configuration'),
                                  path   => '/Admin/' );
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) ) {
         my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', );
         $users->child( select => title => loc('Select'), path => "/Admin/Users/" );
         $users->child( create => title => loc('Create'),
                        path => "/Admin/Users/Modify.html?Create=1" );
-
+        }
         my $groups
             = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
 
@@ -175,6 +176,7 @@ if ( $request_path =~ qr{.*} ) {
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
         $queues->child( loc('Create'),
                         path => "/Admin/Queues/Modify.html?Create=1" );
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) ) {
         my $cfs = $admin->child(
                              'custom-fields' => title => loc('Custom Fields'),
                              path => '/Admin/CustomFields/', );
@@ -182,7 +184,7 @@ if ( $request_path =~ qr{.*} ) {
                      path   => "/Admin/CustomFields/" );
         $cfs->child( create => title => loc('Create'),
                      path => "/Admin/CustomFields/Modify.html?Create=1" );
-
+    }
         my $admin_global =
             $admin->child( global => title => loc('Global'),
                            path   => '/Admin/Global/', );
@@ -315,14 +317,14 @@ if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
         $obj->LoadById($id);
         if ( $obj and $obj->id ) {
             my $tabs = PageMenu;
-            $tabs->child( loc('Basics'),
+            $tabs->child( basics => title => loc('Basics'),
                           path => "/Dashboards/Modify.html?id=" . $obj->id );
-            $tabs->child( loc('Content'),
+            $tabs->child( content => title => loc('Content'),
                           path => "/Dashboards/Queries.html?id=" . $obj->id );
-            $tabs->child( loc('Subscription'),
+            $tabs->child( subscription => title => loc('Subscription'),
                       path => "/Dashboards/Subscription.html?id=" . $obj->id )
                 if $obj->CurrentUserCanSubscribe;
-            $tabs->child( loc('Show'),
+            $tabs->child( show => title =>loc('Show'),
                         path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
 
         }
@@ -346,24 +348,24 @@ if ( $request_path =~ qr'/SelfService' ) {
 
     my $TOP = Menu();
 
-    $TOP->child( loc('Open tickets'),   path => '/SelfService/', );
-    $TOP->child( loc('Closed tickets'), path => '/SelfService/Closed.html', );
+    $TOP->child( open => title => loc('Open tickets'),   path => '/SelfService/', );
+    $TOP->child( closed => title => loc('Closed tickets'), path => '/SelfService/Closed.html', );
     if ( $queue_count > 1 ) {
-        $TOP->child( loc('New ticket'),
+        $TOP->child( new => title => loc('New ticket'),
                      path => '/SelfService/CreateTicketInQueue.html' );
     } else {
-        $TOP->child( loc('New ticket'),
+        $TOP->child( new => title => loc('New ticket'),
                      path => '/SelfService/Create.html?queue=' . $queue_id );
     }
 
     if ( $session{'CurrentUser'}
          ->HasRight( Right => 'ModifySelf', Object => $RT::System ) )
     {
-        $TOP->child( loc('Preferences'), path => '/SelfService/Prefs.html' );
+        $TOP->child( prefs => title => loc('Preferences'), path => '/SelfService/Prefs.html' );
     }
 
     # XXX TODO RENDER GOTO TICKET WIDGET
-    #Menu->child( B =>  html => $m->scomp('GotoTicket'))
+    Menu->child( goto =>  title => $m->scomp('GotoTicket'), escape_title => 0)
 }
 
 if ( $request_path =~ qr'Admin/Queues' ) {
@@ -419,16 +421,7 @@ if ( $request_path =~ qr'Admin/Queues' ) {
                        path => "/Admin/Queues/UserRights.html?id=" . $id );
     }
 }
-
-if ( $request_path =~ qr'/Admin/Users' ) {
-    if ( $session{'CurrentUser'}
-         ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
-    {
-        PageMenu->child( select => title => loc('Select'),
-                         path   => "/Admin/Users/" );
-        PageMenu->child( create => title => loc('Create'),
-                         path => "/Admin/Users/Modify.html?Create=1" );
-    }
+    if ( $request_path =~ qr'/Admin/Users' ) {
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
@@ -436,16 +429,16 @@ if ( $request_path =~ qr'/Admin/Users' ) {
                                  'current' => title => $obj->Name,
                                  path => "/Admin/Users/Modify.html?id=" . $id,
         );
-        $tabs->child( loc('Basics'),
+        $tabs->child( basics => title => loc('Basics'),
                       path => "/Admin/Users/Modify.html?id=" . $id );
-        $tabs->child( loc('Memberships'),
+        $tabs->child( memberships => title => loc('Memberships'),
                       path => "/Admin/Users/Memberships.html?id=" . $id );
-        $tabs->child( loc('History'),
+        $tabs->child( history => title => loc('History'),
                       path => "/Admin/Users/History.html?id=" . $id );
-        $tabs->child( loc('RT at a glance'),
+        $tabs->child( 'my-rt' => title => loc('RT at a glance'),
                       path => "/Admin/Users/MyRT.html?id=" . $id );
         if ( RT->Config->Get('GnuPG')->{'enable'} ) {
-            $tabs->child( loc('GnuPG'),
+            $tabs->child( pgp => title => loc('GnuPG'),
                           path => "/Admin/Users/GnuPG.html?id=" . $id );
         }
     }
@@ -453,28 +446,23 @@ if ( $request_path =~ qr'/Admin/Users' ) {
 }
 
 if ( $request_path =~ qr'Admin/Groups' ) {
-
-    PageMenu->child( loc('Select') => path => "/Admin/Groups/" );
-    PageMenu->child(
-                loc('Create') => path => "/Admin/Groups/Modify.html?Create=1",
-                separator     => 1 );
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::Group->new( $session{'CurrentUser'} );
         $obj->Load($id);
         if ( $obj->id ) {
             my $tabs = PageMenu->child( $obj->Name,
                         path => "/Admin/Groups/Modify.html?id=" . $id );
-            $tabs->child(
+            $tabs->child( basics => title =>
                       loc('Basics') => path => "/Admin/Groups/Modify.html?id="
                           . $obj->id );
-            $tabs->child(
+            $tabs->child( members => title =>
                     loc('Members') => path => "/Admin/Groups/Members.html?id="
                         . $obj->id );
-            $tabs->child( loc('Group Rights') => path =>
+            $tabs->child( 'group-rights' => title =>loc('Group Rights') => path =>
                           "/Admin/Groups/GroupRights.html?id=" . $obj->id );
-            $tabs->child( loc('User Rights') => path =>
+            $tabs->child( 'user-rights' => title => loc('User Rights') => path =>
                           "/Admin/Groups/UserRights.html?id=" . $obj->id );
-            $tabs->child(
+            $tabs->child( history => title =>
                     loc('History') => path => "/Admin/Groups/History.html?id="
                         . $obj->id );
         }
@@ -482,14 +470,7 @@ if ( $request_path =~ qr'Admin/Groups' ) {
 }
 
 if ( $request_path =~ qr'Admin/CustomFields/' ) {
-    if ( $session{'CurrentUser'}
-         ->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) )
-    {
-        PageMenu->child( loc('Select'), path => "/Admin/CustomFields/" );
-        PageMenu->child( loc('Create') => path =>
-                         "/Admin/CustomFields/Modify.html?Create=1", );
 
-    }
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::CustomField->new( $session{'CurrentUser'} );
         $obj->Load($id);
@@ -513,12 +494,6 @@ if ( $request_path =~ qr'Admin/CustomFields/' ) {
 
 }
 
-if ( $request_path =~ qr'Admin/Rules' ) {
-    PageMenu->child( loc('Select'), path => "/Admin/Rules/" );
-    PageMenu->child( loc('Create'),
-                     path => "/Admin/Rules/Modify.html?Create=1" );
-}
-
 if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
     my $search  = Menu()->child('search');
     my $actions = PageMenu()
diff --git a/t/web/walk.t b/t/web/walk.t
index a062bcc..dff52ce 100644
--- a/t/web/walk.t
+++ b/t/web/walk.t
@@ -52,7 +52,7 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->back;
 
         $m->follow_link_ok( { text => 'root' }, '-> root' );
-        for my $id ( 'rt-at-a-glance', 'memberships', 'history', 'basics' ) {
+        for my $id ( 'my-rt', 'memberships', 'history', 'basics' ) {
             $m->follow_link_ok( { id => 'page-current-' . $id }, "-> $id" );
         }
     }

commit 43eca202abb9c5d038b09cd5cc1bf64e643b6607
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 19:46:33 2010 -0400

    Remove all adminui tabs components

diff --git a/share/html/Admin/CustomFields/GroupRights.html b/share/html/Admin/CustomFields/GroupRights.html
index db4ae39..5c9381f 100644
--- a/share/html/Admin/CustomFields/GroupRights.html
+++ b/share/html/Admin/CustomFields/GroupRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
+<& /Elements/Tabs,
     id => $id,
     current_tab => "Admin/CustomFields/GroupRights.html?id=".$id,
     Title => $title
diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 75be4d9..263f7e6 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
+<& /Elements/Tabs,
     id => $CustomFieldObj->Id ,
     current_tab => $current_tab,
     Title => $title &>
diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index 484ef7a..e1c9495 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
+<& /Elements/Tabs,
     id => $id,
     current_tab => "Admin/CustomFields/Objects.html?id=".$id,
     Title => $title
diff --git a/share/html/Admin/CustomFields/UserRights.html b/share/html/Admin/CustomFields/UserRights.html
index 238fc4a..8c916a8 100644
--- a/share/html/Admin/CustomFields/UserRights.html
+++ b/share/html/Admin/CustomFields/UserRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs, id => $id, 
+<& /Elements/Tabs, id => $id,
 current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
 Title => $title, &>
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Admin/CustomFields/index.html b/share/html/Admin/CustomFields/index.html
index 9156bbf..0aa788b 100644
--- a/share/html/Admin/CustomFields/index.html
+++ b/share/html/Admin/CustomFields/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
+<& /Elements/Tabs,
     current_tab => 'Admin/CustomFields/', 
     Title => $title,
 &>
diff --git a/share/html/Admin/Elements/CustomFieldTabs b/share/html/Admin/Elements/CustomFieldTabs
deleted file mode 100644
index e5254ff..0000000
--- a/share/html/Admin/Elements/CustomFieldTabs
+++ /dev/null
@@ -1,121 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/Tabs, 
-    current_tab => 'Admin/CustomFields/',
-    subtabs => $tabs, 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-<%INIT>
-my $tabs;
-
-if ($id) {
-    my $cf = RT::CustomField->new( $session{'CurrentUser'} );
-    $cf->Load($id);
-    $tabs = {
-        this => {
-            title => $cf->Name,
-            path  => "Admin/CustomFields/Modify.html?id=" . $id,
-            current_subtab => $current_tab,
-
-            subtabs => {
-
-                C => { title => loc('Basics'),
-                       path  => "Admin/CustomFields/Modify.html?id=" . $id,
-                },
-                F => { title => loc('Group Rights'),
-                       path  => "Admin/CustomFields/GroupRights.html?id="
-                         . $id, },
-                G => {
-                    title => loc('User Rights'),
-                    path => "Admin/CustomFields/UserRights.html?id=" . $id,
-                },
-
-            } }
-
-    };
-
-
-    if ($cf->LookupType =~ /^RT::(?:Queue|Group)(?:\Z|-)/i) {
-	$tabs->{'this'}->{subtabs}->{D} = {
-	title => loc('Applies to'),
-	    path  => "Admin/CustomFields/Objects.html?id=" . $id,
-	};
-    }
-}
-
-if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField')
-     || $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomFieldValues') ) {
-  $tabs->{"A"} = { title => loc('Select'),
-                        path => "Admin/CustomFields/",
-                           };
-}
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField')) {
-  $tabs->{"B"} = { title => loc('Create'),
-                        path => "Admin/CustomFields/Modify.html?Create=1",
-                        separator => 1,
-                           };
-}
-
-  # Now let callbacks add their extra tabs
-  $m->callback( %ARGS, tabs => $tabs );
-
-foreach my $tab (sort keys %{$tabs->{'this'}->{'subtabs'}}) {
-    if ($tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab) {
-	$tabs->{'this'}->{'subtabs'}->{$tab}->{'subtabs'} = $subtabs;
-	$tabs->{'this'}->{'subtabs'}->{$tab}->{'current_subtab'} = $current_subtab;
-    }
-}
-if( $id ) { $current_tab = "Admin/CustomFields/Modify.html?id=" . $id }
-</%INIT>
-<%ARGS>
-$Title => undef
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-</%ARGS>
diff --git a/share/html/Admin/Elements/GlobalCustomFieldTabs b/share/html/Admin/Elements/GlobalCustomFieldTabs
deleted file mode 100755
index 64e5c53..0000000
--- a/share/html/Admin/Elements/GlobalCustomFieldTabs
+++ /dev/null
@@ -1,105 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/SystemTabs, subtabs => $tabs, 
-    current_tab => 'Admin/Global/CustomFields/index.html', 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-<%INIT>
-
-my $tabs = {
-
-    A => {
-        title => loc('Users'),
-        text => loc('Select custom fields for all users'),
-        path => 'Admin/Global/CustomFields/Users.html',
-    },
-
-    B => {
-        title => loc('Groups'),
-        text => loc('Select custom fields for all user groups'),
-        path => 'Admin/Global/CustomFields/Groups.html',
-    },
-
-    C => {
-        title => loc('Queues'),
-        text => loc('Select custom fields for all queues'),
-        path => 'Admin/Global/CustomFields/Queues.html',
-    },
-
-    F => {
-        title => loc('Tickets'),
-        text => loc('Select custom fields for tickets in all queues'),
-        path => 'Admin/Global/CustomFields/Queue-Tickets.html',
-    },
-
-    G => {
-        title => loc('Ticket Transactions'),
-        text => loc('Select custom fields for transactions on tickets in all queues'),
-        path => 'Admin/Global/CustomFields/Queue-Transactions.html',
-    },
-
-};
-  # Now let callbacks add their extra tabs
-  $m->callback( %ARGS, tabs => $tabs );
-
-  foreach my $tab (sort keys %{$tabs}) {
-    if ($tabs->{$tab}->{'path'} eq $current_tab) {
-      $tabs->{$tab}->{"subtabs"} = $subtabs;
-      $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-    }
-  }
-</%INIT>
-
-  
-<%ARGS>
-$id => undef
-$current_tab => ''
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Admin/Elements/GroupTabs b/share/html/Admin/Elements/GroupTabs
deleted file mode 100755
index f20259e..0000000
--- a/share/html/Admin/Elements/GroupTabs
+++ /dev/null
@@ -1,102 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/Tabs, 
-    subtabs => $tabs, 
-    current_tab => 'Admin/Groups/', 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-<%INIT>
-my $tabs;
-
-if ( $GroupObj and $GroupObj->id ) {
-$tabs->{"this"} = { class => "currentnav",                                                           
-                    path  => "Admin/Groups/Modify.html?id=" . $GroupObj->id,
-                    title => $GroupObj->Name,
-                    current_subtab => $current_subtab,
-        subtabs => {
-        C => { title => loc('Basics'),
-               path  => "Admin/Groups/Modify.html?id=" . $GroupObj->id },
-
-        D => { title => loc('Members'),
-               path  => "Admin/Groups/Members.html?id=" . $GroupObj->id },
-
-        F => { title => loc('Group Rights'),
-               path  => "Admin/Groups/GroupRights.html?id=" . $GroupObj->id, },
-        G => { title => loc('User Rights'),
-               path  => "Admin/Groups/UserRights.html?id=" . $GroupObj->id, },
-        H => { title => loc('History'),
-               path  => "Admin/Groups/History.html?id=" . $GroupObj->id },
-    }
-}
-}
-$tabs->{"A"} = { title => loc('Select'),
-                 path  => "Admin/Groups/", };
-$tabs->{"B"} = { title     => loc('Create'),
-                 path      => "Admin/Groups/Modify.html?Create=1",
-		 separator => 1, };
-
-# Now let callbacks add their extra tabs
-$m->callback( %ARGS, tabs => $tabs );
-foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {  
-    if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
-        $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"}        = $subtabs; 
-        $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; 
-    }                                                                           
-}   
-        $tabs->{'this'}->{"current_subtab"} = $current_tab; 
-        $current_tab = "Admin/Groups/Modify.html?id=".$GroupObj->id if $GroupObj;
-
-</%INIT>
-<%ARGS>
-$GroupObj => undef
-$subtabs => undef
-$current_subtab => undef
-$current_tab => undef
-$Title => undef
-</%ARGS>
-
diff --git a/share/html/Admin/Elements/ObjectCustomFields b/share/html/Admin/Elements/ObjectCustomFields
index f076e5b..8be5ef8 100644
--- a/share/html/Admin/Elements/ObjectCustomFields
+++ b/share/html/Admin/Elements/ObjectCustomFields
@@ -85,7 +85,7 @@ if ($id) {
     $Object->Load($id) || Abort(loc("Couldn't load object [_1]", $id), SuppressHeader => 1);
     $ObjectTabs = "/Admin/Elements/${Type}Tabs";
 } else {
-    $ObjectTabs = "/Admin/Elements/GlobalCustomFieldTabs";
+    $ObjectTabs = "/Elements/Tabs";
 
 } 
 
diff --git a/share/html/Admin/Elements/QueueTabs b/share/html/Admin/Elements/QueueTabs
deleted file mode 100755
index 88b62ee..0000000
--- a/share/html/Admin/Elements/QueueTabs
+++ /dev/null
@@ -1,123 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/Tabs, 
-    subtabs => $tabs, 
-    current_tab => 'Admin/Queues/', 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-
-<%INIT>
-my $tabs;
-if ($id) {
-  $tabs->{'this'}  = {
-                title => $QueueObj->Name,
-  		     	path => "Admin/Queues/Modify.html?id=".$id,
-                    current_subtab => $current_tab,     
-                subtabs => {
-		 C => { title => loc('Basics'),
-  		     	path => "Admin/Queues/Modify.html?id=".$id,
-			   },
-		 D => { title => loc('Watchers'),
-		 	path => "Admin/Queues/People.html?id=".$id,
-		      },
-
-		 E => { title => loc('Scrips'),
-			     path => "Admin/Queues/Scrips.html?id=".$id,
-			   },
-		 F => { title => loc('Templates'),
-				path => "Admin/Queues/Templates.html?id=".$id,
-			      },
-
-                 G1 => { title => loc('Ticket Custom Fields'),
-                        path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='.$id,
-                        },
-
-                 G2 => { title => loc('Transaction Custom Fields'),
-                        path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='.$id,
-                        },
-
-		 H => { title => loc('Group Rights'),
-			  path => "Admin/Queues/GroupRights.html?id=".$id,
-			},	
-		 I => { title => loc('User Rights'),
-			  path => "Admin/Queues/UserRights.html?id=".$id,
-			},
-			J => { title => loc('History'),
-			  path  => "Admin/Queues/History.html?id=" . $QueueObj->id 
-			},
-        }
-        };
-}
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue')) {
-  $tabs->{"A"} = { title => loc('Select'),
-  		     	path => "Admin/Queues/",
-			   };
-  $tabs->{"B"} = { title => loc('Create'),
-  		     	path => "Admin/Queues/Modify.html?Create=1",
-		 separator => 1, };
-}
-
-  # Now let callbacks add their extra tabs
-  $m->callback( %ARGS, tabs => $tabs );
-foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {  
-    if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
-        $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"}        = $subtabs; 
-        $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; 
-    }                                                                           
-}   
-  		     	$current_tab = "Admin/Queues/Modify.html?id=".$id if $id;
-</%INIT>
-  
-<%ARGS>
-$QueueObj => undef
-$id => undef
-$subtabs => undef
-$current_subtab => ''
-$current_tab => ''
-$Title => undef
-</%ARGS>
diff --git a/share/html/Admin/Elements/SystemTabs b/share/html/Admin/Elements/SystemTabs
deleted file mode 100755
index 58ea660..0000000
--- a/share/html/Admin/Elements/SystemTabs
+++ /dev/null
@@ -1,102 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/Tabs, subtabs => $tabs, 
-    current_tab => 'Admin/Global/', 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-
-<%INIT>
-  my $tabs = {
-                
-               A => { title => loc('Scrips'),
-                           path => 'Admin/Global/Scrips.html',
-                         },
-               B => { title => loc('Templates'),
-                        path => 'Admin/Global/Templates.html',
-                      },
-              
-                F => { title => loc('Custom Fields'),
-                        path => 'Admin/Global/CustomFields/index.html',
-                        },
-
-                G => { title => loc('Group Rights'),
-                                path => 'Admin/Global/GroupRights.html',
-                      },
-                H => { title => loc('User Rights'),
-                                path => 'Admin/Global/UserRights.html',
-                      },
-                I => { title => loc('RT at a glance'),
-                                path => 'Admin/Global/MyRT.html',
-                      },
-                J => { title => loc('Theme'),
-                                path => 'Admin/Global/Theme.html',
-                      },
-
-};
-
-  # Now let callbacks add their extra tabs
-  $m->callback( %ARGS, tabs => $tabs );
-
-  if ($current_tab) {
-    foreach my $tab (sort keys %{$tabs}) {
-      if ($tabs->{$tab}->{'path'} eq $current_tab) {
-        $tabs->{$tab}->{"subtabs"} = $subtabs || {};
-        $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-      }
-    }
-  }
-</%INIT>
-
-  
-<%ARGS>
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Admin/Elements/Tabs b/share/html/Admin/Elements/Tabs
deleted file mode 100755
index e187f73..0000000
--- a/share/html/Admin/Elements/Tabs
+++ /dev/null
@@ -1,95 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Elements/Tabs, 
-    tabs => $tabs, 
-    current_toptab => 'Admin/', 
-    current_tab => $current_tab, 
-    Title => $Title &>
-
-<%INIT>
-  my $tabs = { A => { title => loc('Users'),
-			  path => 'Admin/Users/',
-			},
-	       B => { title => loc('Groups'),
-			   path => 'Admin/Groups/',
-			 },
-	       C => { title => loc('Queues'),
-			   path => 'Admin/Queues/',
-			 },
-	       D => { 'title' => loc('Custom Fields'),
-			   path => 'Admin/CustomFields/',
-			 },
-	       E => { 'title' => loc('Global'),
-			   path => 'Admin/Global/',
-			 },
-	       F => { 'title' => loc('Tools'),
-			   path => 'Admin/Tools/',
-			 },
-	     };
-
-  # Now let callbacks add their extra tabs
-  $m->callback( %ARGS, tabs => $tabs );
-
-  if( defined $current_tab ) {
-    foreach my $tab (keys %{$tabs}) {
-      if ($tabs->{$tab}->{'path'} eq $current_tab) {
-        $tabs->{$tab}->{"subtabs"}        = $subtabs;
-        $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-      }
-    }
-  }
-
-</%INIT>
-
-
-<%ARGS>
-$subtabs => undef
-$current_tab => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Admin/Elements/ToolTabs b/share/html/Admin/Elements/ToolTabs
deleted file mode 100755
index 63edf8e..0000000
--- a/share/html/Admin/Elements/ToolTabs
+++ /dev/null
@@ -1,85 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/Tabs,
-    Title          => $Title,
-    current_tab    => 'Admin/Tools/',
-    subtabs        => $tabs,
-    current_subtab => $current_tab,
-&>
-
-<%INIT>
-    my $tabs = {
-        A => { title => loc('System Configuration'),
-               path => 'Admin/Tools/Configuration.html',
-        },
-        B => { title => loc('SQL Queries'),
-               path => 'Admin/Tools/Queries.html',
-        },
-        E => { title => loc('Shredder'),
-               path  => 'Admin/Tools/Shredder/',
-        },
-    };
-
-    # Now let callbacks add their extra tabs
-    $m->callback( %ARGS, tabs => $tabs );
-
-    foreach my $tab ( values %{$tabs} ) {
-        next unless $tab->{'path'} eq $current_tab;
-
-        $tab->{"subtabs"} = $subtabs;
-        $tab->{"current_subtab"} = $current_subtab;
-    }
-</%INIT>
-
-<%ARGS>
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Admin/Elements/UserTabs b/share/html/Admin/Elements/UserTabs
deleted file mode 100755
index 86d9ba7..0000000
--- a/share/html/Admin/Elements/UserTabs
+++ /dev/null
@@ -1,116 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Admin/Elements/Tabs, 
-    subtabs => $tabs,
-    current_tab => 'Admin/Users/', 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-<%INIT>
-my $tabs;
-if ($id) {
-$tabs->{'this'} = { title => eval { $UserObj->Name },
-
-		path => "Admin/Users/Modify.html?id=".$id,
-subtabs => {
-	       Basics => { title => loc('Basics'),
-				path => "Admin/Users/Modify.html?id=".$id
-			},
-	       Memberships => { title => loc('Memberships'),
-			   path => "Admin/Users/Memberships.html?id=".$id
-			 },
-	       History => { title => loc('History'),
-			   path => "Admin/Users/History.html?id=".$id
-			 },
-	       'MyRT' => { title => loc('RT at a glance'),
-			   path => "Admin/Users/MyRT.html?id=".$id
-			 },
-	}
-};
-    if ( RT->Config->Get('GnuPG')->{'Enable'} ) {
-        $tabs->{'this'}{'subtabs'}{'GnuPG'} = {
-            title => loc('GnuPG'),
-            path  => "Admin/Users/GnuPG.html?id=".$id,
-        };
-    }
-}
-
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers')) {
-  $tabs->{"A"} = { title => loc('Select'),
-  		     	path => "Admin/Users/",
-			   };
-  $tabs->{"B"} = { title => loc('Create'),
-  		     	path => "Admin/Users/Modify.html?Create=1",
-		separator => 1,
-	};
-}
-
-  # Now let callbacks add their extra tabs
-  $m->callback( %ARGS, tabs => $tabs );
-                                                                                
-#foreach my $tab ( sort keys %{$tabs} ) {                                        
-#    if ( $tabs->{$tab}->{'path'} eq $current_subtab ) {                         
-#        $tabs->{$tab}->{"current_subtab"} = $current_subtab;                    
-#    }                                                                           
-#}                                                                               
-foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {  
-    if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
-        $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"}        = $subtabs; 
-        $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab; 
-    }                                                                           
-}   
-$tabs->{'this'}->{"current_subtab"} = $current_tab; 
-$current_tab = "Admin/Users/Modify.html?id=".$id if $id;
-</%INIT>
-<%ARGS>
-$UserObj => undef
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Admin/Global/CustomFields/Groups.html b/share/html/Admin/Global/CustomFields/Groups.html
index 51839fe..0e05b14 100644
--- a/share/html/Admin/Global/CustomFields/Groups.html
+++ b/share/html/Admin/Global/CustomFields/Groups.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
+<& /Elements/Tabs,
     current_tab => "Admin/Global/CustomFields/Groups.html",
     current_subtab => "Admin/Global/CustomFields/Groups.html",
     Title => $title
diff --git a/share/html/Admin/Global/CustomFields/Queue-Tickets.html b/share/html/Admin/Global/CustomFields/Queue-Tickets.html
index 08a30e8..01e3a55 100755
--- a/share/html/Admin/Global/CustomFields/Queue-Tickets.html
+++ b/share/html/Admin/Global/CustomFields/Queue-Tickets.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
+<& /Elements/Tabs,
     current_tab => "Admin/Global/CustomFields/Queue-Tickets.html",
     current_subtab => "Admin/Global/CustomFields/Queue-Tickets.html",
     Title => $title
diff --git a/share/html/Admin/Global/CustomFields/Queue-Transactions.html b/share/html/Admin/Global/CustomFields/Queue-Transactions.html
index 5eef8d9..0789b65 100755
--- a/share/html/Admin/Global/CustomFields/Queue-Transactions.html
+++ b/share/html/Admin/Global/CustomFields/Queue-Transactions.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
+<& /Elements/Tabs,
     current_tab => "Admin/Global/CustomFields/Queue-Transactions.html",
     current_subtab => "Admin/Global/CustomFields/Queue-Transactions.html",
     Title => $title
diff --git a/share/html/Admin/Global/CustomFields/Queues.html b/share/html/Admin/Global/CustomFields/Queues.html
index aa57c4d..029e25f 100644
--- a/share/html/Admin/Global/CustomFields/Queues.html
+++ b/share/html/Admin/Global/CustomFields/Queues.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
+<& /Elements/Tabs,
     current_tab => "Admin/Global/CustomFields/Queues.html",
     current_subtab => "Admin/Global/CustomFields/Queues.html",
     Title => $title
diff --git a/share/html/Admin/Global/CustomFields/Users.html b/share/html/Admin/Global/CustomFields/Users.html
index 38cc1f1..a035dc7 100644
--- a/share/html/Admin/Global/CustomFields/Users.html
+++ b/share/html/Admin/Global/CustomFields/Users.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
+<& /Elements/Tabs,
     current_tab => "Admin/Global/CustomFields/Users.html",
     current_subtab => "Admin/Global/CustomFields/Users.html",
     Title => $title
diff --git a/share/html/Admin/Global/CustomFields/index.html b/share/html/Admin/Global/CustomFields/index.html
index cbbf481..e020085 100644
--- a/share/html/Admin/Global/CustomFields/index.html
+++ b/share/html/Admin/Global/CustomFields/index.html
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 % $m->callback( %ARGS, tabs => $tabs );
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs, Title => $title &>
+<& /Elements/Tabs, Title => $title &>
 
 <ul>
 % foreach my $key (sort keys %$tabs) {
diff --git a/share/html/Admin/Global/GroupRights.html b/share/html/Admin/Global/GroupRights.html
index ca0ac62..e8e0d9a 100755
--- a/share/html/Admin/Global/GroupRights.html
+++ b/share/html/Admin/Global/GroupRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify global group rights') &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/GroupRights.html', 
     Title => loc('Modify global group rights') &>  
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Admin/Global/MyRT.html b/share/html/Admin/Global/MyRT.html
index da9cb22..b7a8e77 100644
--- a/share/html/Admin/Global/MyRT.html
+++ b/share/html/Admin/Global/MyRT.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc("RT at a glance") &>
-<& /Admin/Elements/SystemTabs,
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/MyRT.html',
     Title => loc("RT at a glance"),
 &>
diff --git a/share/html/Admin/Global/Scrip.html b/share/html/Admin/Global/Scrip.html
index 53eb22f..58836b2 100755
--- a/share/html/Admin/Global/Scrip.html
+++ b/share/html/Admin/Global/Scrip.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/Scrips.html', 
     current_subtab => $current_subtab, 
     subtabs => $subtabs, 
diff --git a/share/html/Admin/Global/Scrips.html b/share/html/Admin/Global/Scrips.html
index 7fe3a14..39858da 100755
--- a/share/html/Admin/Global/Scrips.html
+++ b/share/html/Admin/Global/Scrips.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/Scrips.html', 
     current_subtab => 'Admin/Global/Scrips.html', 
     subtabs => $subtabs, 
diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index ef206ff..64d0b1c 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/Templates.html', 
     current_subtab => $current_subtab, 
     subtabs => $subtabs, 
diff --git a/share/html/Admin/Global/Templates.html b/share/html/Admin/Global/Templates.html
index dfb5a49..28a3e7b 100755
--- a/share/html/Admin/Global/Templates.html
+++ b/share/html/Admin/Global/Templates.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title, FeedURI => 'templates' &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/Templates.html', 
     current_subtab => 'Admin/Global/Templates.html', 
     subtabs => $subtabs, 
diff --git a/share/html/Admin/Global/Theme.html b/share/html/Admin/Global/Theme.html
index 276d704..5759e77 100644
--- a/share/html/Admin/Global/Theme.html
+++ b/share/html/Admin/Global/Theme.html
@@ -49,7 +49,7 @@
     Title => loc("Theme"),
     LinkRel => { stylesheet => '/NoAuth/css/farbtastic.css' }
     &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/Theme.html', 
     Title => loc("Theme") &>
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Admin/Global/UserRights.html b/share/html/Admin/Global/UserRights.html
index 2e9e245..cc05cdc 100755
--- a/share/html/Admin/Global/UserRights.html
+++ b/share/html/Admin/Global/UserRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify global user rights') &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Global/UserRights.html',
     Title => loc('Modify global user rights') &>  
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Admin/Global/index.html b/share/html/Admin/Global/index.html
index 8ea14e8..5d7b1b0 100755
--- a/share/html/Admin/Global/index.html
+++ b/share/html/Admin/Global/index.html
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 % $m->callback( %ARGS, tabs => $tabs );
 <& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &>
-<& /Admin/Elements/SystemTabs, 
+<& /Elements/Tabs,
     Title => loc('Admin/Global configuration') &>
     <& /Elements/ListMenu, items => $tabs &>
 <%INIT>
diff --git a/share/html/Admin/Groups/GroupRights.html b/share/html/Admin/Groups/GroupRights.html
index 268ecf2..66d35c9 100755
--- a/share/html/Admin/Groups/GroupRights.html
+++ b/share/html/Admin/Groups/GroupRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
-<& /Admin/Elements/GroupTabs, 
+<& /Elements/Tabs,
     GroupObj => $GroupObj, 
     current_tab => 'Admin/Groups/GroupRights.html?id='.$id, 
     Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
diff --git a/share/html/Admin/Groups/History.html b/share/html/Admin/Groups/History.html
index abcb18a..f49595b 100644
--- a/share/html/Admin/Groups/History.html
+++ b/share/html/Admin/Groups/History.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/GroupTabs, 
+<& /Elements/Tabs,
     id => $id, 
     GroupObj => $GroupObj,
     current_subtab => $current_tab, 
diff --git a/share/html/Admin/Groups/Members.html b/share/html/Admin/Groups/Members.html
index ec2c0f6..73a6125 100755
--- a/share/html/Admin/Groups/Members.html
+++ b/share/html/Admin/Groups/Members.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GroupTabs, GroupObj => $Group, 
+<& /Elements/Tabs, GroupObj => $Group,
     current_tab => 'Admin/Groups/Members.html?id='.$id, 
     Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Admin/Groups/Modify.html b/share/html/Admin/Groups/Modify.html
index b81c9f8..4539d75 100755
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
 
-<& /Admin/Elements/GroupTabs, 
+<& /Elements/Tabs,
     GroupObj => $Group, 
     current_tab => $current_tab, 
     Title => $title &>
diff --git a/share/html/Admin/Groups/UserRights.html b/share/html/Admin/Groups/UserRights.html
index c0209c6..2a36551 100755
--- a/share/html/Admin/Groups/UserRights.html
+++ b/share/html/Admin/Groups/UserRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
-<& /Admin/Elements/GroupTabs, 
+<& /Elements/Tabs,
     GroupObj => $GroupObj, 
     current_tab => 'Admin/Groups/UserRights.html?id='.$id, 
     Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>  
diff --git a/share/html/Admin/Groups/index.html b/share/html/Admin/Groups/index.html
index ba03568..616df41 100755
--- a/share/html/Admin/Groups/index.html
+++ b/share/html/Admin/Groups/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
+<& /Elements/Tabs, current_tab => 'Admin/Groups/',
     current_subtab => 'Admin/Groups/', 
     Title => $title &>
 <% $caption %>:<br />
diff --git a/share/html/Admin/Queues/CustomField.html b/share/html/Admin/Queues/CustomField.html
index da3b8ff..cd8859f 100755
--- a/share/html/Admin/Queues/CustomField.html
+++ b/share/html/Admin/Queues/CustomField.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->Id, 
+<& /Elements/Tabs, id => $QueueObj->Id,
     QueueObj => $QueueObj,                                                      
     current_tab => 'Admin/Queues/CustomFields.html?id='.$QueueObj->id, 
     current_subtab => $current_subtab, 
diff --git a/share/html/Admin/Queues/CustomFields.html b/share/html/Admin/Queues/CustomFields.html
index dc4ceb8..a52354d 100755
--- a/share/html/Admin/Queues/CustomFields.html
+++ b/share/html/Admin/Queues/CustomFields.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<&    /Admin/Elements/QueueTabs,
+<&    /Elements/Tabs,
     id => $Object->id, 
     QueueObj => $Object,
     Title => $title
diff --git a/share/html/Admin/Queues/GroupRights.html b/share/html/Admin/Queues/GroupRights.html
index 93a9b51..268a743 100755
--- a/share/html/Admin/Queues/GroupRights.html
+++ b/share/html/Admin/Queues/GroupRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
-<& /Admin/Elements/QueueTabs, id => $id, 
+<& /Elements/Tabs, id => $id,
     QueueObj => $QueueObj,
     current_tab => $current_tab, 
     Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
diff --git a/share/html/Admin/Queues/History.html b/share/html/Admin/Queues/History.html
index b33beff..b6983bc 100644
--- a/share/html/Admin/Queues/History.html
+++ b/share/html/Admin/Queues/History.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/QueueTabs, 
+<& /Elements/Tabs,
     id => $id, 
     QueueObj => $QueueObj,
     current_subtab => $current_tab, 
diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index 3916508..2774147 100755
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->id, 
+<& /Elements/Tabs, id => $QueueObj->id,
     QueueObj => $QueueObj,
     current_tab => $current_tab, 
     Title => $title &>
diff --git a/share/html/Admin/Queues/People.html b/share/html/Admin/Queues/People.html
index 7091d13..c3e4141 100755
--- a/share/html/Admin/Queues/People.html
+++ b/share/html/Admin/Queues/People.html
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
 
-<& /Admin/Elements/QueueTabs, id => $id, 
+<& /Elements/Tabs, id => $id,
     QueueObj => $QueueObj,                                                      
     Title => $title &>
 
diff --git a/share/html/Admin/Queues/Scrip.html b/share/html/Admin/Queues/Scrip.html
index a4f2bb5..fb522ef 100755
--- a/share/html/Admin/Queues/Scrip.html
+++ b/share/html/Admin/Queues/Scrip.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
+<& /Elements/Tabs, id => $QueueObj->Id,
     QueueObj => $QueueObj,
     current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
     current_subtab => $current_subtab,
diff --git a/share/html/Admin/Queues/Scrips.html b/share/html/Admin/Queues/Scrips.html
index b3cd9d0..1e55752 100755
--- a/share/html/Admin/Queues/Scrips.html
+++ b/share/html/Admin/Queues/Scrips.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->id, 
+<& /Elements/Tabs, id => $QueueObj->id,
     QueueObj => $QueueObj,                                                      
     current_tab => 'Admin/Queues/Scrips.html?id='.$id, 
     current_subtab => 'Admin/Queues/Scrips.html?id='.$id, 
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index a46390d..147ac89 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $Queue, 
+<& /Elements/Tabs, id => $Queue,
     QueueObj => $QueueObj,
      Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Admin/Queues/Templates.html b/share/html/Admin/Queues/Templates.html
index 8d84c48..4b37a8a 100755
--- a/share/html/Admin/Queues/Templates.html
+++ b/share/html/Admin/Queues/Templates.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->id, 
+<& /Elements/Tabs, id => $QueueObj->id,
         QueueObj => $QueueObj,
     Title => $title &>
 
diff --git a/share/html/Admin/Queues/UserRights.html b/share/html/Admin/Queues/UserRights.html
index a27b103..387249b 100755
--- a/share/html/Admin/Queues/UserRights.html
+++ b/share/html/Admin/Queues/UserRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
-<& /Admin/Elements/QueueTabs, id => $id,
+<& /Elements/Tabs, id => $id,
     QueueObj => $QueueObj,
     current_tab => $current_tab, 
     Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
diff --git a/share/html/Admin/Queues/index.html b/share/html/Admin/Queues/index.html
index afb3753..4315bc9 100755
--- a/share/html/Admin/Queues/index.html
+++ b/share/html/Admin/Queues/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc("Admin queues") &>
-<& /Admin/Elements/QueueTabs, current_tab => 'Admin/Queues/', 
+<& /Elements/Tabs, current_tab => 'Admin/Queues/',
     current_subtab => 'Admin/Queues/', 
     Title => loc("Admin queues") &>
 
diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index a8b4b3e..740cd60 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -53,7 +53,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 }
 </%init>
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/ToolTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Tools/Configuration.html',
     current_subtab => 'Admin/Tools/Configuration.html', 
     Title => $title &>
diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html
index ab9a4a4..d322105 100644
--- a/share/html/Admin/Tools/Queries.html
+++ b/share/html/Admin/Tools/Queries.html
@@ -52,7 +52,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 }
 </%init>
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/ToolTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Tools/Queries.html',
     current_subtab => 'Admin/Tools/Queries.html', 
     Title => $title &>
diff --git a/share/html/Admin/Tools/Shredder/Elements/Error/NoRights b/share/html/Admin/Tools/Shredder/Elements/Error/NoRights
index 7834a3b..f09ca87 100644
--- a/share/html/Admin/Tools/Shredder/Elements/Error/NoRights
+++ b/share/html/Admin/Tools/Shredder/Elements/Error/NoRights
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => 'Error' &>
-<& /Admin/Elements/ToolTabs,
+<& /Elements/Tabs,
 	current_tab => 'Admin/Tools/Shredder',
 	current_subtab => 'Admin/Tools/Shredder',
 	Title => 'Error',
diff --git a/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage b/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage
index 35704df..cb274b5 100644
--- a/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage
+++ b/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage
@@ -49,7 +49,7 @@
 $Path => ''
 </%ARGS>
 <& /Admin/Elements/Header, Title => 'Error' &>
-<& /Admin/Elements/ToolTabs,
+<& /Elements/Tabs,
 	current_tab => 'Admin/Tools/Shredder',
 	current_subtab => 'Admin/Tools/Shredder',
 	Title => 'Error',
diff --git a/share/html/Admin/Tools/Shredder/index.html b/share/html/Admin/Tools/Shredder/index.html
index 6b19636..84a4cc5 100644
--- a/share/html/Admin/Tools/Shredder/index.html
+++ b/share/html/Admin/Tools/Shredder/index.html
@@ -52,7 +52,7 @@ $Wipeout => ''
 @WipeoutObject => ()
 </%ARGS>
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/ToolTabs,
+<& /Elements/Tabs,
     current_tab => 'Admin/Tools/Shredder',
     current_subtab => 'Admin/Tools/Shredder',
     Title => $title,
diff --git a/share/html/Admin/Tools/index.html b/share/html/Admin/Tools/index.html
index 4789ea7..c3fc31a 100644
--- a/share/html/Admin/Tools/index.html
+++ b/share/html/Admin/Tools/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/ToolTabs, 
+<& /Elements/Tabs,
     current_tab => 'Admin/Tools/index.html',
     current_subtab => 'Admin/Tools/Configuration.html', 
     Title => $title &>
diff --git a/share/html/Admin/Users/CustomFields.html b/share/html/Admin/Users/CustomFields.html
index d1b825a..f8c2da7 100644
--- a/share/html/Admin/Users/CustomFields.html
+++ b/share/html/Admin/Users/CustomFields.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<&    /Admin/Elements/UserTabs,
+<&    /Elements/Tabs,
     id => $Object->id, 
     current_tab => "Admin/Users/CustomFields.html?$id=".$id, 
     current_subtab => "Admin/Users/CustomFields.html?id=".$id, 
diff --git a/share/html/Admin/Users/GnuPG.html b/share/html/Admin/Users/GnuPG.html
index ab96114..4ca3798 100644
--- a/share/html/Admin/Users/GnuPG.html
+++ b/share/html/Admin/Users/GnuPG.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/UserTabs, 
+<& /Elements/Tabs,
     id          => $id, 
     UserObj     => $UserObj,
     current_tab => 'Admin/Users/GnuPG.html?id='. $id,
diff --git a/share/html/Admin/Users/History.html b/share/html/Admin/Users/History.html
index 8c99da7..9bc45a5 100644
--- a/share/html/Admin/Users/History.html
+++ b/share/html/Admin/Users/History.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/UserTabs, 
+<& /Elements/Tabs,
     id => $id, 
     UserObj => $UserObj,
     current_tab => $current_tab, 
diff --git a/share/html/Admin/Users/Memberships.html b/share/html/Admin/Users/Memberships.html
index 3801c96..736718a 100644
--- a/share/html/Admin/Users/Memberships.html
+++ b/share/html/Admin/Users/Memberships.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/UserTabs, 
+<& /Elements/Tabs,
     id => $id, 
     UserObj => $UserObj,
     current_tab => $current_tab, 
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index c90b3db..76bbac4 100755
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/UserTabs, 
+<& /Elements/Tabs,
     id => $id, 
     UserObj => $UserObj,
     current_tab => $current_tab, 
diff --git a/share/html/Admin/Users/MyRT.html b/share/html/Admin/Users/MyRT.html
index cdd607d..207d076 100644
--- a/share/html/Admin/Users/MyRT.html
+++ b/share/html/Admin/Users/MyRT.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Admin/Elements/UserTabs, 
+<& /Elements/Tabs,
     id => $id, 
     UserObj => $UserObj,
     current_tab => $current_tab, 
diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
index 6c0fddf..53856d4 100755
--- a/share/html/Admin/Users/index.html
+++ b/share/html/Admin/Users/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Select a user') &>
-<& /Admin/Elements/UserTabs, current_tab => 'Admin/Users/', 
+<& /Elements/Tabs, current_tab => 'Admin/Users/',
     current_subtab => 'Admin/Users/',
     Title => loc('Select a user') &>
     
diff --git a/share/html/Admin/index.html b/share/html/Admin/index.html
index 0cab578..01e9bd7 100755
--- a/share/html/Admin/index.html
+++ b/share/html/Admin/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& //Admin/Elements/Header, Title => loc('RT Administration') &>
-<& //Admin/Elements/Tabs, Title => loc('RT Administration') &>
+<& //Elements/Tabs, Title => loc('RT Administration') &>
 
 <& /Elements/ListMenu, items => $tabs &>
 <%init>

commit 11487aff981d3609acd39acab70def283ebae40e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 20:05:42 2010 -0400

    Kill Ticket/Elements/Tabs

diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index a6031cc..2eed704 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -66,7 +66,7 @@
 %#   action does quote it (this breaks SQLite).
 %#
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => "Search/Build.html?".$QueryString, 
     Title => $title,
     %query,
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index d726dcc..63e2203 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => "Search/Bulk.html",
     Title => $title,
     Format => $ARGS{'Format'}, # we don't want the locally modified one
diff --git a/share/html/Search/Chart.html b/share/html/Search/Chart.html
index 31e5b24..96c81a3 100644
--- a/share/html/Search/Chart.html
+++ b/share/html/Search/Chart.html
@@ -80,7 +80,7 @@ my @actions = $m->comp( '/Widgets/SavedSearch:process', args => \%ARGS, self =>
 
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, Title => $title, Query => $ARGS{Query},
+<& /Elements/Tabs, Title => $title, Query => $ARGS{Query},
     SavedChartSearchId => $saved_search->{SearchId} &>
 <& /Elements/ListActions, actions => \@actions &>
 <& /Search/Elements/Chart, %ARGS &>
diff --git a/share/html/Search/Edit.html b/share/html/Search/Edit.html
index fb6a1cb..d2f1e3d 100755
--- a/share/html/Search/Edit.html
+++ b/share/html/Search/Edit.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title&>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => "Search/Edit.html?".$QueryString, 
     Title   => $title,
     Format  => $Format,
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index d9290cb..de38525 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -49,7 +49,7 @@
     Refresh => $session{'tickets_refresh_interval'} || RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} ),
     RSSAutoDiscovery => $RSSFeedURL,
     LinkRel => \%link_rel &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => "Search/Results.html".$QueryString, 
     Title => $title,
     Format => $Format,
diff --git a/share/html/Search/Simple.html b/share/html/Search/Simple.html
index 974b556..43c101b 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     current_toptab => "Search/Simple.html",
     current_tab => "Search/Simple.html",
     Title => $title
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 155d300..2dc8eba 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -48,7 +48,7 @@
 <& /Elements/Header, 
     Title => $title,
     LinkRel => \%link_rel &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $TicketObj, 
     current_tab => 'Ticket/Display.html?id='.$TicketObj->id,
     Title => $title &>
diff --git a/share/html/Ticket/Forward.html b/share/html/Ticket/Forward.html
index 6554026..19403a3 100644
--- a/share/html/Ticket/Forward.html
+++ b/share/html/Ticket/Forward.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $Title &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $TicketObj, 
     Title  => $Title,
 &>
diff --git a/share/html/Ticket/GnuPG.html b/share/html/Ticket/GnuPG.html
index ad13c3c..8c55175 100644
--- a/share/html/Ticket/GnuPG.html
+++ b/share/html/Ticket/GnuPG.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs,
+<& /Elements/Tabs,
     Ticket => $txn->TicketObj,
     current_tab => 'Ticket/Encrypt.html?id='. $id,
     Title => $title,
diff --git a/share/html/Ticket/Graphs/index.html b/share/html/Ticket/Graphs/index.html
index f7178d5..3e8f190 100644
--- a/share/html/Ticket/Graphs/index.html
+++ b/share/html/Ticket/Graphs/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs,
+<& /Elements/Tabs,
     Ticket => $ticket,
     Title => $title,
     current_tab => "Ticket/ModifyLinks.html?id=$id",
diff --git a/share/html/Ticket/History.html b/share/html/Ticket/History.html
index cc4cacf..128b4f5 100755
--- a/share/html/Ticket/History.html
+++ b/share/html/Ticket/History.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id, 
     Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
 
diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
index 7f84c1b..644d303 100755
--- a/share/html/Ticket/Modify.html
+++ b/share/html/Ticket/Modify.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id, 
     Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
 
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index 63061fb..f20fe39 100755
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $Ticket, 
     current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id, 
     Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
diff --git a/share/html/Ticket/ModifyDates.html b/share/html/Ticket/ModifyDates.html
index 28286c9..f6a7159 100755
--- a/share/html/Ticket/ModifyDates.html
+++ b/share/html/Ticket/ModifyDates.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $TicketObj, 
     current_tab => "Ticket/ModifyDates.html?id=".$TicketObj->Id, 
     Title => loc('Modify dates for #[_1]', $TicketObj->Id) &> 
diff --git a/share/html/Ticket/ModifyLinks.html b/share/html/Ticket/ModifyLinks.html
index 8043d1e..7acfaff 100755
--- a/share/html/Ticket/ModifyLinks.html
+++ b/share/html/Ticket/ModifyLinks.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $Ticket, 
     current_tab => "Ticket/ModifyLinks.html?id=".$Ticket->Id, 
     Title => loc("Link ticket #[_1]", $Ticket->Id) &>
diff --git a/share/html/Ticket/ModifyPeople.html b/share/html/Ticket/ModifyPeople.html
index 9982cc2..8b1f94d 100755
--- a/share/html/Ticket/ModifyPeople.html
+++ b/share/html/Ticket/ModifyPeople.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $Ticket, 
     current_tab => "Ticket/ModifyPeople.html?id=".$Ticket->Id, 
     Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
diff --git a/share/html/Ticket/Reminders.html b/share/html/Ticket/Reminders.html
index 958b7ea..5158ce0 100755
--- a/share/html/Ticket/Reminders.html
+++ b/share/html/Ticket/Reminders.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Reminder ticket #[_1]", $Ticket->Id) &>
-<& /Ticket/Elements/Tabs, 
+<& /Elements/Tabs,
     Ticket => $Ticket, 
     current_tab => "Ticket/Reminders.html?id=".$Ticket->Id, 
     Title => loc("Reminders for ticket #[_1]", $Ticket->Id) &>
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index dd76dd7..7b9464f 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title  => $title &>
-<& /Ticket/Elements/Tabs,
+<& /Elements/Tabs,
     Ticket => $TicketObj,
     Title => $title &>
 

commit cb8d2a5b5da44b5ffdda5873181a0ca398f5cd8a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 20:22:58 2010 -0400

    More Tab components dying

diff --git a/share/html/Admin/Elements/ObjectCustomFields b/share/html/Admin/Elements/ObjectCustomFields
index 8be5ef8..6b305ca 100644
--- a/share/html/Admin/Elements/ObjectCustomFields
+++ b/share/html/Admin/Elements/ObjectCustomFields
@@ -46,17 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& $ObjectTabs,
-$id ? (
-    id => $Object->id, 
-    current_tab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id, 
-    current_subtab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id, 
-    "${Type}Obj" => $Object,
-) : (
-    current_tab => "Admin/Global/CustomFields/${QualifiedType}s.html",
-),
-    Title => $title
-    &>
+<& /Elements/Tabs, Title => $title &>
 
 <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &>
 <%INIT>
@@ -68,7 +58,6 @@ $id ? (
 
 my $Type = $1;
 my $Types = $Type.'s';
-my $ObjectTabs;
 my $Object = $ObjectType->new($session{'CurrentUser'});
 
 
@@ -83,10 +72,6 @@ if (defined $SubType && $SubType =~/^RT::(.*)$/)  {
 
 if ($id) { 
     $Object->Load($id) || Abort(loc("Couldn't load object [_1]", $id), SuppressHeader => 1);
-    $ObjectTabs = "/Admin/Elements/${Type}Tabs";
-} else {
-    $ObjectTabs = "/Elements/Tabs";
-
 } 
 
 my $title; 
diff --git a/share/html/Approvals/Elements/Tabs b/share/html/Approvals/Elements/Tabs
deleted file mode 100755
index 8355e59..0000000
--- a/share/html/Approvals/Elements/Tabs
+++ /dev/null
@@ -1,58 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Elements/Tabs,
-    tabs => $tabs, 
-    current_toptab => 'Approvals/', 
-    current_tab => $current_tab, 
-    Title => $Title &>
-
-<%ARGS>
-$tabs => undef
-$current_tab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Approvals/index.html b/share/html/Approvals/index.html
index a6b81c2..30a5816 100755
--- a/share/html/Approvals/index.html
+++ b/share/html/Approvals/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("My approvals") &>
-<& /Approvals/Elements/Tabs, Title => loc("My approvals") &>
+<& /Elements/Tabs, Title => loc("My approvals") &>
 
 <& /Elements/ListActions, actions => \@actions &>
 <form method="post" name="Approvals" id="Approvals">
diff --git a/share/html/Dashboards/Elements/Tabs b/share/html/Dashboards/Elements/Tabs
index 884f290..f951d61 100755
--- a/share/html/Dashboards/Elements/Tabs
+++ b/share/html/Dashboards/Elements/Tabs
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Tools/Elements/Tabs,
+<& /Elements/Tabs,
     subtabs => $subtabs,
     current_tab => 'Dashboards/index.html',
     current_subtab => $current_subtab,
diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index b55a7c5..d13ff1a 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Dashboards/Elements/Tabs,
+<& /Elements/Tabs,
     Title => $title,
     $Create ? () : (DashboardObj => $Dashboard),
 &>
diff --git a/share/html/Dashboards/Queries.html b/share/html/Dashboards/Queries.html
index f0ecdcb..3538ab9 100644
--- a/share/html/Dashboards/Queries.html
+++ b/share/html/Dashboards/Queries.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Dashboards/Elements/Tabs,
+<& /Elements/Tabs,
     current_subtab => $current_subtab,
     Title => $title,
     DashboardObj => $Dashboard &>
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index dfd4454..326580e 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -53,7 +53,7 @@
 &>
 
 % if ($Preview) {
-<& /Dashboards/Elements/Tabs,
+<& /Elements/Tabs,
     current_subtab => $current_subtab,
     Title => $title,
     DashboardObj => $DashboardObj &>
diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index d9134a1..4bff45e 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Dashboards/Elements/Tabs,
+<& /Elements/Tabs,
     Title => $title,
     DashboardObj => $DashboardObj &>
 
diff --git a/share/html/Dashboards/index.html b/share/html/Dashboards/index.html
index 505cc95..7b18f58 100644
--- a/share/html/Dashboards/index.html
+++ b/share/html/Dashboards/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Dashboards/Elements/Tabs,
+<& /Elements/Tabs,
     current_subtab => 'Dashboards/index.html',
     Title => $title &>
 
diff --git a/share/html/Prefs/Elements/Tabs b/share/html/Prefs/Elements/Tabs
deleted file mode 100644
index 09aa48a..0000000
--- a/share/html/Prefs/Elements/Tabs
+++ /dev/null
@@ -1,76 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /User/Elements/Tabs,
-    subtabs => $tabs,
-    current_tab => 'Prefs/Other.html',
-    current_subtab => $current_subtab,
-    Title => $Title &>
-
-<%INIT>
-my $tabs;
-$Searches ||= [$m->comp("/Search/Elements/SearchesForObject", Object => RT::System->new($session{'CurrentUser'}))];
-
-$tabs->{a} = {
-    title => loc('Quick search'),
-	path => 'Prefs/Quicksearch.html',
-};
-
-for my $search (@$Searches) {
-    $tabs->{ $search->[0] } = {
-        title => $search->[0],
-        path  => "Prefs/Search.html?"
-                 .$m->comp('/Elements/QueryString', name => ref($search->[1]).'-'.$search->[1]->Id),
-    };
-}
-</%INIT>
-<%ARGS>
-$GroupObj => undef
-$current_subtab => undef
-$Title => undef
-$Searches => undef
-</%ARGS>
diff --git a/share/html/Prefs/MyRT.html b/share/html/Prefs/MyRT.html
index a870cdf..6cd6dbe 100644
--- a/share/html/Prefs/MyRT.html
+++ b/share/html/Prefs/MyRT.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Prefs/Elements/Tabs,
+<& /Elements/Tabs,
     current_tab => 'Prefs/MyRT.html',
     Title => $title,
     Searches => \@sys_searches
diff --git a/share/html/Prefs/Quicksearch.html b/share/html/Prefs/Quicksearch.html
index 74931c9..44744fc 100644
--- a/share/html/Prefs/Quicksearch.html
+++ b/share/html/Prefs/Quicksearch.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Prefs/Elements/Tabs,
+<& /Elements/Tabs,
     current_tab => 'Prefs/MyRT.html',
     current_subtab => 'Prefs/Quicksearch.html',
     Title => $title
diff --git a/share/html/Prefs/Search.html b/share/html/Prefs/Search.html
index d749096..a8baf4c 100644
--- a/share/html/Prefs/Search.html
+++ b/share/html/Prefs/Search.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Prefs/Elements/Tabs,
+<& /Elements/Tabs,
     current_tab => 'Prefs/MyRT.html',
 #    current_subtab => 'Prefs/Search.html?name='.$m->comp('/Elements/QueryString', name => $ARGS{name}),
     current_subtab => 'Prefs/Search.html?name='.$ARGS{name},
diff --git a/share/html/SelfService/Elements/Tabs b/share/html/SelfService/Elements/Tabs
deleted file mode 100755
index 839ec3c..0000000
--- a/share/html/SelfService/Elements/Tabs
+++ /dev/null
@@ -1,115 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-% $m->callback( %ARGS, tabs => $tabs, actions => $actions );
-<& /Elements/PageLayout,
-    current_toptab => $current_toptab,
-    current_tab => $current_tab,
-    toptabs => $tabs,
-    topactions => $actions,
-    title => $Title
-&>
-<a name="skipnav" id="skipnav" accesskey="8"></a>
-% $m->callback( %ARGS, tabs => $tabs, actions => $actions, CallbackName => "AfterNav");
-<%INIT>
-my $queues = RT::Queues->new($session{'CurrentUser'});
-$queues->UnLimit;
-
-my $queue_count = 0;
-my $queue_id;
-
-while (my $queue = $queues->Next) {
-  next unless $queue->CurrentUserHasRight('CreateTicket');
-  $queue_id = $queue->id;
-  $queue_count++;
-  last if ($queue_count > 1);
-}
-
-if ($Title) {
-$Title = loc("RT Self Service") . " / " . $Title;
-} else {
-$Title = loc("RT Self Service");
-
-}
-my ($tab);
-my $tabs = { A  => { title => loc('Open tickets'),
-                        path => 'SelfService/',
-                      },
-             B => { title => loc('Closed tickets'),
-                         path => 'SelfService/Closed.html',
-                       },
-           };
-
-if ($queue_count > 1) {
-        $tabs->{C} = { title => loc('New ticket'),
-                       path => 'SelfService/CreateTicketInQueue.html'
-                       };
-}
-elsif ($queue_id) {
-        $tabs->{C} = { title => loc('New ticket'),
-                       path => 'SelfService/Create.html?Queue=' . $queue_id
-                       };
-}
-
-if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf',
-				       Object => $RT::System )) {
-	$tabs->{Z} = { title => loc('Preferences'),
-		       path => 'SelfService/Prefs.html'
-		       };
-}
-
-my $actions = {
-	B => { html => $m->scomp('GotoTicket') 
-		}
-	};
-</%INIT>
-<%ARGS>
-$Title => undef
-$current_toptab => undef
-$current_tab => undef
-</%ARGS>
-
diff --git a/share/html/Ticket/Elements/Tabs b/share/html/Ticket/Elements/Tabs
deleted file mode 100755
index 4b15fbf..0000000
--- a/share/html/Ticket/Elements/Tabs
+++ /dev/null
@@ -1 +0,0 @@
-<&/Elements/Tabs, %ARGS &>
diff --git a/share/html/Tools/Elements/Tabs b/share/html/Tools/Elements/Tabs
deleted file mode 100644
index f0d9fd7..0000000
--- a/share/html/Tools/Elements/Tabs
+++ /dev/null
@@ -1,102 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Elements/Tabs, 
-    tabs => $tabs, 
-    current_toptab => 'Tools/index.html', 
-    current_tab => $current_tab, 
-    actions => $actions,
-    Title => $Title &>
-
-<%INIT>
-my $tabs = {
-    b => {
-        title => loc('Offline'),
-        path  => 'Tools/Offline.html',
-    },
-    c => {
-        title => loc('Reports'),
-        path  => 'Tools/Reports/index.html',
-    },
-    d => {
-        title => loc('My Day'),
-        path  => 'Tools/MyDay.html',
-    },
-    e => {
-        title => loc('Watching Queues'),
-        path  => 'Tools/Watching.html',
-    },
-};
-
-my $can_see_dashboards = $session{CurrentUser}->HasRight(Right => 'SubscribeDashboard', Object => $RT::System)
-                       || RT::Dashboard->new($session{CurrentUser})->ObjectsForLoading
-                       || RT::Dashboard->new($session{CurrentUser})->ObjectsForCreating
-                       || RT::Dashboard->new($session{CurrentUser})->ObjectsForModifying;
-
-if ($can_see_dashboards) {
-    $tabs->{a} = {
-        title => loc('Dashboards'),
-        path  => 'Dashboards/index.html',
-    };
-}
-
-$m->callback( %ARGS, tabs => $tabs );
-
-foreach my $tab ( sort keys %{$tabs} ) {
-    if ( $tabs->{$tab}->{'path'} eq $current_tab ) {
-        $tabs->{$tab}->{"subtabs"}        = $subtabs;
-        $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-    }
-}
-</%INIT>
-<%ARGS>
-$subtabs => undef
-$current_tab => undef
-$current_subtab => undef
-$actions => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Tools/MyDay.html b/share/html/Tools/MyDay.html
index 96eb8a3..3bd305b 100644
--- a/share/html/Tools/MyDay.html
+++ b/share/html/Tools/MyDay.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Tools/Elements/Tabs, current_tab => "Tools/MyDay.html", Title => $title &>
+<& /Elements/Tabs, current_tab => "Tools/MyDay.html", Title => $title &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Tools/Reports/CreatedByDates.html b/share/html/Tools/Reports/CreatedByDates.html
index a6966fe..b21b8c6 100644
--- a/share/html/Tools/Reports/CreatedByDates.html
+++ b/share/html/Tools/Reports/CreatedByDates.html
@@ -71,7 +71,7 @@ if ($CreatedBefore) {
 $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Tools/Reports/Elements/Tabs, current_tab => 'Tools/Reports/CreatedByDates.html', Title => $title &>
+<& /Elements/Tabs, current_tab => 'Tools/Reports/CreatedByDates.html', Title => $title &>
 <form method="post" action="CreatedByDates.html">
 % if ($Queue|| $CreatedBefore ||$CreatedAfter) {
 % # if we have a queue, do the search
diff --git a/share/html/Tools/Reports/Elements/Tabs b/share/html/Tools/Reports/Elements/Tabs
deleted file mode 100644
index b22a916..0000000
--- a/share/html/Tools/Reports/Elements/Tabs
+++ /dev/null
@@ -1,89 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Tools/Elements/Tabs, 
-    subtabs => $tabs, 
-    current_tab => 'Tools/Reports/index.html', 
-    current_subtab => $current_tab, 
-    Title => $Title &>
-
-<%INIT>
-my $tabs = {
-    a => {
-        title => loc('Resolved by owner'),
-        path  => 'Tools/Reports/ResolvedByOwner.html',
-    },
-    b => {
-        title => loc('Resolved in date range'),
-        path  => 'Tools/Reports/ResolvedByDates.html',
-    },
-    c => {
-        title => loc('Created in a date range'),
-        path  => 'Tools/Reports/CreatedByDates.html',
-    },
-};
-
-
-
-
-$m->callback( %ARGS, tabs => $tabs );
-
-foreach my $tab ( sort keys %{$tabs} ) {
-    if ( $tabs->{$tab}->{'path'} eq $current_tab ) {
-        $tabs->{$tab}->{"subtabs"}        = $subtabs;
-        $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-    }
-}
-</%INIT>
-
-
-<%ARGS>
-$subtabs => undef
-$current_tab => ''
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Tools/Reports/ResolvedByDates.html b/share/html/Tools/Reports/ResolvedByDates.html
index cb134ce..aca9a87 100644
--- a/share/html/Tools/Reports/ResolvedByDates.html
+++ b/share/html/Tools/Reports/ResolvedByDates.html
@@ -71,7 +71,7 @@ if ($ResolvedBefore) {
 $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Tools/Reports/Elements/Tabs, current_tab => 'Tools/Reports/ResolvedByDates.html', Title => $title &>
+<& /Elements/Tabs, current_tab => 'Tools/Reports/ResolvedByDates.html', Title => $title &>
 <form method="post" action="ResolvedByDates.html">
 % if ($Queue|| $ResolvedBefore ||$ResolvedAfter) {
 % # if we have a queue, do the search
diff --git a/share/html/Tools/Reports/ResolvedByOwner.html b/share/html/Tools/Reports/ResolvedByOwner.html
index e64e0d9..3733a26 100644
--- a/share/html/Tools/Reports/ResolvedByOwner.html
+++ b/share/html/Tools/Reports/ResolvedByOwner.html
@@ -54,7 +54,7 @@ my $q = RT::Queue->new($session{'CurrentUser'});
 $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Tools/Reports/Elements/Tabs, current_tab => '/Tools/Reports/ResolvedByOwner.html', Title => $title &>
+<& /Elements/Tabs, current_tab => '/Tools/Reports/ResolvedByOwner.html', Title => $title &>
 <form method="post" action="ResolvedByOwner.html">
 % if ($Queue) {
 % # if we have a queue, do the search
diff --git a/share/html/Tools/Reports/index.html b/share/html/Tools/Reports/index.html
index 2ab90ea..6677bfd 100644
--- a/share/html/Tools/Reports/index.html
+++ b/share/html/Tools/Reports/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Reports') &>
-<& /Tools/Reports/Elements/Tabs, Title => loc('Reports') &>
+<& /Elements/Tabs, Title => loc('Reports') &>
 <& /Elements/ListMenu, items => $tabs &>
 
 % $m->callback;
diff --git a/share/html/User/Elements/Tabs b/share/html/User/Elements/Tabs
deleted file mode 100755
index 2b9e0e9..0000000
--- a/share/html/User/Elements/Tabs
+++ /dev/null
@@ -1,89 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Elements/Tabs, 
-    tabs => $tabs, 
-    current_toptab => 'Prefs/Other.html', 
-    current_tab => $current_tab, 
-    Title => $Title &>
-
-<%INIT>
-my $tabs = {
-    a => {
-        title => loc('Settings'),
-        path => 'Prefs/Other.html',
-    },
-    b => {
-        title => loc('About me'),
-        path => 'User/Prefs.html',
-    },
-    f => {
-        title => loc('Search options'),
-        path => 'Prefs/SearchOptions.html',
-    },
-    r => {
-        title => loc('RT at a glance'),
-        path => 'Prefs/MyRT.html',
-    },
-};
-
-# Now let callbacks add their extra tabs
-$m->callback( %ARGS, tabs => $tabs );
-
-foreach my $tab (values %$tabs) {
-    next unless $tab->{'path'} eq $current_tab;
-
-    $tab->{"subtabs"} = $subtabs;
-    $tab->{"current_subtab"} = $current_subtab;
-}
-</%INIT>
-<%ARGS>
-$subtabs => undef
-$current_tab => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>

commit f0ace9be8d0eb691f4ba257631ab66505d0f0882
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 21:24:45 2010 -0400

    Starting to get toward a working SelfService menu

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 5b4f9bd..7e1592b 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -68,8 +68,8 @@ my $query_string = sub {
     return $u->query;
 };
 
-if ( $request_path =~ qr{.*} ) {
-    my $home = Menu->child( home => title => loc('HomePage'), path => '/' );
+if ( $request_path !~ qr{^/SelfService/} ) {
+    my $home = Menu->child( home => title => loc('Home Page'), path => '/' );
     my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
     my $limit      = 7;
 
@@ -310,7 +310,6 @@ if ( $request_path =~ qr{.*} ) {
         $about_me->child( logout => title => loc('Logout'),
                           path   => '/NoAuth/Logout.html' );
     }
-}
 if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
     if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
         my $obj = RT::Dashboard->new( $session{'CurrentUser'} );
@@ -330,6 +329,8 @@ if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
         }
     }
 }
+}
+
 
 if ( $request_path =~ qr'/SelfService' ) {
 
diff --git a/share/html/Prefs/Other.html b/share/html/Prefs/Other.html
index d342e4d..65d3b03 100644
--- a/share/html/Prefs/Other.html
+++ b/share/html/Prefs/Other.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /User/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => 'Prefs/Other.html',
     Title => $title,
 &>
diff --git a/share/html/Prefs/SearchOptions.html b/share/html/Prefs/SearchOptions.html
index dd76c3d..0f6eccd 100644
--- a/share/html/Prefs/SearchOptions.html
+++ b/share/html/Prefs/SearchOptions.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Search Preferences") &>
-<& /User/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => "Prefs/SearchOptions.html",
     Title => loc("Search Preferences")
 &>
diff --git a/share/html/SelfService/Elements/Header b/share/html/SelfService/Elements/Header
index 04276c0..06ea508 100755
--- a/share/html/SelfService/Elements/Header
+++ b/share/html/SelfService/Elements/Header
@@ -46,4 +46,4 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, %ARGS, Prefs => '/SelfService/Prefs.html' &>
-<& /SelfService/Elements/Tabs, %ARGS &>
+<& /Elements/Tabs, %ARGS &>
diff --git a/share/html/Tools/index.html b/share/html/Tools/index.html
index 4003c82..d5472d3 100644
--- a/share/html/Tools/index.html
+++ b/share/html/Tools/index.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Tools") &>
-<& Elements/Tabs, 
-    current_tab => "Tools/index.html", 
+<& /Elements/Tabs,
     Title => loc("Tools") &>
 <& /Elements/ListMenu, items => $tabs &>
 
diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
index 168f69d..6fc78ab 100755
--- a/share/html/User/Prefs.html
+++ b/share/html/User/Prefs.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title=>loc("Preferences") &>
-<& /User/Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => 'User/Prefs.html', 
     Title => loc("Preferences") &>
 
diff --git a/share/html/index.html b/share/html/index.html
index 4b10619..938aaa1 100755
--- a/share/html/index.html
+++ b/share/html/index.html
@@ -77,10 +77,6 @@ If you need commercial support, please contact us at sales at bestpractical.com.
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Tabs, 
     Title          => loc("RT at a glance"),
-    current_tab    => 'index.html',
-    current_toptab => 'index.html',
-    tabs           => $tabs,
-    actions        => $actions,
     &>
 <& /Elements/ListActions, actions => \@results &>    
 <& /Elements/MyRT &>
@@ -133,16 +129,6 @@ if ( $ARGS{'q'} ) {
     RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Search/Simple.html?q=".$m->interp->apply_escapes($ARGS{q}));
 }
 
-my $actions;
-if ($session{'CurrentUser'}->HasRight(Right => 'ModifySelf', Object => $RT::System)) {
-    $actions = {
-        A => { title => loc('Edit'),
-               path  => 'Prefs/MyRT.html',
-             },
-    };
-}
-
-my $tabs = $m->comp("/Elements/DashboardTabs");
 </%init>
 
 %# --></body></html>

commit 67cf291f8ecf7ee3b457a808f07d3c480a828ac8
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 22:21:36 2010 -0400

    Cleanup to the ModifyTemplate html

diff --git a/share/html/Admin/Elements/ModifyTemplate b/share/html/Admin/Elements/ModifyTemplate
index 42a158c..e7dfe3f 100755
--- a/share/html/Admin/Elements/ModifyTemplate
+++ b/share/html/Admin/Elements/ModifyTemplate
@@ -47,38 +47,23 @@
 %# END BPS TAGGED BLOCK }}}
 <table>
 <tr>
-<td align="right">
-<&|/l&>Name</&>:
-</td>
-<td>
-<input name="Name" value="<%$Name%>" size="20" /><br />
-</td>
+<td class="label"><&|/l&>Name</&>:</td>
+<td class="value"><input name="Name" value="<%$Name%>" size="20" /></td>
 </tr>
 <tr>
-<td align="right">
-<&|/l&>Description</&>: 
-</td>
-<td>
-<input name="Description" value="<%$Description%>" size="80" /><br />
-</td>
+<td class="label"><&|/l&>Description</&>:</td>
+<td class="value"><input name="Description" value="<%$Description%>" size="80" /></td>
 </tr>
 <tr>
-<td align="right">
-<&|/l&>Type</&>:
-</td>
-<td>
+<td class="label"><&|/l&>Type</&>:</td>
+<td class="value">
 <input type="radio" name="Type" value="Perl" <% $Type eq "Perl" ? 'checked="checked"' : "" |n %>><&|/l&>Perl</&></input><br />
 <input type="radio" name="Type" value="Simple" <% $Type eq "Simple" ? 'checked="checked"' : "" |n %>><&|/l&>Simple</&></input><br />
 </td>
 </tr>
 <tr>
-<td align="right" valign="top">
-<&|/l&>Content</&>:<br />
-</td>
-<td>
-<textarea name="Content" rows="25" cols="80" wrap="soft">
-<%$Content%></textarea>
-</td>
+<td class="label" valign="top"><&|/l&>Content</&>:</td>
+<td class="value"><textarea name="Content" rows="25" cols="80" wrap="soft"><%$Content%></textarea></td>
 </tr>
 </table>
 

commit b34f72251a7a0b5a6375bde541e65474be2673a5
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 22:22:19 2010 -0400

    undef avoidance

diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index 64d0b1c..73f1668 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -123,8 +123,8 @@ if ($TemplateObj->Id()) {
 
 </%INIT>
 <%ARGS>
-$Queue => undef
-$Template => undef
-$Create => undef
-$Name => undef
+$Queue => ''
+$Template => ''
+$Create => ''
+$Name => ''
 </%ARGS>

commit 3378e361065b2107af8488d76c1f6832a640da89
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 22:22:43 2010 -0400

    further Elements/Tabs fixes

diff --git a/share/html/Approvals/Display.html b/share/html/Approvals/Display.html
index 3765852..1778f45 100755
--- a/share/html/Approvals/Display.html
+++ b/share/html/Approvals/Display.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title =>  $title &>
-
-<& Elements/Tabs, 
-    current_tab => "Approvals/Display.html", 
+<& /Elements/Tabs,
     Title =>  $title &>
 <form method="post" action="<%RT->Config->Get('WebPath')%>/Approvals/index.html">
 
diff --git a/share/html/Tools/Offline.html b/share/html/Tools/Offline.html
index 1515eac..6243b27 100644
--- a/share/html/Tools/Offline.html
+++ b/share/html/Tools/Offline.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Offline upload") &>
-<& Elements/Tabs, 
+<& /Elements/Tabs,
     current_tab => "Tools/Offline.html", 
     Title => loc("Offline edits") &>
 
diff --git a/share/html/Tools/Watching.html b/share/html/Tools/Watching.html
index 4676afd..c355b0e 100644
--- a/share/html/Tools/Watching.html
+++ b/share/html/Tools/Watching.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Watching Queues") &>
-<& Elements/Tabs, 
-    current_tab => "Tools/Watching.html", 
+<& /Elements/Tabs,
     Title => loc("Watching Queues") &>
 
 <%perl>

commit ca23e30b55d626d4cedb4589a779802d61605566
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 22:23:03 2010 -0400

    update to Eleemnts/Tabs, format and titles

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 7e1592b..695660e 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -82,124 +82,83 @@ if ( $request_path !~ qr{^/SelfService/} ) {
     my $position = 0;
 
     if (@dashboards) {
-    my $dashes = Menu()->child('home');
-    for my $dash (@dashboards) {
-        $home->child('dashboard-' . $dash->id,
-                        title => $dash->Name,
-                        path => '/Dashboards/' . $dash->id . '/' . $dash->Name,
-                       );
-    }
-
+        my $dashes = Menu()->child('home');
+        for my $dash (@dashboards) {
+            $home->child( 'dashboard-' . $dash->id, title => $dash->Name,
+                       path => '/Dashboards/' . $dash->id . '/' . $dash->Name,);
+        }
 
-    if ($more) {
-        $dashes->child( title => loc('More...'),
-                              path  => 'Dashboards/index.html',
-                            );
-    }
+        $dashes->child( more => title => loc('More...'), path  => 'Dashboards/index.html' ) if ($more);
     }
 
-
-
-    my $tickets = Menu->child( search => title => loc('Tickets'),
-                               path => '/Search/Build.html' );
-    $tickets->child( simple => title => loc('Simple Search') => path =>
-                     "/Search/Simple.html" );
-    $tickets->child( new => title => loc('New Search') => path =>
-                     "/Search/Build.html?NewQuery=1" );
-    my $new = $tickets->child( create => title => loc('New ticket'),
-                               path => '/Ticket/Create.html' );
+    my $tickets = Menu->child( search => title => loc('Tickets'), path => '/Search/Build.html' );
+    $tickets->child( simple => title => loc('Simple Search') => path => "/Search/Simple.html" );
+    $tickets->child( new => title => loc('New Search') => path => "/Search/Build.html?NewQuery=1" );
+    my $new = $tickets->child( create => title => loc('New ticket'), path => '/Ticket/Create.html' );
 
     my $q = RT::Queues->new( $session{'CurrentUser'} );
     $q->FindAllRows;
+
     while ( my $queue = $q->Next ) {
         next unless $queue->CurrentUserHasRight('CreateTicket');
-        $new->child( $queue->id => title => $queue->Name,
-                     path => '/Ticket/Create.html?Queue=' . $queue->id );
+        $new->child( $queue->id => title => $queue->Name, path => '/Ticket/Create.html?Queue=' . $queue->id );
     }
 
-    my $tools = Menu->child( loc('Tools'), path => '/Tools/index.html' );
-    my $dashes = $tools->child( loc('Dashboards'),
-                                path => '/Dashboards/index.html' );
+    my $tools = Menu->child(  tools => title => loc('Tools'), path => '/Tools/index.html' );
+    my $dashes = $tools->child( dashboards => title => loc('Dashboards'), path => '/Dashboards/index.html' );
 
-    $dashes->child( loc('Select'), path => "/Dashboards/index.html" );
+    $dashes->child( select => title => loc('Select'), path => "/Dashboards/index.html" );
     my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
     if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
-        $dashes->child(
-                loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
+        $dashes->child( loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
     }
 
+    my $reports = $tools->child( reports => title => loc('Reports'), path => '/Tools/Reports/index.html' );
+    $reports->child( loc('Resolved by owner'), path => '/Tools/Reports/ResolvedByOwner.html', );
+    $reports->child( loc('Resolved in date range'), path => '/Tools/Reports/ResolvedByDates.html', );
+    $reports->child( loc('Created in a date range'), path => '/Tools/Reports/CreatedByDates.html', );
 
+    $tools->child( my_day => title => loc('My Day'), path   => '/Tools/MyDay.html' );
 
+    $tools->child( offline => title => loc('Offline'), path    => '/Tools/Offline.html' );
+    $tools->child( watching => title => loc('Watching Queues'), path => '/Tools/Watching.html' );
 
+    if ( $session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
+    {
+        $tools->child( approval => title => loc('Approval'), path     => '/Approvals/' );
+    }
 
+    if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
+    {
+        my $admin = $tools->child( config => title => loc('Configuration'), path   => '/Admin/' );
+        if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) ) {
+            my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', );
+            $users->child( select => title => loc('Select'), path   => "/Admin/Users/" );
+            $users->child( create => title => loc('Create'), path => "/Admin/Users/Modify.html?Create=1" );
+        }
+        my $groups = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
 
-    my $reports = $tools->child( loc('Reports'),
-                                 path => '/Tools/Reports/index.html' );
-    $reports->child( loc('Resolved by owner'),
-                     path => '/Tools/Reports/ResolvedByOwner.html', );
-    $reports->child( loc('Resolved in date range'),
-                     path => '/Tools/Reports/ResolvedByDates.html', );
-    $reports->child( loc('Created in a date range'),
-                     path => '/Tools/Reports/CreatedByDates.html', );
+        $groups->child( select => title => loc('Select'), path => "/Admin/Groups/" );
+        $groups->child( create => title => loc('Create'), path => "/Admin/Groups/Modify.html?Create=1" );
 
-    $tools->child( my_day => title => loc('My Day'), path => '/Tools/MyDay.html' );
+        my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
+        $queues->child( select => title => loc('Select'), path => "/Admin/Queues/" );
+        $queues->child( create => title => loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
 
-    $tools->child( offline => title => loc('Offline'), path => '/Tools/Offline.html');
-    $tools->child( watching => title => loc('Watching Queues'), path => '/Tools/Watching.html');
+        if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) ) {
+            my $cfs = $admin->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/CustomFields/', );
+            $cfs->child( select => title => loc('Select'), path   => "/Admin/CustomFields/" );
+            $cfs->child( create => title => loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
+        }
 
-    if ( $session{'CurrentUser'}
-         ->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
-    {
-        $tools->child( approval => title => loc('Approval'), path => '/Approvals/' );
-    }
+        my $admin_global = $admin->child( global => title => loc('Global'), path   => '/Admin/Global/', );
 
-    if ( $session{'CurrentUser'}
-         ->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
-    {
-        my $admin = $tools->child( config => title => loc('Configuration'),
-                                 path   => '/Admin/' );
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) ) {
-        my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', );
-        $users->child( select => title => loc('Select'), path => "/Admin/Users/" );
-        $users->child( create => title => loc('Create'),
-                       path => "/Admin/Users/Modify.html?Create=1" );
-        }
-        my $groups
-            = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
-
-        $groups->child( loc('Select'), path => "/Admin/Groups/" );
-        $groups->child( loc('Create'),
-                        path => "/Admin/Groups/Modify.html?Create=1" );
-
-        my $queues = $admin->child( queues => title => loc('Queues'),
-                                    path => '/Admin/Queues/', );
-        $queues->child( loc('Select'), path => "/Admin/Queues/" );
-        $queues->child( loc('Create'),
-                        path => "/Admin/Queues/Modify.html?Create=1" );
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField' ) ) {
-        my $cfs = $admin->child(
-                             'custom-fields' => title => loc('Custom Fields'),
-                             path => '/Admin/CustomFields/', );
-        $cfs->child( select => title => loc('Select'),
-                     path   => "/Admin/CustomFields/" );
-        $cfs->child( create => title => loc('Create'),
-                     path => "/Admin/CustomFields/Modify.html?Create=1" );
-    }
-        my $admin_global =
-            $admin->child( global => title => loc('Global'),
-                           path   => '/Admin/Global/', );
-
-        my $scrips = $admin_global->child( loc('Scrips'),
-                                        path => '/Admin/Global/Scrips.html', );
-        $scrips->child( loc('Select'), path => "/Admin/Global/Scrips.html" );
-        $scrips->child( loc('Create'),
-                        path => "/Admin/Global/Scrip.html?Create=1" );
-        my $templates = $admin_global->child( loc('Templates'),
-                                    path => '/Admin/Global/Templates.html', );
-        $templates->child( loc('Select'),
-                           path => "/Admin/Global/Templates.html" );
-        $templates->child( loc('Create'),
-                           path => "/Admin/Global/Template.html?Create=1" );
+        my $scrips = $admin_global->child( scrips => title => loc('Scrips'), path => '/Admin/Global/Scrips.html', );
+        $scrips->child( select => title => loc('Select'), path => "/Admin/Global/Scrips.html" );
+        $scrips->child( create => title => loc('Create'), path => "/Admin/Global/Scrip.html?Create=1" );
+        my $templates = $admin_global->child( loc('Templates'), path => '/Admin/Global/Templates.html', );
+        $templates->child( select => title => loc('Select'), path => "/Admin/Global/Templates.html" );
+        $templates->child( create => title => loc('Create'), path => "/Admin/Global/Template.html?Create=1" );
 
 #        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
 #        {
@@ -208,549 +167,384 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 #            $workflows->child( loc('Mappings')     => path => "/Admin/Global/Workflows/Mappings.html" );
 #        }
 
-        my $cfadmin = $admin_global->child( loc('Custom Fields'),
-                           path => '/Admin/Global/CustomFields/index.html', );
+        my $cfadmin = $admin_global->child( loc('Custom Fields'), path => '/Admin/Global/CustomFields/index.html', );
         {
-            $cfadmin->child( loc('Users') => text =>
-                                 loc('Select custom fields for all users'),
-                             path => '/Admin/Global/CustomFields/Users.html'
-                           );
-
-            $cfadmin->child(
-                          loc('Groups') => text =>
-                              loc('Select custom fields for all user groups'),
-                          path => '/Admin/Global/CustomFields/Groups.html'
-            );
+            $cfadmin->child( users => title => loc('Users') => text => loc('Select custom fields for all users'),
+                             path => '/Admin/Global/CustomFields/Users.html');
 
-            $cfadmin->child( loc('Queues') => text =>
-                                 loc('Select custom fields for all queues'),
-                             path => '/Admin/Global/CustomFields/Queues.html'
-                           );
+            $cfadmin->child( groups => title => loc('Groups') => text => loc('Select custom fields for all user groups'),
+                          path => '/Admin/Global/CustomFields/Groups.html');
 
-            $cfadmin->child(
-                    loc('Tickets') => text =>
-                        loc('Select custom fields for tickets in all queues'),
-                    path => '/Admin/Global/CustomFields/Queue-Tickets.html'
-            );
+            $cfadmin->child( queues => title => loc('Queues') => text => loc('Select custom fields for all queues'),
+                             path => '/Admin/Global/CustomFields/Queues.html');
 
-            $cfadmin->child(
-                loc('Ticket Transactions') => text =>
-                    loc(
-                    'Select custom fields for transactions on tickets in all queues'
-                    ),
-                path => 'Admin/Global/CustomFields/Queue-Transactions.html'
-            );
+            $cfadmin->child( tickets => title => loc('Tickets') => text => loc('Select custom fields for tickets in all queues'),
+                    path => '/Admin/Global/CustomFields/Queue-Tickets.html');
+
+            $cfadmin->child( transactions => title => loc('Ticket Transactions') => text =>
+                    loc( 'Select custom fields for transactions on tickets in all queues'),
+                path => 'Admin/Global/CustomFields/Queue-Transactions.html');
 
         }
 
-        $admin_global->child( loc('Group Rights'),
-                              path => '/Admin/Global/GroupRights.html', );
-        $admin_global->child( loc('User Rights'),
-                              path => '/Admin/Global/UserRights.html', );
-        $admin_global->child( loc('RT at a glance'),
-                              path => '/Admin/Global/MyRT.html', );
-        $admin_global->child( loc('Theme'),
-                              path => '/Admin/Global/Theme.html', );
-
-        my $admin_tools
-            = $admin->child( loc('Tools'), path => '/Admin/Tools/', );
-        $admin_tools->child( loc('System Configuration'),
-                             path => '/Admin/Tools/Configuration.html', );
-        $admin_tools->child( loc('SQL Queries'),
-                             path => '/Admin/Tools/Queries.html', );
-        $admin_tools->child( loc('Shredder'),
-                             path => '/Admin/Tools/Shredder', );
+        $admin_global->child( 'group-rights' => title => loc('Group Rights'), path => '/Admin/Global/GroupRights.html', );
+        $admin_global->child( 'user-rights' => title => loc('User Rights'), path => '/Admin/Global/UserRights.html', );
+        $admin_global->child( 'my-rt' => title => loc('RT at a glance'), path => '/Admin/Global/MyRT.html', );
+        $admin_global->child( theme => title => loc('Theme'), path => '/Admin/Global/Theme.html', );
+
+        my $admin_tools = $admin->child( tools => title => loc('Tools'), path => '/Admin/Tools/', );
+        $admin_tools->child( configuration => title => loc('System Configuration'), path => '/Admin/Tools/Configuration.html', );
+        $admin_tools->child( 'sql-queries' => title => loc('SQL Queries'), path => '/Admin/Tools/Queries.html', );
+        $admin_tools->child( shredder => title => loc('Shredder'), path => '/Admin/Tools/Shredder', );
     }
-    my $about_me = Menu->child(
-                    'preferences' => title =>
-                        loc(
-                        'Logged in as <span class="current-user">[_1]</span>',
-                        $session{'CurrentUser'}->Name
-                        ),
+    my $about_me = Menu->child( 'preferences' => title =>
+                        loc( 'Logged in as <span class="current-user">[_1]</span>', $session{'CurrentUser'}->Name),
                     escape_title => 0,
                     sort_order   => 99
     );
     if ( $session{'CurrentUser'}->UserObj
-         && $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf',
-                                               Object => $RT::System )
-       )
-    {
-        my $settings = $about_me->child( settings => title => loc('Settings'),
-                          path     => '/Prefs/Other.html', );
-        $settings->child( about_me => title => loc('About me'),
-                          path     => '/User/Prefs.html', );
-        $settings->child( search_options => title => loc('Search options'),
-                          path => '/Prefs/SearchOptions.html', );
-        $settings->child( myrt => title => loc('RT at a glance'),
-                          path => '/Prefs/MyRT.html', );
-        $settings->child( quicksearch => title => 'Quick search' => title =>
-                              loc('Quick search'),
-                          path => '/Prefs/Quicksearch.html'
-                        );
-
-        my $search_menu = $settings->child( 'saved-searches' => title => 'Saved Searches');
-        my $searches = [ $m->comp(
-                          "/Search/Elements/SearchesForObject",
+         && $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf', Object => $RT::System )) {
+        my $settings = $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html', );
+        $settings->child( about_me => title => loc('About me'), path     => '/User/Prefs.html', );
+        $settings->child( search_options => title => loc('Search options'), path => '/Prefs/SearchOptions.html', );
+        $settings->child( myrt => title => loc('RT at a glance'), path => '/Prefs/MyRT.html', );
+        $settings->child( quicksearch => title => 'Quick search' => title => loc('Quick search'), path => '/Prefs/Quicksearch.html');
+
+        my $search_menu = $settings->child( 'saved-searches' => title => 'Saved Searches' );
+        my $searches = [ $m->comp( "/Search/Elements/SearchesForObject",
                           Object => RT::System->new( $session{'CurrentUser'} )) ];
         my $i = 0;
+
         for my $search (@$searches) {
-            $search_menu->child( "search-" . $i++,
-                      title => $search->[0],
-                      path  => "/Prefs/Search.html?" . $query_string->(
-                          name => ref( $search->[1] ) . '-' . $search->[1]->Id),
-            );
+            $search_menu->child( "search-" . $i++, title => $search->[0], path  => "/Prefs/Search.html?"
+                          . $query_string->( name => ref( $search->[1] ) . '-' . $search->[1]->Id),);
 
         }
     }
     if ( $session{'CurrentUser'}->Name
          && (   !RT->Config->Get('WebExternalAuth')
-              || RT->Config->Get('WebFallbackToInternalAuth') )
-       )
-    {
-        $about_me->child( logout => title => loc('Logout'),
-                          path   => '/NoAuth/Logout.html' );
+              || RT->Config->Get('WebFallbackToInternalAuth') )) {
+        $about_me->child( logout => title => loc('Logout'), path   => '/NoAuth/Logout.html' );
     }
-if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
-    if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
-        my $obj = RT::Dashboard->new( $session{'CurrentUser'} );
-        $obj->LoadById($id);
-        if ( $obj and $obj->id ) {
-            my $tabs = PageMenu;
-            $tabs->child( basics => title => loc('Basics'),
-                          path => "/Dashboards/Modify.html?id=" . $obj->id );
-            $tabs->child( content => title => loc('Content'),
-                          path => "/Dashboards/Queries.html?id=" . $obj->id );
-            $tabs->child( subscription => title => loc('Subscription'),
-                      path => "/Dashboards/Subscription.html?id=" . $obj->id )
-                if $obj->CurrentUserCanSubscribe;
-            $tabs->child( show => title =>loc('Show'),
-                        path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
+    if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
+        if ( my $id = ( $1 || $m->request_args->{'id'} ) ) {
+            my $obj = RT::Dashboard->new( $session{'CurrentUser'} );
+            $obj->LoadById($id);
+            if ( $obj and $obj->id ) {
+                my $tabs = PageMenu;
+                $tabs->child( basics => title => loc('Basics'), path => "/Dashboards/Modify.html?id=" . $obj->id);
+                $tabs->child(content => title => loc('Content'), path => "/Dashboards/Queries.html?id=" . $obj->id);
+                $tabs->child( subscription => title => loc('Subscription'),
+                        path => "/Dashboards/Subscription.html?id=" . $obj->id
+                ) if $obj->CurrentUserCanSubscribe;
+                $tabs->child( show => title => loc('Show'), path => "/Dashboards/" . $obj->id . "/" . $obj->Name)
 
+            }
         }
     }
-}
-}
+    if ( $request_path =~ qr'Admin/Queues' ) {
+        if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue' ) ) {
+        }
+        if ( my $id = $m->request_args->{'id'} || $m->request_args->{'Queue'} ) {
+            my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
+            $queue_obj->Load($id);
 
+            my $queue = PageMenu();
+            $queue->child( basics => title => loc('Basics'), path => "/Admin/Queues/Modify.html?id=" . $id );
+            $queue->child( people => title => loc('Watchers'), path => "/Admin/Queues/People.html?id=" . $id );
+            my $templates = $queue->child(templates => title => loc('Templates'),
+                              path => "/Admin/Queues/Templates.html?id=" . $id);
 
-if ( $request_path =~ qr'/SelfService' ) {
+            $templates->child(select => title => loc('Select'), path => "/Admin/Queues/Templates.html?id=".$id);
+            $templates->child( create => title => loc('Create'), path => "/Admin/Queues/Template.html?Create=1;Queue=".$id);
 
-    my $queues = RT::Queues->new( $session{'CurrentUser'} );
-    $queues->FindAllRows;
+            my $scrips = $queue->child( scrips => title => loc('Scrips'), path => "/Admin/Queues/Scrips.html?id=" . $id);
 
-    my $queue_count = 0;
-    my $queue_id    = 1;
+            $scrips->child( select => title => loc('Select'), path => "/Admin/Queues/Scrips.html?id=" . $id );
+            $scrips->child( create => title => loc('Create'), path => "/Admin/Queues/Scrip.html?Create=1;Queue=" . $id);
 
-    while ( my $queue = $queues->Next ) {
-        next unless $queue->CurrentUserHasRight('CreateTicket');
-        $queue_id = $queue->id;
-        $queue_count++;
-        last if ( $queue_count > 1 );
-    }
+            my $ticket_cfs = $queue->child( 'ticket-custom-fields' => title => loc('Ticket Custom Fields'),
+                  path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id=' . $id );
 
-    my $TOP = Menu();
+            my $txn_cfs = $queue->child( 'transaction-custom-fields' => title => loc('Transaction Custom Fields'),
+                path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='.$id );
 
-    $TOP->child( open => title => loc('Open tickets'),   path => '/SelfService/', );
-    $TOP->child( closed => title => loc('Closed tickets'), path => '/SelfService/Closed.html', );
-    if ( $queue_count > 1 ) {
-        $TOP->child( new => title => loc('New ticket'),
-                     path => '/SelfService/CreateTicketInQueue.html' );
-    } else {
-        $TOP->child( new => title => loc('New ticket'),
-                     path => '/SelfService/Create.html?queue=' . $queue_id );
+            $queue->child( 'group-rights' => title => loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=".$id );
+            $queue->child( 'user-rights' => title => loc('User Rights'), path => "/Admin/Queues/UserRights.html?id=" . $id );
+        }
     }
+    if ( $request_path =~ qr'/Admin/Users' ) {
+        if ( my $id = $m->request_args->{'id'} ) {
+            my $obj = RT::User->new( $session{'CurrentUser'} );
+            $obj->Load($id);
+            my $tabs = PageMenu->child( 'current' => title => $obj->Name, path => "/Admin/Users/Modify.html?id=" . $id,);
+            $tabs->child( basics => title => loc('Basics'), path => "/Admin/Users/Modify.html?id=" . $id );
+            $tabs->child( memberships => title => loc('Memberships'), path => "/Admin/Users/Memberships.html?id=" . $id );
+            $tabs->child( history => title => loc('History'), path => "/Admin/Users/History.html?id=" . $id );
+            $tabs->child( 'my-rt' => title => loc('RT at a glance'), path => "/Admin/Users/MyRT.html?id=" . $id );
+            if ( RT->Config->Get('GnuPG')->{'enable'} ) {
+                $tabs->child( pgp => title => loc('GnuPG'), path => "/Admin/Users/GnuPG.html?id=" . $id );
+            }
+        }
 
-    if ( $session{'CurrentUser'}
-         ->HasRight( Right => 'ModifySelf', Object => $RT::System ) )
-    {
-        $TOP->child( prefs => title => loc('Preferences'), path => '/SelfService/Prefs.html' );
     }
 
-    # XXX TODO RENDER GOTO TICKET WIDGET
-    Menu->child( goto =>  title => $m->scomp('GotoTicket'), escape_title => 0)
-}
-
-if ( $request_path =~ qr'Admin/Queues' ) {
-    if ( $session{'CurrentUser'}
-         ->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
-    {
-    }
-    if ( my $id = $m->request_args->{'id'} || $m->request_args->{'Queue'} ) {
-        my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
-        $queue_obj->Load($id);
-
-        my $queue = PageMenu();
-        $queue->child( basics => title => loc('Basics'),
-                       path => "/Admin/Queues/Modify.html?id=" . $id );
-        $queue->child( people => title => loc('Watchers'),
-                       path => "/Admin/Queues/People.html?id=" . $id );
-        my $templates = $queue->child(
-                              templates => title => loc('Templates'),
-                              path => "/Admin/Queues/Templates.html?id=" . $id
-        );
-
-        $templates->child( select => title => loc('Select'),
-                           path => "/Admin/Queues/Templates.html?id=" . $id );
-        $templates->child(
-                   create => title => loc('Create'),
-                   path => "/Admin/Queues/Template.html?Create=1;Queue=" . $id
-        );
-
-        my $scrips = $queue->child(
-                                 scrips => title => loc('Scrips'),
-                                 path => "/Admin/Queues/Scrips.html?id=" . $id
-        );
-
-        $scrips->child( select => title => loc('Select'),
-                        path => "/Admin/Queues/Scrips.html?id=" . $id );
-        $scrips->child(
-                      create => title => loc('Create'),
-                      path => "/Admin/Queues/Scrip.html?Create=1;Queue=" . $id
-        );
-
-        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'),
-              path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='
-                  . $id );
-
-        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'),
-            path =>
-                '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='
-                . $id );
-
-        $queue->child( loc('Group Rights'),
-                       path => "/Admin/Queues/GroupRights.html?id=" . $id );
-        $queue->child( loc('User Rights'),
-                       path => "/Admin/Queues/UserRights.html?id=" . $id );
-    }
-}
-    if ( $request_path =~ qr'/Admin/Users' ) {
-    if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::User->new( $session{'CurrentUser'} );
-        $obj->Load($id);
-        my $tabs = PageMenu->child(
-                                 'current' => title => $obj->Name,
-                                 path => "/Admin/Users/Modify.html?id=" . $id,
-        );
-        $tabs->child( basics => title => loc('Basics'),
-                      path => "/Admin/Users/Modify.html?id=" . $id );
-        $tabs->child( memberships => title => loc('Memberships'),
-                      path => "/Admin/Users/Memberships.html?id=" . $id );
-        $tabs->child( history => title => loc('History'),
-                      path => "/Admin/Users/History.html?id=" . $id );
-        $tabs->child( 'my-rt' => title => loc('RT at a glance'),
-                      path => "/Admin/Users/MyRT.html?id=" . $id );
-        if ( RT->Config->Get('GnuPG')->{'enable'} ) {
-            $tabs->child( pgp => title => loc('GnuPG'),
-                          path => "/Admin/Users/GnuPG.html?id=" . $id );
+    if ( $request_path =~ qr'Admin/Groups' ) {
+        if ( my $id = $m->request_args->{'id'} ) {
+            my $obj = RT::Group->new( $session{'CurrentUser'} );
+            $obj->Load($id);
+            if ( $obj->id ) {
+                my $tabs = PageMenu->child( $obj->Name, path => "/Admin/Groups/Modify.html?id=" . $id );
+                $tabs->child( basics => title => loc('Basics') => path => "/Admin/Groups/Modify.html?id=" . $obj->id );
+                $tabs->child( members => title => loc('Members') => path => "/Admin/Groups/Members.html?id=" . $obj->id );
+                $tabs->child( 'group-rights' => title => loc('Group Rights') => path => "/Admin/Groups/GroupRights.html?id=" . $obj->id );
+                $tabs->child( 'user-rights' => title => loc('User Rights') => path => "/Admin/Groups/UserRights.html?id=" . $obj->id );
+                $tabs->child( history => title => loc('History') => path => "/Admin/Groups/History.html?id=" . $obj->id );
+            }
         }
     }
 
-}
+    if ( $request_path =~ qr'Admin/CustomFields/' ) {
 
-if ( $request_path =~ qr'Admin/Groups' ) {
-    if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::Group->new( $session{'CurrentUser'} );
-        $obj->Load($id);
-        if ( $obj->id ) {
-            my $tabs = PageMenu->child( $obj->Name,
-                        path => "/Admin/Groups/Modify.html?id=" . $id );
-            $tabs->child( basics => title =>
-                      loc('Basics') => path => "/Admin/Groups/Modify.html?id="
-                          . $obj->id );
-            $tabs->child( members => title =>
-                    loc('Members') => path => "/Admin/Groups/Members.html?id="
-                        . $obj->id );
-            $tabs->child( 'group-rights' => title =>loc('Group Rights') => path =>
-                          "/Admin/Groups/GroupRights.html?id=" . $obj->id );
-            $tabs->child( 'user-rights' => title => loc('User Rights') => path =>
-                          "/Admin/Groups/UserRights.html?id=" . $obj->id );
-            $tabs->child( history => title =>
-                    loc('History') => path => "/Admin/Groups/History.html?id="
-                        . $obj->id );
-        }
-    }
-}
+        if ( my $id = $m->request_args->{'id'} ) {
+            my $obj = RT::CustomField->new( $session{'CurrentUser'} );
+            $obj->Load($id);
+            my $tabs = PageMenu->child( $obj->Name => path => "/Admin/CustomFields/Modify.html?id=" . $id );
+
+            $tabs->child( basics => title => loc('Basics') => path => "/Admin/CustomFields/Modify.html?id=".$id );
+            $tabs->child( 'group-rights' => title => loc('Group Rights') => path => "/Admin/CustomFields/GroupRights.html?id=" . $id );
+            $tabs->child( 'user-rights' => title => loc('User Rights') => path => "/Admin/CustomFields/UserRights.html?id=" . $id );
+
+            if ( $obj->LookupType =~ /^RT::Queue-/io ) {
+                $tabs->child( 'applies-to' => title => loc('Applies to'), path => "/Admin/CustomFields/Objects.html?id=" . $id );
+            }
 
-if ( $request_path =~ qr'Admin/CustomFields/' ) {
-
-    if ( my $id = $m->request_args->{'id'} ) {
-        my $obj = RT::CustomField->new( $session{'CurrentUser'} );
-        $obj->Load($id);
-        my $tabs = PageMenu->child( $obj->Name,
-                        path => "/Admin/CustomFields/Modify.html?id=" . $id );
-
-        $tabs->child(
-                loc('Basics') => path => "/Admin/CustomFields/Modify.html?id="
-                    . $id );
-        $tabs->child( loc('Group Rights') => path =>
-                      "/Admin/CustomFields/GroupRights.html?id=" . $id );
-        $tabs->child( loc('User Rights') => path =>
-                      "/Admin/CustomFields/UserRights.html?id=" . $id );
-
-        if ( $obj->LookupType =~ /^RT::Queue-/io ) {
-            $tabs->child( loc('Applies to'),
-                       path => "/Admin/CustomFields/Objects.html?id=" . $id );
         }
 
     }
 
-}
+    if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
+        my $search = Menu()->child('search');
+        my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order  => 99 );
+        if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
+            my $id  = $1;
+            my $obj = RT::Ticket->new( $session{'CurrentUser'} );
+            $obj->Load($id);
 
-if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
-    my $search  = Menu()->child('search');
-    my $actions = PageMenu()
-        ->child( transitions => title => loc('Actions'), sort_order => 99 );
-    if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
-        my $id  = $1;
-        my $obj = RT::Ticket->new( $session{'CurrentUser'} );
-        $obj->Load($id);
-
-        my $tabs = PageMenu()
-            ; #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
-        $tabs->child( bookmark => title =>
-                          $m->scomp( '/Ticket/Elements/Bookmark', id => $id ),
+            my $tabs = PageMenu();
+            $tabs->child( bookmark => title => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ),
                       escape_title => 0,
                       link_item    => 0
-                    );
-
-        $tabs->child(
-                 loc('Display') => path => "/Ticket/Display.html?id=" . $id );
-
-        $tabs->child(
-                 loc('History') => path => "/Ticket/History.html?id=" . $id );
-
-        my %can = (
-              ModifyTicket    => $obj->CurrentUserHasRight('ModifyTicket'),
-              Watch    => $obj->CurrentUserHasRight('Watch'),
-              WatchAsAdminCc    => $obj->CurrentUserHasRight('WatchAsAdminCc'),
-              OwnTicket       => $obj->CurrentUserHasRight('OwnTicket'),
-              StealTicket     => $obj->CurrentUserHasRight('StealTicket'),
-              TakeTicket      => $obj->CurrentUserHasRight('TakeTicket'),
-              ReplyToTicket   => $obj->CurrentUserHasRight('ReplyToTicket'),
-              CommentOnTicket => $obj->CurrentUserHasRight('CommentOnTicket'),
-              ModifyCustomField => $obj->CurrentUserHasRight('ModifyCustomField'),
-              _ModifyOwner => (       $obj->CurrentUserHasRight('OwnTicket')
+            );
+
+            $tabs->child( display => title => loc('Display') => path => "/Ticket/Display.html?id=" . $id );
+
+            $tabs->child( history => title => loc('History') => path => "/Ticket/History.html?id=" . $id );
+
+            my %can = (
+                ModifyTicket   => $obj->CurrentUserHasRight('ModifyTicket'),
+                Watch          => $obj->CurrentUserHasRight('Watch'),
+                WatchAsAdminCc => $obj->CurrentUserHasRight('WatchAsAdminCc'),
+                OwnTicket      => $obj->CurrentUserHasRight('OwnTicket'),
+                StealTicket    => $obj->CurrentUserHasRight('StealTicket'),
+                TakeTicket     => $obj->CurrentUserHasRight('TakeTicket'),
+                ReplyToTicket  => $obj->CurrentUserHasRight('ReplyToTicket'),
+                CommentOnTicket => $obj->CurrentUserHasRight('CommentOnTicket'),
+                ModifyCustomField => $obj->CurrentUserHasRight('ModifyCustomField'),
+                _ModifyOwner => (
+                                      $obj->CurrentUserHasRight('OwnTicket')
                                    || $obj->CurrentUserHasRight('TakeTicket')
                                    || $obj->CurrentUserHasRight('StealTicket')
-                              )
-                  );
-        # comment out until we can do it for an individual custom field
-        #if ( $can{ModifyTicket} || $can{ModifyCustomField} ) {
-            $tabs->child( basics => title => loc('Basics'),
-                          path => "/Ticket/Modify.html?id=" . $id, );
-        #}
-
-        if ( $can{ModifyTicket} || $can{_ModifyOwner} ||$can{Watch} ||$can{WatchAsAdminCc}) {
-            $tabs->child( people => title => loc('People'),
-                          path => "/Ticket/ModifyPeople.html?id=" . $id, );
-        }
+                                )
+                      );
 
-        if ( $can{ModifyTicket} ) {
-            $tabs->child( dates => title => loc('Dates'), path => "/Ticket/ModifyDates.html?id=" . $id, );
-            $tabs->child( links => title => loc('Links'), path => "/Ticket/ModifyLinks.html?id=" . $id, );
-        }
+            # comment out until we can do it for an individual custom field
+            #if ( $can{ModifyTicket} || $can{ModifyCustomField} ) {
+            $tabs->child( basics => title => loc('Basics'), path => "/Ticket/Modify.html?id=" . $id, );
 
-        #if (    $can{ModifyTicket} || $can{ModifyCustomField} || $can{_ModifyOwner} ) {
-            $tabs->child( jumbo => title => loc('Jumbo'), path => "/Ticket/ModifyAll.html?id=" . $id, );
-        #}
+            #}
 
-        if ( RT->Config->Get('EnableReminders') ) {
-            $tabs->child( reminders => title => loc('Reminders'), path => "/Ticket/Reminders.html?id=" . $id, );
-        }
+            if ( $can{ModifyTicket} || $can{_ModifyOwner} || $can{Watch} || $can{WatchAsAdminCc} ) {
+                $tabs->child( people => title => loc('People'), path => "/Ticket/ModifyPeople.html?id=" . $id,);
+            }
 
-        if ( $can{'ModifyTicket'} or $can{'ReplyToTicket'} ) {
-            $actions->child(
-                        reply => title => loc('Reply'), path => "/Ticket/Update.html?Action=Respond;id=" . $id,
-            );
-        }
+            if ( $can{ModifyTicket} ) {
+                $tabs->child( dates => title => loc('Dates'), path => "/Ticket/ModifyDates.html?id=" . $id, );
+                $tabs->child( links => title => loc('Links'), path => "/Ticket/ModifyLinks.html?id=" . $id, );
+            }
 
-        if ( $obj->CurrentUserHasRight('ForwardMessage') ) {
-            $actions->child( forward => title => loc('Forward'), path => "/Ticket/Forward.html?id=" . $id, );
-        }
+            #if ( $can{ModifyTicket} || $can{ModifyCustomField} || $can{_ModifyOwner} ) {
+            $tabs->child( jumbo => title => loc('Jumbo'), path => "/Ticket/ModifyAll.html?id=" . $id, );
+            #}
 
-        if ( $can{'ModifyTicket'} ) {
-            my $current = $obj->Status;
-            my $lifecycle  = $obj->QueueObj->lifecycle;
-            my $i       = 1;
-            foreach my $next ( $lifecycle->transitions($current) ) {
-                my $action = $lifecycle->transition_action( $current => $next );
-                next if $action eq 'hide';
-            my $check = $lifecycle->check_right( $current => $next );
-            $can{$check} = $obj->CurrentUserHasRight($check) unless exists $can{$check};
-            next unless $can{$check};
-
-                my $url = '/Ticket/';
-                if ($action) {
-
-                    $url .= "Update.html?"
-                        . $query_string->( Action        => $action,
-                                           DefaultStatus => $next,
-                                           id            => $id
-                                         );
-                } else {
-
-                    $url .= "Display.html?"
-                        . $query_string->( Status => $next, id => $id );
-                }
-                $actions->child(
-                      loc( $lifecycle->transition_label( $current => $next ) ) =>
-                          path => $url );
+            if ( RT->Config->Get('EnableReminders') ) {
+                $tabs->child( reminders => title => loc('Reminders'), path => "/Ticket/Reminders.html?id=" . $id, );
             }
 
-        }
-        if ( $can{OwnTicket} ) {
-            if ( $obj->OwnerObj->Id == RT->Nobody->id
-                 && ( $can{'ModifyTicket'} or $can{'TakeTicket'} ) )
-            {
-                $actions->child(
-                        take => path => "/Ticket/Display.html?Action=Take;id="
-                            . $id,
-                        title => loc('Take')
-                    ),
-                    ;
+            if ( $can{'ModifyTicket'} or $can{'ReplyToTicket'} ) {
+                $actions->child( reply => title => loc('Reply'), path => "/Ticket/Update.html?Action=Respond;id=" . $id,);
+            }
+
+            if ( $obj->CurrentUserHasRight('ForwardMessage') ) {
+                $actions->child( forward => title => loc('Forward'), path => "/Ticket/Forward.html?id=" . $id, );
             }
 
-            elsif (    $obj->OwnerObj->id != RT->Nobody->id
-                    && $obj->OwnerObj->id != $session{CurrentUser}->id
-                    && ( $can{'ModifyTicket'} or $can{'StealTicket'} ) )
-            {
+            if ( $can{'ModifyTicket'} ) {
+                my $current   = $obj->Status;
+                my $lifecycle = $obj->QueueObj->lifecycle;
+                my $i         = 1;
+                foreach my $next ( $lifecycle->transitions($current) ) {
+                    my $action = $lifecycle->transition_action( $current => $next );
+                    next if $action eq 'hide';
+                    my $check = $lifecycle->check_right( $current => $next );
+                    $can{$check} = $obj->CurrentUserHasRight($check) unless exists $can{$check};
+                    next unless $can{$check};
+
+                    my $url = '/Ticket/';
+                    if ($action) {
+
+                        $url .= "Update.html?" . $query_string->(Action => $action,
+                                               DefaultStatus => $next,
+                                               id            => $id);
+                    } else {
+                        $url .= "Display.html?" . $query_string->( Status => $next, id => $id );
+                    }
+                    $actions->child( loc($lifecycle->transition_label( $current => $next )) => path => $url);
+                }
 
-                $actions->child(
-                        steal => title => loc('Steal'),
-                        path => "/Ticket/Display.html?Action=Steal;id=" . $id,
-                );
             }
-        }
+            if ( $can{OwnTicket} ) {
+                if ( $obj->OwnerObj->Id == RT->Nobody->id
+                     && ( $can{'ModifyTicket'} or $can{'TakeTicket'} ) ) {
+                    $actions->child( take => path => "/Ticket/Display.html?Action=Take;id=" . $id, title => loc('Take'));
+                }
 
-        if ( $can{'ModifyTicket'} || $can{'CommentOnTicket'} ) {
-            $actions->child(
-                        comment => title => loc('Comment'),
-                        path => "/Ticket/Update.html?Action=Comment;id=" . $id,
-            );
-        }
+                elsif (    $obj->OwnerObj->id != RT->Nobody->id
+                        && $obj->OwnerObj->id != $session{CurrentUser}->id
+                        && ( $can{'ModifyTicket'} or $can{'StealTicket'} ) ) {
+                    $actions->child( steal => title => loc('Steal'), path => "/Ticket/Display.html?Action=Steal;id=" . $id,);
+                }
+            }
 
-        if ( defined $session{"tickets"} ) {
+            if ( $can{'ModifyTicket'} || $can{'CommentOnTicket'} ) {
+                $actions->child( comment => title => loc('Comment'), path => "/Ticket/Update.html?Action=Comment;id=" . $id);
+            }
 
-            # we have to update session data if we get new ItemMap
-            my $updatesession = 1
-                unless ( $session{"tickets"}->{'item_map'} );
+            if ( defined $session{"tickets"} ) {
+                # we have to update session data if we get new ItemMap
+                my $updatesession = 1 unless ( $session{"tickets"}->{'item_map'} );
 
-            my $item_map = $session{"tickets"}->ItemMap;
+                my $item_map = $session{"tickets"}->ItemMap;
 
-            if ($updatesession) {
-                $session{"tickets"}->PrepForSerialization();
-            }
+                if ($updatesession) {
+                    $session{"tickets"}->PrepForSerialization();
+                }
 
-            # Don't display prev links if we're on the first ticket
-            if ( $item_map->{$id}->{prev} ) {
-                $search->child(
-                       'first',
-                       title => '<< ' . loc('First') => class => "nav",
-                       path => "/Ticket/Display.html?id=" . $item_map->{first}
-                );
-                $search->child(
-                        prev => title => '< ' . loc('Prev') => class => "nav",
-                        path => "/Ticket/Display.html?id="
-                            . $item_map->{$id}->{prev}
-                );
-
-                # Don't display next links if we're on the last ticket
-                if ( $item_map->{$id}->{next} ) {
-                    $search->child(
-                        next => title => loc('next') . ' >' => class => "nav",
-                        path => "/Ticket/Display.html?id="
-                            . $item_map->{$id}->{next}
-                    );
-                    $search->child(
-                        last        => title => loc('Last')
-                            . ' >>' => class => "nav",
-                        path => "/Ticket/Display.html?id=" . $item_map->{last}
-                    );
+                # Don't display prev links if we're on the first ticket
+                if ( $item_map->{$id}->{prev} ) {
+                    $search->child( 'first', title => '<< ' . loc('First') => class => "nav",
+                              path => "/Ticket/Display.html?id=" . $item_map->{first});
+                    $search->child( prev => title => '< ' . loc('Prev') => class => "nav",
+                        path => "/Ticket/Display.html?id=" . $item_map->{$id}->{prev});
+
+                    # Don't display next links if we're on the last ticket
+                    if ( $item_map->{$id}->{next} ) {
+                        $search->child( next       => title => loc('next') . ' >' => class => "nav",
+                                        path => "/Ticket/Display.html?id=" . $item_map->{$id}->{next});
+                        $search->child( last        => title => loc('Last') . ' >>' => class => "nav",
+                                        path => "/Ticket/Display.html?id=" . $item_map->{last});
+                    }
                 }
             }
         }
-    }
-    my $args      = '';
-    my $has_query = '';
-
-    my $current_search = $session{"CurrentSearchHash"} || {};
-    my $search_id
-        = $m->request_args->{'SavedSearchId'}
-        || $search->{'SearchId'}
-        || '';
-
-    $has_query = 1
-        if ( $m->request_args->{'Query'} or $current_search->{'Query'} );
-
-    my %query_args = (
-
-        SavedSearchId => ( $search_id eq 'new' ) ? undef : $search_id,
-    SavedChartSearchId => $m->request_args->{'SavedChartSearchId'} || $current_search->{SavedChartSearchId},
-        Query  => $m->request_args->{'Query'}  || $current_search->{'Query'},
-        Format => $m->request_args->{'Format'} || $current_search->{'Format'},
-        OrderBy => $m->request_args->{'OrderBy'}
-            || $current_search->{'OrderBy'},
-        Order => $m->request_args->{'Order'} || $current_search->{'Order'},
-        Page  => $m->request_args->{'Page'}  || $current_search->{'Page'},
-        RowsPerPage => ( defined $m->request_args->{'RowsPerPage'}
-                         ? $m->request_args->{'RowsPerPage'}
-                         : $current_search->{'RowsPerPage'}
-                       )
-                     );
-    for my $field (qw(Order OrderBy)) {
-        if (ref($query_args{$field}) eq 'ARRAY') {
-        $query_args{$field} = join("|",@{$query_args{$field}});
+        my $args      = '';
+        my $has_query = '';
+        my $current_search = $session{"CurrentSearchHash"} || {};
+        my $search_id = $m->request_args->{'SavedSearchId'} || $search->{'SearchId'} || '';
+
+        $has_query = 1 if ( $m->request_args->{'Query'} or $current_search->{'Query'} );
+
+        my %query_args = (
+            SavedSearchId => ( $search_id eq 'new' ) ? undef : $search_id,
+            SavedChartSearchId => $m->request_args->{'SavedChartSearchId'} || $current_search->{SavedChartSearchId},
+            Query => $m->request_args->{'Query'} || $current_search->{'Query'},
+            Format => $m->request_args->{'Format'} || $current_search->{'Format'},
+            OrderBy => $m->request_args->{'OrderBy'} || $current_search->{'OrderBy'},
+            Order => $m->request_args->{'Order'} || $current_search->{'Order'},
+            Page => $m->request_args->{'Page'} || $current_search->{'Page'},
+            RowsPerPage => ( defined $m->request_args->{'RowsPerPage'}
+                             ? $m->request_args->{'RowsPerPage'}
+                             : $current_search->{'RowsPerPage'})
+                         );
+        for my $field (qw(Order OrderBy)) {
+            if ( ref( $query_args{$field} ) eq 'ARRAY' ) {
+                $query_args{$field} = join( "|", @{ $query_args{$field} } );
+            }
         }
-    }
 
+        $args = "?" . $query_string->(%query_args);
+
+        my $current_search_menu = $search->child( current_search => title => loc('Current Search') );
+        $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 =~ qr|^Search/Results.html|
+                &&                        #XXX TODO better abstraction
+                $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )) {
+                my $shred_args = URI->new->query_param(
+                                      search          => 1,
+                                      plugin          => 'Tickets',
+                                      'Tickets:query' => $query_args{'Query'},
+                                      'Tickets:limit' => $query_args{'Rows'});
+                $current_search_menu->child( 'shredder' => title => loc('Shredder'),
+                                path => 'Admin/Tools/Shredder/?' . $shred_args);
+            }
 
-    $args = "?" . $query_string->(%query_args);
-
-    my $current_search_menu
-        = $search->child( current_search => title => loc('Current Search') );
-    $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 =~ qr|^Search/Results.html|
-            &&                        #XXX TODO better abstraction
-            $session{'CurrentUser'}
-            ->HasRight( Right => 'SuperUser', Object => $RT::System )
-           )
-        {
-            my $shred_args =
-                URI->new->query_param(
-                                 search          => 1,
-                                 plugin          => 'Tickets',
-                                 'Tickets:query' => $query_args{'Query'},
-                                 'Tickets:limit' => $query_args{'Rows'}
-                );
-
-            $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( bulk => title => loc('Bulk Update') => path => "/Search/Bulk.html$args" );
+            $current_search_menu->child( chart => title => loc('Graph'), path => "Search/Chart.html$args");
         }
+    }
+
+    if ( $request_path =~ /^\/(?:index.html|$)/ ) {
+        PageMenu()->child( edit => title => loc('Edit'), path => '/Prefs/MyRT.html' );
+    }
 
-        $current_search_menu->child(
-                            results => title => loc('Show Results') => path =>
-                                "/Search/Results.html$args" );
+}
+
+if ( $request_path =~ qr'/SelfService' ) {
+
+    my $queues = RT::Queues->new( $session{'CurrentUser'} );
+    $queues->FindAllRows;
 
-        $current_search_menu->child(
-                                bulk => title => loc('Bulk Update') => path =>
-                                    "/Search/Bulk.html$args" );
-    $current_search_menu->child( chart => path  => "Search/Chart.html$args", title => loc('Graph'),);
+    my $queue_count = 0;
+    my $queue_id    = 1;
 
+    while ( my $queue = $queues->Next ) {
+        next unless $queue->CurrentUserHasRight('CreateTicket');
+        $queue_id = $queue->id;
+        $queue_count++;
+        last if ( $queue_count > 1 );
     }
 
-}
+    my $TOP = Menu();
 
-if ( $request_path =~ /^\/(?:index.html|$)/ ) {
+    $TOP->child( open => title => loc('Open tickets'), path => '/SelfService/', );
+    $TOP->child( closed => title => loc('Closed tickets'), path => '/SelfService/Closed.html', );
+    if ( $queue_count > 1 ) {
+        $TOP->child( new => title => loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
+    } else {
+        $TOP->child( new => title => loc('New ticket'), path => '/SelfService/Create.html?queue=' . $queue_id );
+    }
 
-    PageMenu()->child(edit => title => loc('Edit'), path => '/Prefs/MyRT.html');
-}
+    if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
+        $TOP->child( prefs => title => loc('Preferences'), path  => '/SelfService/Prefs.html' );
+    }
 
+    # XXX TODO RENDER GOTO TICKET WIDGET
+    Menu->child( goto         => title => $m->scomp('GotoTicket'), escape_title => 0 );
+}
 
 </%INIT>
 <%ARGS>

commit 2ded73d5490149ca993a7ac990922c43c8daa8df
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 22:23:32 2010 -0400

    test fixes

diff --git a/t/web/walk.t b/t/web/walk.t
index dff52ce..3837191 100644
--- a/t/web/walk.t
+++ b/t/web/walk.t
@@ -137,7 +137,7 @@ diag 'walk into /Admin' if $ENV{TEST_VERBOSE};
         $m->follow_link_ok( { text => 'Configuration' }, '-> Configuration' );
         $m->follow_link_ok( { text => 'Global' },        '-> Global' );
 
-        for my $id ( 'group-rights', 'user-rights', 'rt-at-a-glance', 'theme' )
+        for my $id ( 'group-rights', 'user-rights', 'my-rt', 'theme' )
         {
             $m->follow_link_ok( { id => 'tools-config-global-' . $id }, "-> $id" );
         }

commit d57e57147be454d10afcaea77835becf31d62d9e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 23:06:01 2010 -0400

    Remove old "topactions" code

diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 1380940..492fb7e 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -45,12 +45,6 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<div id="topactions">
-% foreach my $action (reverse sort keys %{$topactions}) {
-<span class="topaction" id="topaction-<%$action%>"><% $topactions->{"$action"}->{'html'} |n %></span>
-% }
-</div>
-
 % if ( $show_menu ) {
 <div id="main-navigation"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
 

commit 663704c15b90b47127dbff648388356df62dbc29
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 23:06:42 2010 -0400

    Remove dead code from PageLayout

diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 492fb7e..ac1eaf8 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -69,80 +69,7 @@ jQuery(document).ready(function(){ jQuery("#actions-menu").superfish(); });
 <div id="body">
 % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
 % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
-
-<%INIT>
-if ( defined $current_toptab ) {
-    foreach my $tab ( values %{$toptabs} ) {
-        next unless $tab->{'path'} eq $current_toptab;
-        @{ $tab }{ qw(subtabs current_subtab) } = ($tabs, $current_tab);
-    }
-}
-
-my ($menu_depth, $almost_last, $page_tabs);
-
-# don't pull out the last submenu for 3.5-compat theme
-# see #14853 for details.
-if (RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) ne '3.4-compat') {
-    ($menu_depth, $almost_last) = @{ $m->comp('.menu_recurse', data => $toptabs, current => $current_toptab ) };
-
-    if (defined $almost_last->{subtabs} and %{$almost_last->{subtabs}}) {
-        $page_tabs = {
-            current_toptab => $almost_last->{current_subtab},
-            %{$almost_last->{subtabs}},
-        };
-
-        delete $almost_last->{subtabs};
-        delete $almost_last->{current_subtab};
-    }
-}
-</%INIT>
-
-%# There's probably a better way to do this that involves three times as
-%# much work and redoing the whole menu/tab system... which would seem a
-%# bit out of scope.
-%#
-%# This function recurses through the menu and returns the second to
-%# last menu, that is, the menu holding the last reference to
-%# and submenu.  It also returns the number of menu levels minus
-%# the last submenu.
-<%def .menu_recurse>
-  <%args>
-      $data    => { }
-      $current => ''
-      $pdata   => { }
-      $ppdata  => { }
-      $level   => 0
-  </%args>
-  <%init>
-    if ($current) {
-      for my $key (keys %$data) {
-          next if !defined $data->{$key}->{'path'} 
-                    || $data->{$key}->{'path'} ne $current;
-          next unless    ref( $data->{$key} ) eq 'HASH'
-                      && ref( $data->{$key}->{'subtabs'} ) eq 'HASH'
-                      && keys %{ $data->{$key}->{'subtabs'} };
-          return $m->comp('.menu_recurse',
-              data    => $data->{$key}->{'subtabs'},
-              current => $data->{$key}->{'current_subtab'} || '',
-              pdata   => $data->{$key},
-              ppdata  => $pdata,
-              level   => $level + 1,
-          );
-      }
-    }
-    $ppdata->{last_system_menu_level}++;
-    return [$level, $pdata];
-  </%init>
-</%def>
-
 <%ARGS>
-$current_toptab => undef
-$current_tab => undef
-$toptabs => undef
-$topactions => undef
-$tabs => undef
-$actions => undef
-$subactions => undef
 $title => $m->callers(-1)->path
 $show_menu => 1
 </%ARGS>

commit 8de44de2e2b62a341d2b4ca30bf6feaeebedf101
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 23:07:05 2010 -0400

    remove an old bit of topactions code

diff --git a/share/html/SelfService/Elements/Header b/share/html/SelfService/Elements/Header
index 06ea508..d5f22ef 100755
--- a/share/html/SelfService/Elements/Header
+++ b/share/html/SelfService/Elements/Header
@@ -45,5 +45,5 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, %ARGS, Prefs => '/SelfService/Prefs.html' &>
+<& /Elements/Header &>
 <& /Elements/Tabs, %ARGS &>

commit c1ca10bb96073e6b04a3f127abcff42698fa2323
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 23:36:59 2010 -0400

    reworking how widgets work

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 1c8d276..d2c4d86 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -288,6 +288,7 @@ sub MaybeShowNoAuthPage {
 sub InitializeMenu {
     $HTML::Mason::Commands::m->notes('menu', RT::Interface::Web::Menu->new());
     $HTML::Mason::Commands::m->notes('page-menu', RT::Interface::Web::Menu->new());
+    $HTML::Mason::Commands::m->notes('page-widgets', RT::Interface::Web::Menu->new());
 
 }
 
@@ -828,6 +829,12 @@ sub PageMenu {
     return $HTML::Mason::Commands::m->notes('page-menu');
 }
 
+sub PageWidgets {
+    return $HTML::Mason::Commands::m->notes('page-widgets');
+}
+
+
+
 =head2 loc ARRAY
 
 loc is a nice clean global routine which calls $session{'CurrentUser'}->loc()
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index 08fa385..3975119 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -70,9 +70,6 @@
 % }
 % }
 <%" " x $depth%></ul>\
-<%INIT>
-
-</%INIT>
 <%ARGS>
 $menu
 $id => undef
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index ac1eaf8..c1851aa 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -50,22 +50,14 @@
 
 <div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu', 'parent_id' => 'page' &></div>
 % }
-<div id="widgets"><& /Elements/Widgets &></div>
+% # toplevel 0 disables the superfish js stuff
+<div id="topactions"><& /Elements/WidgetBar, menu => PageWidgets() &></div>
 <script type="text/javascript">
 jQuery(document).ready(function(){ jQuery("#app-nav").superfish(); });
 jQuery(document).ready(function(){ jQuery("#page-menu").superfish(); });
 jQuery(document).ready(function(){ jQuery("#actions-menu").superfish(); });
 </script>
-
-<div id="header">
-<h1><% $title %></h1>
-% my $sep       = 0;
-% my $postsep   = 0;
-% my $count     = 0;
-% my $class     = { };
-% 
-
-</div>
+<div id="header"><h1><% $title %></h1></div>
 <div id="body">
 % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
 % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 695660e..7f24f7e 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -511,6 +511,8 @@ if ( $request_path !~ qr{^/SelfService/} ) {
         PageMenu()->child( edit => title => loc('Edit'), path => '/Prefs/MyRT.html' );
     }
 
+    PageWidgets()->child( simple_search => title => $m->scomp('SimpleSearch'), escape_title => 0 );
+    PageWidgets()->child( create_ticket => title => $m->scomp('CreateTicket'), escape_title => 0 );
 }
 
 if ( $request_path =~ qr'/SelfService' ) {
diff --git a/share/html/Elements/Menu b/share/html/Elements/WidgetBar
old mode 100755
new mode 100644
similarity index 75%
copy from share/html/Elements/Menu
copy to share/html/Elements/WidgetBar
index 08fa385..22c7f7c
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/WidgetBar
@@ -45,38 +45,13 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-
-<%" " x $depth%><ul<%$id ? ' id="'.$id.'"' : '' |n%><% $toplevel? ' class="sf-menu sf-js-enabled sf-shadow"' : '' |n %>>
 % for my $child ($menu->children) {
-%   my $item_id = lc(($parent_id? $parent_id."-" : "") .$child->key);
-%   $item_id =~ s/\s/-/g;
-<%" " x ($depth+1)%><li>\
-% if ($child->link_item) {
-<a id="<%$item_id%>" <% $child->path ? ' href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%>>\
-% }
 % if ($child->escape_title) {
 <%$child->title%>\
 % } else {
 <%$child->title |n%>\
 % }
-% if ($child->link_item) {
-</a>\
-% }
-% if ($child->has_children) {
-<& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key, depth=> ($depth+1) &>
-<%" " x ($depth+1)%></li>
-% } else {
-</li>
-% }
 % }
-<%" " x $depth%></ul>\
-<%INIT>
-
-</%INIT>
 <%ARGS>
 $menu
-$id => undef
-$toplevel => 1
-$parent_id => ''
-$depth => 0
 </%ARGS>
diff --git a/share/html/Elements/Widgets b/share/html/Elements/Widgets
deleted file mode 100644
index 778a846..0000000
--- a/share/html/Elements/Widgets
+++ /dev/null
@@ -1,4 +0,0 @@
-<div id="topactions">
-<& /Elements/SimpleSearch &>
-<& /Elements/CreateTicket &>
-</div>

commit 4a9526be28e22402e8ab48b4f150bd8a9adeee25
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Nov 2 23:53:57 2010 -0400

    Menuing for SelfService

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 7f24f7e..fe19dc8 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -197,11 +197,14 @@ if ( $request_path !~ qr{^/SelfService/} ) {
         $admin_tools->child( 'sql-queries' => title => loc('SQL Queries'), path => '/Admin/Tools/Queries.html', );
         $admin_tools->child( shredder => title => loc('Shredder'), path => '/Admin/Tools/Shredder', );
     }
+
     my $about_me = Menu->child( 'preferences' => title =>
                         loc( 'Logged in as <span class="current-user">[_1]</span>', $session{'CurrentUser'}->Name),
                     escape_title => 0,
                     sort_order   => 99
     );
+
+
     if ( $session{'CurrentUser'}->UserObj
          && $session{'CurrentUser'}->HasRight( Right  => 'ModifySelf', Object => $RT::System )) {
         my $settings = $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html', );
@@ -530,22 +533,34 @@ if ( $request_path =~ qr'/SelfService' ) {
         last if ( $queue_count > 1 );
     }
 
-    my $TOP = Menu();
 
-    $TOP->child( open => title => loc('Open tickets'), path => '/SelfService/', );
-    $TOP->child( closed => title => loc('Closed tickets'), path => '/SelfService/Closed.html', );
+    my $tickets = Menu->child(tickets => title =>loc('Tickets'));
+    $tickets->child( open => title => loc('Open tickets'), path => '/SelfService/', );
+    $tickets->child( closed => title => loc('Closed tickets'), path => '/SelfService/Closed.html', );
     if ( $queue_count > 1 ) {
-        $TOP->child( new => title => loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
+        $tickets->child( new => title => loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
     } else {
-        $TOP->child( new => title => loc('New ticket'), path => '/SelfService/Create.html?queue=' . $queue_id );
+        $tickets->child( new => title => loc('New ticket'), path => '/SelfService/Create.html?queue=' . $queue_id );
     }
 
+
+    my $about_me = Menu->child( 'preferences' => title =>
+                        loc( 'Logged in as <span class="current-user">[_1]</span>', $session{'CurrentUser'}->Name),
+                    escape_title => 0,
+                    sort_order   => 99
+    );
+
     if ( $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System ) ) {
-        $TOP->child( prefs => title => loc('Preferences'), path  => '/SelfService/Prefs.html' );
+        $about_me->child( prefs => title => loc('Preferences'), path  => '/SelfService/Prefs.html' );
+    }
+
+    if ( $session{'CurrentUser'}->Name
+         && (   !RT->Config->Get('WebExternalAuth')
+              || RT->Config->Get('WebFallbackToInternalAuth') )) {
+        $about_me->child( logout => title => loc('Logout'), path   => '/NoAuth/Logout.html' );
     }
 
-    # XXX TODO RENDER GOTO TICKET WIDGET
-    Menu->child( goto         => title => $m->scomp('GotoTicket'), escape_title => 0 );
+    PageWidgets->child( goto         => title => $m->scomp('/SelfService/Elements/GotoTicket'), escape_title => 0 );
 }
 
 </%INIT>
diff --git a/share/html/NoAuth/css/web2/layout.css b/share/html/NoAuth/css/web2/layout.css
index af99a8b..b7e52ac 100644
--- a/share/html/NoAuth/css/web2/layout.css
+++ b/share/html/NoAuth/css/web2/layout.css
@@ -108,7 +108,7 @@ div#body {
 
 }
 
-#topactions #CreateTicketInQueue {
+#topactions #GotoTicket, #topactions #CreateTicketInQueue {
  text-align: right; 
 
 }
diff --git a/share/html/SelfService/Elements/GotoTicket b/share/html/SelfService/Elements/GotoTicket
index 83dfc86..84f631a 100755
--- a/share/html/SelfService/Elements/GotoTicket
+++ b/share/html/SelfService/Elements/GotoTicket
@@ -45,6 +45,6 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form action="<% RT->Config->Get('WebPath') %>/SelfService/Display.html" method="get" id="GotoTicket">
+<form action="<% RT->Config->Get('WebPath') %>/SelfService/Display.html" method="get" id="GotoTicket" name="GotoTicket">
 <input type="submit" class="button" value="<&|/l&>Goto ticket</&>" />&nbsp;<input size="4" name="id" />
 </form>

commit d4128211d05d560e6a441bb8d05cf798942a57b5
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 00:17:56 2010 -0400

    remove a whole bunch of older tabs stuff

diff --git a/share/html/Admin/CustomFields/GroupRights.html b/share/html/Admin/CustomFields/GroupRights.html
index 5c9381f..5645b6d 100644
--- a/share/html/Admin/CustomFields/GroupRights.html
+++ b/share/html/Admin/CustomFields/GroupRights.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    id => $id,
-    current_tab => "Admin/CustomFields/GroupRights.html?id=".$id,
-    Title => $title
-&>
+<& /Elements/Tabs, Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
   <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 263f7e6..7a20ca0 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -48,7 +48,6 @@
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs,
     id => $CustomFieldObj->Id ,
-    current_tab => $current_tab,
     Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
@@ -158,14 +157,12 @@
 my ($title, @results, $Disabled);
 
 my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} );
-my $current_tab = 'Admin/CustomFields/Modify.html';
 
 $m->callback(CallbackName => 'Initial', Pattern => \$Pattern, ARGSRef => \%ARGS);
 
 unless ( $id ) {
     $title = loc("Create a CustomField");
     $id    = 'new';
-    $current_tab .= '?Create=1';
 }
 else {
     if ( $id eq 'new' ) {
@@ -186,7 +183,6 @@ else {
         $CustomFieldObj->Load( $id ) || $m->comp("/Elements/Error", Why => loc('No CustomField') );
         $title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name );
     }
-    $current_tab .= "?id=$id";
 }
 
 if ( $ARGS{'Update'} && $id ne 'new' ) {
diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index e1c9495..e46081f 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    id => $id,
-    current_tab => "Admin/CustomFields/Objects.html?id=".$id,
-    Title => $title
-    &>
+<& /Elements/Tabs, Title => $title &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Admin/CustomFields/UserRights.html b/share/html/Admin/CustomFields/UserRights.html
index 8c916a8..20b56be 100644
--- a/share/html/Admin/CustomFields/UserRights.html
+++ b/share/html/Admin/CustomFields/UserRights.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $id,
-current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
-Title => $title, &>
+<& /Elements/Tabs, Title => $title, &>
 <& /Elements/ListActions, actions => \@results &>
 
   <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
diff --git a/share/html/Admin/CustomFields/index.html b/share/html/Admin/CustomFields/index.html
index 0aa788b..e18e0eb 100644
--- a/share/html/Admin/CustomFields/index.html
+++ b/share/html/Admin/CustomFields/index.html
@@ -47,7 +47,6 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs,
-    current_tab => 'Admin/CustomFields/', 
     Title => $title,
 &>
 
diff --git a/share/html/Admin/Global/GroupRights.html b/share/html/Admin/Global/GroupRights.html
index e8e0d9a..624d83e 100755
--- a/share/html/Admin/Global/GroupRights.html
+++ b/share/html/Admin/Global/GroupRights.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify global group rights') &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Global/GroupRights.html', 
-    Title => loc('Modify global group rights') &>  
+<& /Elements/Tabs, Title => loc('Modify global group rights') &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
@@ -63,5 +61,3 @@ my @results = ProcessACLs(\%ARGS);
 # Principal collections
 my @principals = GetPrincipalsMap($RT::System, qw(System Roles Groups));
 </%INIT>
-<%ARGS>
-</%ARGS>
diff --git a/share/html/Admin/Global/MyRT.html b/share/html/Admin/Global/MyRT.html
index b7a8e77..ebd983b 100644
--- a/share/html/Admin/Global/MyRT.html
+++ b/share/html/Admin/Global/MyRT.html
@@ -47,7 +47,6 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc("RT at a glance") &>
 <& /Elements/Tabs,
-    current_tab => 'Admin/Global/MyRT.html',
     Title => loc("RT at a glance"),
 &>
 
diff --git a/share/html/Admin/Global/Scrip.html b/share/html/Admin/Global/Scrip.html
index 58836b2..1d14074 100755
--- a/share/html/Admin/Global/Scrip.html
+++ b/share/html/Admin/Global/Scrip.html
@@ -46,41 +46,18 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Global/Scrips.html', 
-    current_subtab => $current_subtab, 
-    subtabs => $subtabs, 
-    Title => $title &>
-
+<& /Elements/Tabs, Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 <& /Admin/Elements/EditScrip, title => $title,  %ARGS, id => $id &>
 
 <%init>
-my $subtabs = {
-    A => {
-        title     => loc('Select'),
-        path      => "Admin/Global/Scrips.html",
-    },
-    B => {
-        title     => loc('New'),
-        path      => "Admin/Global/Scrip.html?create=1&Queue=0",
-        separator => 1,
-    },
-};
-
 my ($id, @results) = $m->comp( '/Admin/Elements/EditScrip:Process', %ARGS );
 
-my ($title, $current_subtab);
+my ($title);
 if ( $id ) {
-    $current_subtab = "Admin/Global/Scrip.html?id=$id&Queue=0";
     $title = loc("Modify a scrip that applies to all queues");
-    $subtabs->{"C"} = {
-        title => loc('Scrip #[_1]', $id),
-        path  => "Admin/Global/Scrip.html?id=$id&Queue=0",
-    };
 }
 else {
-    $current_subtab = "Admin/Global/Scrip.html?create=1&Queue=0";
     $title = loc("Add a scrip which will apply to all queues");
 }
 </%init>
diff --git a/share/html/Admin/Global/Scrips.html b/share/html/Admin/Global/Scrips.html
index 39858da..40a3dac 100755
--- a/share/html/Admin/Global/Scrips.html
+++ b/share/html/Admin/Global/Scrips.html
@@ -46,32 +46,13 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Global/Scrips.html', 
-    current_subtab => 'Admin/Global/Scrips.html', 
-    subtabs => $subtabs, 
-    Title => $title &>
+<& /Elements/Tabs, Title => $title &>
 <& /Admin/Elements/EditScrips, title => $title, id => $id, %ARGS &>
 </form>
 <%init>
-
-my $subtabs = {
-		 A => { title => loc('Select'),
-  		     	path => "Admin/Global/Scrips.html",
-			   },
-		 B => { title => loc('Create'),
-  		     	path => "Admin/Global/Scrip.html?create=1&Queue=0",
-			separator => 1,
-			   }
-	      };
 my $title = loc("Modify scrips which apply to all queues");
-
 my (@actions);
-
 </%init>
-
-
-
 <%ARGS>
 $id => 0
 </%ARGS>
diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index 73f1668..c8c7f27 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Global/Templates.html', 
-    current_subtab => $current_subtab, 
-    subtabs => $subtabs, 
-    Title => $title &>
+<& /Elements/Tabs, Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
@@ -75,21 +71,10 @@
 <%INIT>
 
 my $TemplateObj = RT::Template->new($session{'CurrentUser'});
-my  ($title, @results, $current_subtab, $SubmitLabel);
-
-my $subtabs = {
-		 A => { title => loc('Select'),
-  		     	path => "Admin/Global/Templates.html"
-			   },
-		 B => { title => loc('New'),
-  		     	path => "Admin/Global/Template.html?Create=1&Queue=0",
-			separator => 1,
-			   }
-	      };
+my  ($title, @results, $SubmitLabel);
 
 if ($Create) {
   $title = loc("Create a template");
-  $current_subtab = "Admin/Global/Template.html?Create=1&Queue=0";
   $SubmitLabel = loc('Create');
 }
 
@@ -111,10 +96,6 @@ if ($TemplateObj->Id()) {
   my @aresults = UpdateRecordObject( AttributesRef => \@attribs, 
 				     Object => $TemplateObj, 
 				     ARGSRef => \%ARGS);
-  $current_subtab = "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id();
-  $subtabs->{"C"} = { title => loc('Template #[_1]', $TemplateObj->Id()),
-  		     	path => "Admin/Global/Template.html?Queue=0&Template=".$TemplateObj->Id(),
-			};
   push @results, @aresults;
 
   my ($ok, $msg) = $TemplateObj->CompileCheck;
diff --git a/share/html/Admin/Global/Templates.html b/share/html/Admin/Global/Templates.html
index 28a3e7b..13a6940 100755
--- a/share/html/Admin/Global/Templates.html
+++ b/share/html/Admin/Global/Templates.html
@@ -47,31 +47,13 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title, FeedURI => 'templates' &>
 <& /Elements/Tabs,
-    current_tab => 'Admin/Global/Templates.html', 
-    current_subtab => 'Admin/Global/Templates.html', 
-    subtabs => $subtabs, 
     Title => $title &>
 <& /Admin/Elements/EditTemplates, title => $title, %ARGS &>
 </form>
 <%init>
-
-my $subtabs = {
-		 A => { title => loc('Select'),
-  		     	path => "Admin/Global/Templates.html"
-			   },
-		 B => { title => loc('Create'),
-  		     	path => "Admin/Global/Template.html?Create=1&Queue=0",
-			separator => 1,
-			   }
-	      };
 my $title = loc("Modify templates which apply to all queues");
-
 my (@actions);
-
 </%init>
-
-
-
 <%ARGS>
 $id => undef
 </%ARGS>
diff --git a/share/html/Admin/Global/Theme.html b/share/html/Admin/Global/Theme.html
index 5759e77..c1c82a9 100644
--- a/share/html/Admin/Global/Theme.html
+++ b/share/html/Admin/Global/Theme.html
@@ -49,9 +49,7 @@
     Title => loc("Theme"),
     LinkRel => { stylesheet => '/NoAuth/css/farbtastic.css' }
     &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Global/Theme.html', 
-    Title => loc("Theme") &>
+<& /Elements/Tabs, Title => loc("Theme") &>
 <& /Elements/ListActions, actions => \@results &>
 
 <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/farbtastic.js"></script>
diff --git a/share/html/Admin/Global/UserRights.html b/share/html/Admin/Global/UserRights.html
index cc05cdc..3f9d4fb 100755
--- a/share/html/Admin/Global/UserRights.html
+++ b/share/html/Admin/Global/UserRights.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify global user rights') &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Global/UserRights.html',
-    Title => loc('Modify global user rights') &>  
+<& /Elements/Tabs, Title => loc('Modify global user rights') &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
@@ -56,7 +54,6 @@
   <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
 </form>
 <%INIT>
-# Update the acls.
 my @results = ProcessACLs(\%ARGS);
 my @principals = GetPrincipalsMap($RT::System, 'Users');
 </%INIT>
diff --git a/share/html/Admin/Global/index.html b/share/html/Admin/Global/index.html
index 5d7b1b0..c9ddaa2 100755
--- a/share/html/Admin/Global/index.html
+++ b/share/html/Admin/Global/index.html
@@ -45,13 +45,12 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-% $m->callback( %ARGS, tabs => $tabs );
 <& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &>
 <& /Elements/Tabs,
     Title => loc('Admin/Global configuration') &>
-    <& /Elements/ListMenu, items => $tabs &>
+    <& /Elements/ListMenu, items => $items &>
 <%INIT>
-  my $tabs = {
+  my $items = {
                 
                A => { title => loc('Scrips'),
                            text => loc('Modify scrips which apply to all queues'),
diff --git a/share/html/Dashboards/Elements/Tabs b/share/html/Dashboards/Elements/Tabs
deleted file mode 100755
index f951d61..0000000
--- a/share/html/Dashboards/Elements/Tabs
+++ /dev/null
@@ -1,99 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<& /Elements/Tabs,
-    subtabs => $subtabs,
-    current_tab => 'Dashboards/index.html',
-    current_subtab => $current_subtab,
-    actions => $actions,
-    Title => $Title &>
-
-<%INIT>
-my $subtabs;
-my $actions;
-
-if ( $DashboardObj and $DashboardObj->Id ) {
-    my $id   = $DashboardObj->Id;
-    my $name = $DashboardObj->Name;
-
-    my $modify    = "Dashboards/Modify.html?id=$id";
-    my $queries   = "Dashboards/Queries.html?id=$id";
-    my $render    = "Dashboards/$id/$name";
-    my $subscribe = "Dashboards/Subscription.html?DashboardId=$id";
-
-    $subtabs = $m->comp('/Elements/DashboardTabs', CurrentDashboard => $DashboardObj);
-    $current_subtab = $render;
-
-    $actions = {
-        a_Show => { title => loc('Show'), path  => $render, },
-        b_Basics => { title => loc('Basics'), path  => $modify, },
-        c_Queries => { title => loc('Queries'), path  => $queries, },
-        d_Subscription => { title => loc('Subscription'), path  => $subscribe, },
-    };
-
-    delete $actions->{"d_Subscription"} unless $DashboardObj->CurrentUserCanSubscribe;
-}
-else {
-    $subtabs->{"a_Select"} = { title => loc('Select'), path  => "Dashboards/index.html", };
-
-    my $dashboard = RT::Dashboard->new($session{'CurrentUser'});
-    my @objects = $dashboard->ObjectsForCreating;
-
-    if (@objects) {
-        $subtabs->{"b_Create"} = {
-            title     => loc('New'),
-            path      => "Dashboards/Modify.html?Create=1",
-            separator => 1,
-        };
-    }
-}
-</%INIT>
-<%ARGS>
-$DashboardObj => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index 326580e..33324fa 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -54,7 +54,6 @@
 
 % if ($Preview) {
 <& /Elements/Tabs,
-    current_subtab => $current_subtab,
     Title => $title,
     DashboardObj => $DashboardObj &>
 % }
@@ -90,7 +89,6 @@
 
 <%INIT>
 
-my $current_subtab = 'Dashboards/Render.html?id=' . $id;
 
 use RT::Dashboard;
 my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'});
diff --git a/share/html/Dashboards/index.html b/share/html/Dashboards/index.html
index 7b18f58..adb27c8 100644
--- a/share/html/Dashboards/index.html
+++ b/share/html/Dashboards/index.html
@@ -47,7 +47,6 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
 <& /Elements/Tabs,
-    current_subtab => 'Dashboards/index.html',
     Title => $title &>
 
 <& /Elements/ListActions, actions => \@actions &>

commit 327ddff0a160a1eb5723200bafd0883492195282
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 00:21:23 2010 -0400

    clean up older tab calls

diff --git a/share/html/Admin/CustomFields/GroupRights.html b/share/html/Admin/CustomFields/GroupRights.html
index 5645b6d..ee85364 100644
--- a/share/html/Admin/CustomFields/GroupRights.html
+++ b/share/html/Admin/CustomFields/GroupRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
   <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index e46081f..ab9a509 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Admin/CustomFields/UserRights.html b/share/html/Admin/CustomFields/UserRights.html
index 20b56be..48afc73 100644
--- a/share/html/Admin/CustomFields/UserRights.html
+++ b/share/html/Admin/CustomFields/UserRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title, &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
   <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
diff --git a/share/html/Admin/Elements/ObjectCustomFields b/share/html/Admin/Elements/ObjectCustomFields
index 6b305ca..92402e4 100644
--- a/share/html/Admin/Elements/ObjectCustomFields
+++ b/share/html/Admin/Elements/ObjectCustomFields
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &>
 <%INIT>
diff --git a/share/html/Admin/Global/CustomFields/index.html b/share/html/Admin/Global/CustomFields/index.html
index e020085..80f5da1 100644
--- a/share/html/Admin/Global/CustomFields/index.html
+++ b/share/html/Admin/Global/CustomFields/index.html
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 % $m->callback( %ARGS, tabs => $tabs );
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 
 <ul>
 % foreach my $key (sort keys %$tabs) {
diff --git a/share/html/Admin/Global/GroupRights.html b/share/html/Admin/Global/GroupRights.html
index 624d83e..fb8bd1b 100755
--- a/share/html/Admin/Global/GroupRights.html
+++ b/share/html/Admin/Global/GroupRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify global group rights') &>
-<& /Elements/Tabs, Title => loc('Modify global group rights') &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
diff --git a/share/html/Admin/Global/Scrip.html b/share/html/Admin/Global/Scrip.html
index 1d14074..93ad265 100755
--- a/share/html/Admin/Global/Scrip.html
+++ b/share/html/Admin/Global/Scrip.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 <& /Admin/Elements/EditScrip, title => $title,  %ARGS, id => $id &>
 
diff --git a/share/html/Admin/Global/Scrips.html b/share/html/Admin/Global/Scrips.html
index 40a3dac..baafe50 100755
--- a/share/html/Admin/Global/Scrips.html
+++ b/share/html/Admin/Global/Scrips.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 <& /Admin/Elements/EditScrips, title => $title, id => $id, %ARGS &>
 </form>
 <%init>
diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index c8c7f27..a5fb3a1 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
diff --git a/share/html/Admin/Global/Theme.html b/share/html/Admin/Global/Theme.html
index c1c82a9..c3894c1 100644
--- a/share/html/Admin/Global/Theme.html
+++ b/share/html/Admin/Global/Theme.html
@@ -49,7 +49,7 @@
     Title => loc("Theme"),
     LinkRel => { stylesheet => '/NoAuth/css/farbtastic.css' }
     &>
-<& /Elements/Tabs, Title => loc("Theme") &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/farbtastic.js"></script>
diff --git a/share/html/Admin/Global/UserRights.html b/share/html/Admin/Global/UserRights.html
index 3f9d4fb..85410ba 100755
--- a/share/html/Admin/Global/UserRights.html
+++ b/share/html/Admin/Global/UserRights.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify global user rights') &>
-<& /Elements/Tabs, Title => loc('Modify global user rights') &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
diff --git a/share/html/Approvals/index.html b/share/html/Approvals/index.html
index 30a5816..36c7a3b 100755
--- a/share/html/Approvals/index.html
+++ b/share/html/Approvals/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("My approvals") &>
-<& /Elements/Tabs, Title => loc("My approvals") &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@actions &>
 <form method="post" name="Approvals" id="Approvals">
diff --git a/share/html/Elements/Error b/share/html/Elements/Error
index 4c2c0ac..c11b01a 100755
--- a/share/html/Elements/Error
+++ b/share/html/Elements/Error
@@ -49,7 +49,7 @@
 
 % unless ($SuppressHeader) {
 <& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &>
-<& /Elements/Tabs, Title => $Title &>
+<& /Elements/Tabs &>
 % }
 
 <div class="error">
diff --git a/share/html/SelfService/Elements/Header b/share/html/SelfService/Elements/Header
index d5f22ef..a2f8845 100755
--- a/share/html/SelfService/Elements/Header
+++ b/share/html/SelfService/Elements/Header
@@ -46,4 +46,4 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header &>
-<& /Elements/Tabs, %ARGS &>
+<& /Elements/Tabs &>
diff --git a/share/html/Tools/MyDay.html b/share/html/Tools/MyDay.html
index 3bd305b..87e840e 100644
--- a/share/html/Tools/MyDay.html
+++ b/share/html/Tools/MyDay.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs, current_tab => "Tools/MyDay.html", Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Tools/Reports/CreatedByDates.html b/share/html/Tools/Reports/CreatedByDates.html
index b21b8c6..3b446a2 100644
--- a/share/html/Tools/Reports/CreatedByDates.html
+++ b/share/html/Tools/Reports/CreatedByDates.html
@@ -71,7 +71,7 @@ if ($CreatedBefore) {
 $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs, current_tab => 'Tools/Reports/CreatedByDates.html', Title => $title &>
+<& /Elements/Tabs &>
 <form method="post" action="CreatedByDates.html">
 % if ($Queue|| $CreatedBefore ||$CreatedAfter) {
 % # if we have a queue, do the search
diff --git a/share/html/Tools/Reports/ResolvedByDates.html b/share/html/Tools/Reports/ResolvedByDates.html
index aca9a87..2c9e992 100644
--- a/share/html/Tools/Reports/ResolvedByDates.html
+++ b/share/html/Tools/Reports/ResolvedByDates.html
@@ -71,7 +71,7 @@ if ($ResolvedBefore) {
 $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs, current_tab => 'Tools/Reports/ResolvedByDates.html', Title => $title &>
+<& /Elements/Tabs &>
 <form method="post" action="ResolvedByDates.html">
 % if ($Queue|| $ResolvedBefore ||$ResolvedAfter) {
 % # if we have a queue, do the search
diff --git a/share/html/Tools/Reports/ResolvedByOwner.html b/share/html/Tools/Reports/ResolvedByOwner.html
index 3733a26..77447ab 100644
--- a/share/html/Tools/Reports/ResolvedByOwner.html
+++ b/share/html/Tools/Reports/ResolvedByOwner.html
@@ -54,7 +54,7 @@ my $q = RT::Queue->new($session{'CurrentUser'});
 $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs, current_tab => '/Tools/Reports/ResolvedByOwner.html', Title => $title &>
+<& /Elements/Tabs &>
 <form method="post" action="ResolvedByOwner.html">
 % if ($Queue) {
 % # if we have a queue, do the search
diff --git a/share/html/Tools/Reports/index.html b/share/html/Tools/Reports/index.html
index 6677bfd..c219a6f 100644
--- a/share/html/Tools/Reports/index.html
+++ b/share/html/Tools/Reports/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Reports') &>
-<& /Elements/Tabs, Title => loc('Reports') &>
+<& /Elements/Tabs &>
 <& /Elements/ListMenu, items => $tabs &>
 
 % $m->callback;
diff --git a/share/html/dhandler b/share/html/dhandler
index eb4fd1a..40504e9 100644
--- a/share/html/dhandler
+++ b/share/html/dhandler
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title=>loc("Page not found")&>
-<& /Elements/Tabs, Title=>loc("Page not found"), &>
+<& /Elements/Tabs &>
 <h1><&|/l&>The page you requested could not be found</&></h1>
 <&|/l&>Please check the URL and try again.</&>
 <%init>

commit 3f3525a4705733b0e27d08cb031a989366a0495e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 12:24:52 2010 -0400

    Removing may arguments to Tabs calls

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 7a20ca0..cecedc5 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    id => $CustomFieldObj->Id ,
-    Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 
diff --git a/share/html/Admin/CustomFields/index.html b/share/html/Admin/CustomFields/index.html
index e18e0eb..e385b97 100644
--- a/share/html/Admin/CustomFields/index.html
+++ b/share/html/Admin/CustomFields/index.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    Title => $title,
-&>
+<& /Elements/Tabs &>
 
 % my $tmp = RT::CustomField->new( $session{'CurrentUser'} );
 % if ( $Type ) {
diff --git a/share/html/Admin/Global/CustomFields/Groups.html b/share/html/Admin/Global/CustomFields/Groups.html
index 0e05b14..815e0b4 100644
--- a/share/html/Admin/Global/CustomFields/Groups.html
+++ b/share/html/Admin/Global/CustomFields/Groups.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Admin/Global/CustomFields/Groups.html",
-    current_subtab => "Admin/Global/CustomFields/Groups.html",
-    Title => $title
+<& /Elements/Tabs
     &>
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Group', Object=> $object &>
 <%INIT>
diff --git a/share/html/Admin/Global/CustomFields/Queue-Tickets.html b/share/html/Admin/Global/CustomFields/Queue-Tickets.html
index 01e3a55..1838d0a 100755
--- a/share/html/Admin/Global/CustomFields/Queue-Tickets.html
+++ b/share/html/Admin/Global/CustomFields/Queue-Tickets.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Admin/Global/CustomFields/Queue-Tickets.html",
-    current_subtab => "Admin/Global/CustomFields/Queue-Tickets.html",
-    Title => $title
+<& /Elements/Tabs
     &>
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket' &>
 <%INIT>
diff --git a/share/html/Admin/Global/CustomFields/Queue-Transactions.html b/share/html/Admin/Global/CustomFields/Queue-Transactions.html
index 0789b65..160d7ca 100755
--- a/share/html/Admin/Global/CustomFields/Queue-Transactions.html
+++ b/share/html/Admin/Global/CustomFields/Queue-Transactions.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Admin/Global/CustomFields/Queue-Transactions.html",
-    current_subtab => "Admin/Global/CustomFields/Queue-Transactions.html",
-    Title => $title
+<& /Elements/Tabs
     &>
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket-RT::Transaction' &>
 <%INIT>
diff --git a/share/html/Admin/Global/CustomFields/Queues.html b/share/html/Admin/Global/CustomFields/Queues.html
index 029e25f..b3d8a92 100644
--- a/share/html/Admin/Global/CustomFields/Queues.html
+++ b/share/html/Admin/Global/CustomFields/Queues.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Admin/Global/CustomFields/Queues.html",
-    current_subtab => "Admin/Global/CustomFields/Queues.html",
-    Title => $title
+<& /Elements/Tabs
     &>
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object &>
 <%INIT>
diff --git a/share/html/Admin/Global/CustomFields/Users.html b/share/html/Admin/Global/CustomFields/Users.html
index a035dc7..33972e5 100644
--- a/share/html/Admin/Global/CustomFields/Users.html
+++ b/share/html/Admin/Global/CustomFields/Users.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Admin/Global/CustomFields/Users.html",
-    current_subtab => "Admin/Global/CustomFields/Users.html",
-    Title => $title
+<& /Elements/Tabs
     &>
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::User', Object=> $object &>
 <%INIT>
diff --git a/share/html/Admin/Global/MyRT.html b/share/html/Admin/Global/MyRT.html
index ebd983b..2f67984 100644
--- a/share/html/Admin/Global/MyRT.html
+++ b/share/html/Admin/Global/MyRT.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc("RT at a glance") &>
-<& /Elements/Tabs,
-    Title => loc("RT at a glance"),
-&>
+<& /Elements/Tabs &>
 
 <& /Widgets/SelectionBox:header, nojs => 1 &>
 
diff --git a/share/html/Admin/Global/Templates.html b/share/html/Admin/Global/Templates.html
index 13a6940..81c14a8 100755
--- a/share/html/Admin/Global/Templates.html
+++ b/share/html/Admin/Global/Templates.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title, FeedURI => 'templates' &>
-<& /Elements/Tabs,
-    Title => $title &>
+<& /Elements/Tabs &>
 <& /Admin/Elements/EditTemplates, title => $title, %ARGS &>
 </form>
 <%init>
diff --git a/share/html/Admin/Global/index.html b/share/html/Admin/Global/index.html
index c9ddaa2..f7667cf 100755
--- a/share/html/Admin/Global/index.html
+++ b/share/html/Admin/Global/index.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &>
-<& /Elements/Tabs,
-    Title => loc('Admin/Global configuration') &>
+<& /Elements/Tabs &>
     <& /Elements/ListMenu, items => $items &>
 <%INIT>
   my $items = {
diff --git a/share/html/Admin/Groups/GroupRights.html b/share/html/Admin/Groups/GroupRights.html
index 66d35c9..8e99ec8 100755
--- a/share/html/Admin/Groups/GroupRights.html
+++ b/share/html/Admin/Groups/GroupRights.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
-<& /Elements/Tabs,
-    GroupObj => $GroupObj, 
-    current_tab => 'Admin/Groups/GroupRights.html?id='.$id, 
-    Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
   <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
diff --git a/share/html/Admin/Groups/History.html b/share/html/Admin/Groups/History.html
index f49595b..aff02a0 100644
--- a/share/html/Admin/Groups/History.html
+++ b/share/html/Admin/Groups/History.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id => $id, 
-    GroupObj => $GroupObj,
-    current_subtab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Ticket/Elements/ShowHistory,
     Ticket => $GroupObj,
diff --git a/share/html/Admin/Groups/Members.html b/share/html/Admin/Groups/Members.html
index 73a6125..6793d79 100755
--- a/share/html/Admin/Groups/Members.html
+++ b/share/html/Admin/Groups/Members.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, GroupObj => $Group,
-    current_tab => 'Admin/Groups/Members.html?id='.$id, 
-    Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<% RT->Config->Get('WebPath') %>/Admin/Groups/Members.html" method="post">
diff --git a/share/html/Admin/Groups/Modify.html b/share/html/Admin/Groups/Modify.html
index 4539d75..25fed4e 100755
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -47,10 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
 
-<& /Elements/Tabs,
-    GroupObj => $Group, 
-    current_tab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 
diff --git a/share/html/Admin/Groups/UserRights.html b/share/html/Admin/Groups/UserRights.html
index 2a36551..c547b32 100755
--- a/share/html/Admin/Groups/UserRights.html
+++ b/share/html/Admin/Groups/UserRights.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
-<& /Elements/Tabs,
-    GroupObj => $GroupObj, 
-    current_tab => 'Admin/Groups/UserRights.html?id='.$id, 
-    Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>  
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
   <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
diff --git a/share/html/Admin/Groups/index.html b/share/html/Admin/Groups/index.html
index 616df41..34d8f98 100755
--- a/share/html/Admin/Groups/index.html
+++ b/share/html/Admin/Groups/index.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, current_tab => 'Admin/Groups/',
-    current_subtab => 'Admin/Groups/', 
-    Title => $title &>
+<& /Elements/Tabs &>
 <% $caption %>:<br />
 
 % unless ( $Groups->Count ) {
diff --git a/share/html/Admin/Queues/CustomField.html b/share/html/Admin/Queues/CustomField.html
index cd8859f..37616c6 100755
--- a/share/html/Admin/Queues/CustomField.html
+++ b/share/html/Admin/Queues/CustomField.html
@@ -46,12 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $QueueObj->Id,
-    QueueObj => $QueueObj,                                                      
-    current_tab => 'Admin/Queues/CustomFields.html?id='.$QueueObj->id, 
-    current_subtab => $current_subtab, 
-    subtabs => $subtabs, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
 
diff --git a/share/html/Admin/Queues/CustomFields.html b/share/html/Admin/Queues/CustomFields.html
index a52354d..2975cce 100755
--- a/share/html/Admin/Queues/CustomFields.html
+++ b/share/html/Admin/Queues/CustomFields.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<&    /Elements/Tabs,
-    id => $Object->id, 
-    QueueObj => $Object,
-    Title => $title
+<&    /Elements/Tabs
     &>
 
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::Queue' &>
diff --git a/share/html/Admin/Queues/GroupRights.html b/share/html/Admin/Queues/GroupRights.html
index 268a743..99900f9 100755
--- a/share/html/Admin/Queues/GroupRights.html
+++ b/share/html/Admin/Queues/GroupRights.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
-<& /Elements/Tabs, id => $id,
-    QueueObj => $QueueObj,
-    current_tab => $current_tab, 
-    Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="GroupRights.html" id="ModifyGroupRights" name="ModifyGroupRights">
diff --git a/share/html/Admin/Queues/History.html b/share/html/Admin/Queues/History.html
index b6983bc..4b8c43b 100644
--- a/share/html/Admin/Queues/History.html
+++ b/share/html/Admin/Queues/History.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id => $id, 
-    QueueObj => $QueueObj,
-    current_subtab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Ticket/Elements/ShowHistory,
     Ticket => $QueueObj,
diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index 2774147..4ff4e4a 100755
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $QueueObj->id,
-    QueueObj => $QueueObj,
-    current_tab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 
diff --git a/share/html/Admin/Queues/People.html b/share/html/Admin/Queues/People.html
index c3e4141..ce16729 100755
--- a/share/html/Admin/Queues/People.html
+++ b/share/html/Admin/Queues/People.html
@@ -47,9 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
 
-<& /Elements/Tabs, id => $id,
-    QueueObj => $QueueObj,                                                      
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Admin/Queues/Scrip.html b/share/html/Admin/Queues/Scrip.html
index fb522ef..151befb 100755
--- a/share/html/Admin/Queues/Scrip.html
+++ b/share/html/Admin/Queues/Scrip.html
@@ -46,12 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $QueueObj->Id,
-    QueueObj => $QueueObj,
-    current_tab => 'Admin/Queues/Scrips.html?id='.$QueueObj->id,
-    current_subtab => $current_subtab,
-    subtabs => $subtabs,
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 <& /Admin/Elements/EditScrip, title => $title,  %ARGS, id => $id &>
diff --git a/share/html/Admin/Queues/Scrips.html b/share/html/Admin/Queues/Scrips.html
index 1e55752..2515ee0 100755
--- a/share/html/Admin/Queues/Scrips.html
+++ b/share/html/Admin/Queues/Scrips.html
@@ -46,12 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $QueueObj->id,
-    QueueObj => $QueueObj,                                                      
-    current_tab => 'Admin/Queues/Scrips.html?id='.$id, 
-    current_subtab => 'Admin/Queues/Scrips.html?id='.$id, 
-    subtabs => $subtabs, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 % unless ( $QueueObj->Disabled ) { # Global scrips does not apply to disabled queues
 <h2><&|/l&>Scrips which apply to all queues</&></h2>
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index 147ac89..5e4c9dd 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $Queue,
-    QueueObj => $QueueObj,
-     Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
diff --git a/share/html/Admin/Queues/Templates.html b/share/html/Admin/Queues/Templates.html
index 4b37a8a..4637afb 100755
--- a/share/html/Admin/Queues/Templates.html
+++ b/share/html/Admin/Queues/Templates.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs, id => $QueueObj->id,
-        QueueObj => $QueueObj,
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Admin/Elements/EditTemplates, title => $title, %ARGS &>
 
diff --git a/share/html/Admin/Queues/UserRights.html b/share/html/Admin/Queues/UserRights.html
index 387249b..d7e2d96 100755
--- a/share/html/Admin/Queues/UserRights.html
+++ b/share/html/Admin/Queues/UserRights.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
-<& /Elements/Tabs, id => $id,
-    QueueObj => $QueueObj,
-    current_tab => $current_tab, 
-    Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights">
diff --git a/share/html/Admin/Queues/index.html b/share/html/Admin/Queues/index.html
index 4315bc9..986bf0e 100755
--- a/share/html/Admin/Queues/index.html
+++ b/share/html/Admin/Queues/index.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc("Admin queues") &>
-<& /Elements/Tabs, current_tab => 'Admin/Queues/',
-    current_subtab => 'Admin/Queues/', 
-    Title => loc("Admin queues") &>
+<& /Elements/Tabs &>
 
 
 
diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index 740cd60..14e1fcf 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -53,10 +53,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 }
 </%init>
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Tools/Configuration.html',
-    current_subtab => 'Admin/Tools/Configuration.html', 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <&|/Widgets/TitleBox, title => loc("RT Configuration") &>
 <table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html
index d322105..0fc60ff 100644
--- a/share/html/Admin/Tools/Queries.html
+++ b/share/html/Admin/Tools/Queries.html
@@ -52,10 +52,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 }
 </%init>
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Tools/Queries.html',
-    current_subtab => 'Admin/Tools/Queries.html', 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <&|/Widgets/TitleBox, title => loc('SQL Queries') &>
 % my $history = $RT::Handle->QueryHistory;
diff --git a/share/html/Admin/Tools/Shredder/Elements/Error/NoRights b/share/html/Admin/Tools/Shredder/Elements/Error/NoRights
index f09ca87..5b74bf0 100644
--- a/share/html/Admin/Tools/Shredder/Elements/Error/NoRights
+++ b/share/html/Admin/Tools/Shredder/Elements/Error/NoRights
@@ -46,10 +46,6 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => 'Error' &>
-<& /Elements/Tabs,
-	current_tab => 'Admin/Tools/Shredder',
-	current_subtab => 'Admin/Tools/Shredder',
-	Title => 'Error',
-&>
+<& /Elements/Tabs &>
 <div class="error"><% loc("You don't have <b>SuperUser</b> right.") |n%></div>
 
diff --git a/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage b/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage
index cb274b5..7d5bcd5 100644
--- a/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage
+++ b/share/html/Admin/Tools/Shredder/Elements/Error/NoStorage
@@ -49,11 +49,7 @@
 $Path => ''
 </%ARGS>
 <& /Admin/Elements/Header, Title => 'Error' &>
-<& /Elements/Tabs,
-	current_tab => 'Admin/Tools/Shredder',
-	current_subtab => 'Admin/Tools/Shredder',
-	Title => 'Error',
-&>
+<& /Elements/Tabs &>
 <div class="error">
 <% loc('Shredder needs a directory to write dumps to. Please check that you have <span class="file-path">[_1]</span> and it is writable by your web server.',  $m->interp->apply_escapes( $Path ) ) |n%>
 </div>
diff --git a/share/html/Admin/Tools/Shredder/index.html b/share/html/Admin/Tools/Shredder/index.html
index 84a4cc5..62dfc49 100644
--- a/share/html/Admin/Tools/Shredder/index.html
+++ b/share/html/Admin/Tools/Shredder/index.html
@@ -52,11 +52,7 @@ $Wipeout => ''
 @WipeoutObject => ()
 </%ARGS>
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Tools/Shredder',
-    current_subtab => 'Admin/Tools/Shredder',
-    Title => $title,
-&>
+<& /Elements/Tabs &>
 <form id="shredder-search-form" action="<% RT->Config->Get('WebPath') %>/Admin/Tools/Shredder/" method="GET">
 <div id="shredder-select-plugin">
 <& /Elements/ListActions, actions => $messages{'Errors'} &>
diff --git a/share/html/Admin/Tools/index.html b/share/html/Admin/Tools/index.html
index c3fc31a..8b696b6 100644
--- a/share/html/Admin/Tools/index.html
+++ b/share/html/Admin/Tools/index.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Admin/Tools/index.html',
-    current_subtab => 'Admin/Tools/Configuration.html', 
-    Title => $title &>
+<& /Elements/Tabs &>
 <& /Elements/ListMenu, items => $tabs &>
 <%init>
 my $title = loc('System Tools');
diff --git a/share/html/Admin/Users/CustomFields.html b/share/html/Admin/Users/CustomFields.html
index f8c2da7..3ebe36b 100644
--- a/share/html/Admin/Users/CustomFields.html
+++ b/share/html/Admin/Users/CustomFields.html
@@ -46,12 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title &>
-<&    /Elements/Tabs,
-    id => $Object->id, 
-    current_tab => "Admin/Users/CustomFields.html?$id=".$id, 
-    current_subtab => "Admin/Users/CustomFields.html?id=".$id, 
-    UserObj => $Object,
-    Title => $title
+<&    /Elements/Tabs
     &>
 
     <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::User' &>
diff --git a/share/html/Admin/Users/GnuPG.html b/share/html/Admin/Users/GnuPG.html
index 4ca3798..c8b37c3 100644
--- a/share/html/Admin/Users/GnuPG.html
+++ b/share/html/Admin/Users/GnuPG.html
@@ -46,12 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id          => $id, 
-    UserObj     => $UserObj,
-    current_tab => 'Admin/Users/GnuPG.html?id='. $id,
-    Title       => $title,
-&>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Admin/Users/History.html b/share/html/Admin/Users/History.html
index 9bc45a5..4e7d998 100644
--- a/share/html/Admin/Users/History.html
+++ b/share/html/Admin/Users/History.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id => $id, 
-    UserObj => $UserObj,
-    current_tab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Ticket/Elements/ShowHistory,
     Ticket => $UserObj,
diff --git a/share/html/Admin/Users/Memberships.html b/share/html/Admin/Users/Memberships.html
index 736718a..32c0fb2 100644
--- a/share/html/Admin/Users/Memberships.html
+++ b/share/html/Admin/Users/Memberships.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id => $id, 
-    UserObj => $UserObj,
-    current_tab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index 76bbac4..704e3f9 100755
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id => $id, 
-    UserObj => $UserObj,
-    current_tab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Admin/Users/MyRT.html b/share/html/Admin/Users/MyRT.html
index 207d076..8fd098b 100644
--- a/share/html/Admin/Users/MyRT.html
+++ b/share/html/Admin/Users/MyRT.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => $title  &>
-<& /Elements/Tabs,
-    id => $id, 
-    UserObj => $UserObj,
-    current_tab => $current_tab, 
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Widgets/SelectionBox:header, nojs => 1 &>
 
diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
index 53856d4..e5ce42d 100755
--- a/share/html/Admin/Users/index.html
+++ b/share/html/Admin/Users/index.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Select a user') &>
-<& /Elements/Tabs, current_tab => 'Admin/Users/',
-    current_subtab => 'Admin/Users/',
-    Title => loc('Select a user') &>
+<& /Elements/Tabs &>
     
 <h1><% $caption %></h1>
 
diff --git a/share/html/Admin/index.html b/share/html/Admin/index.html
index 01e9bd7..9973439 100755
--- a/share/html/Admin/index.html
+++ b/share/html/Admin/index.html
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& //Admin/Elements/Header, Title => loc('RT Administration') &>
-<& //Elements/Tabs, Title => loc('RT Administration') &>
+<& //Elements/Tabs &>
 
 <& /Elements/ListMenu, items => $tabs &>
 <%init>
diff --git a/share/html/Approvals/Display.html b/share/html/Approvals/Display.html
index 1778f45..ba2ed6d 100755
--- a/share/html/Approvals/Display.html
+++ b/share/html/Approvals/Display.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title =>  $title &>
-<& /Elements/Tabs,
-    Title =>  $title &>
+<& /Elements/Tabs &>
 <form method="post" action="<%RT->Config->Get('WebPath')%>/Approvals/index.html">
 
 <&| /Widgets/TitleBox, title => $title &>
diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index d13ff1a..1a21a42 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    Title => $title,
-    $Create ? () : (DashboardObj => $Dashboard),
-&>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<%RT->Config->Get('WebPath')%>/Dashboards/Modify.html" method="post" enctype="multipart/form-data" name="ModifyDashboard" id="ModifyDashboard">
diff --git a/share/html/Dashboards/Queries.html b/share/html/Dashboards/Queries.html
index 3538ab9..6577b23 100644
--- a/share/html/Dashboards/Queries.html
+++ b/share/html/Dashboards/Queries.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_subtab => $current_subtab,
-    Title => $title,
-    DashboardObj => $Dashboard &>
+<& /Elements/Tabs &>
 
 <& /Widgets/SelectionBox:header, nojs => 1 &>
 
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index 33324fa..74bcaca 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -53,9 +53,7 @@
 &>
 
 % if ($Preview) {
-<& /Elements/Tabs,
-    Title => $title,
-    DashboardObj => $DashboardObj &>
+<& /Elements/Tabs &>
 % }
 
 % $m->callback(CallbackName => 'BeforeTable', Dashboard => $DashboardObj, show_cb => $show_cb);
diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index 4bff45e..cc90ac7 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    Title => $title,
-    DashboardObj => $DashboardObj &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Dashboards/index.html b/share/html/Dashboards/index.html
index adb27c8..74c3342 100644
--- a/share/html/Dashboards/index.html
+++ b/share/html/Dashboards/index.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    Title => $title &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@actions &>
 
diff --git a/share/html/Prefs/MyRT.html b/share/html/Prefs/MyRT.html
index 6cd6dbe..9639c5e 100644
--- a/share/html/Prefs/MyRT.html
+++ b/share/html/Prefs/MyRT.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/MyRT.html',
-    Title => $title,
-    Searches => \@sys_searches
+<& /Elements/Tabs
 &>
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Prefs/Other.html b/share/html/Prefs/Other.html
index 65d3b03..3045f70 100644
--- a/share/html/Prefs/Other.html
+++ b/share/html/Prefs/Other.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/Other.html',
-    Title => $title,
-&>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post" action="Other.html" name="ModifyPreferences" id="ModifyPreferences">
diff --git a/share/html/Prefs/Quicksearch.html b/share/html/Prefs/Quicksearch.html
index 44744fc..497a82a 100644
--- a/share/html/Prefs/Quicksearch.html
+++ b/share/html/Prefs/Quicksearch.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/MyRT.html',
-    current_subtab => 'Prefs/Quicksearch.html',
-    Title => $title
+<& /Elements/Tabs
 &>
 <& /Elements/ListActions, actions => \@actions &>
 <h1><&|/l&>Select queues to be displayed on the "RT at a glance" page</&></h1>
diff --git a/share/html/Prefs/Search.html b/share/html/Prefs/Search.html
index a8baf4c..7ff9d29 100644
--- a/share/html/Prefs/Search.html
+++ b/share/html/Prefs/Search.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/MyRT.html',
-#    current_subtab => 'Prefs/Search.html?name='.$m->comp('/Elements/QueryString', name => $ARGS{name}),
-    current_subtab => 'Prefs/Search.html?name='.$ARGS{name},
-    Title => $title
+<& /Elements/Tabs
 &>
 <& /Elements/ListActions, actions => \@actions &>
 % if ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
diff --git a/share/html/Prefs/SearchOptions.html b/share/html/Prefs/SearchOptions.html
index 0f6eccd..1b1ba34 100644
--- a/share/html/Prefs/SearchOptions.html
+++ b/share/html/Prefs/SearchOptions.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Search Preferences") &>
-<& /Elements/Tabs,
-    current_tab => "Prefs/SearchOptions.html",
-    Title => loc("Search Preferences")
-&>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@actions &>
 
 <form method="post" action="SearchOptions.html">
diff --git a/share/html/Search/Build.html b/share/html/Search/Build.html
index 2eed704..5a47b74 100644
--- a/share/html/Search/Build.html
+++ b/share/html/Search/Build.html
@@ -66,13 +66,7 @@
 %#   action does quote it (this breaks SQLite).
 %#
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Search/Build.html?".$QueryString, 
-    Title => $title,
-    %query,
-    SavedSearchId => $saved_search{'Id'},
-    SavedChartSearchId => $ARGS{SavedChartSearchId},
-&>
+<& /Elements/Tabs &>
 
 <form method="post" action="Build.html" name="BuildQuery" id="BuildQuery">
 <input type="hidden" class="hidden" name="SavedSearchId" value="<% $saved_search{'Id'} %>" />
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index 63e2203..a7e722b 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -46,17 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_tab => "Search/Bulk.html",
-    Title => $title,
-    Format => $ARGS{'Format'}, # we don't want the locally modified one
-    Query => $Query,
-    Rows => $Rows,
-    OrderBy => $OrderBy,
-    Order => $Order,
-    SavedSearchId => $SavedSearchId,
-    SavedChartSearchId => $SavedChartSearchId,
-    &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 <form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data" name="BulkUpdate" id="BulkUpdate">
diff --git a/share/html/Search/Chart.html b/share/html/Search/Chart.html
index 96c81a3..478bef7 100644
--- a/share/html/Search/Chart.html
+++ b/share/html/Search/Chart.html
@@ -80,8 +80,7 @@ my @actions = $m->comp( '/Widgets/SavedSearch:process', args => \%ARGS, self =>
 
 </%init>
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs, Title => $title, Query => $ARGS{Query},
-    SavedChartSearchId => $saved_search->{SearchId} &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@actions &>
 <& /Search/Elements/Chart, %ARGS &>
 
diff --git a/share/html/Search/Edit.html b/share/html/Search/Edit.html
index d2f1e3d..a799347 100755
--- a/share/html/Search/Edit.html
+++ b/share/html/Search/Edit.html
@@ -46,17 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title&>
-<& /Elements/Tabs,
-    current_tab => "Search/Edit.html?".$QueryString, 
-    Title   => $title,
-    Format  => $Format,
-    Query   => $Query,
-    Rows    => $Rows,
-    OrderBy => $OrderBy,
-    Order   => $Order,
-    SavedSearchId => $SavedSearchId,
-    SavedChartSearchId => $SavedChartSearchId,
-&>
+<& /Elements/Tabs &>
 
 <& Elements/NewListActions, actions => \@actions &>
 
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index de38525..41325a7 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -49,17 +49,7 @@
     Refresh => $session{'tickets_refresh_interval'} || RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} ),
     RSSAutoDiscovery => $RSSFeedURL,
     LinkRel => \%link_rel &>
-<& /Elements/Tabs,
-    current_tab => "Search/Results.html".$QueryString, 
-    Title => $title,
-    Format => $Format,
-    Query => $Query,
-    Rows => $Rows,
-    OrderBy => $OrderBy,
-    Order => $Order,
-    SavedSearchId => $SavedSearchId,
-    SavedChartSearchId => $SavedChartSearchId,
-    &>
+<& /Elements/Tabs &>
 <& /Elements/CollectionList, 
     Query => $Query,
     AllowSorting => 1,
diff --git a/share/html/Search/Simple.html b/share/html/Search/Simple.html
index 43c101b..f3c92b2 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    current_toptab => "Search/Simple.html",
-    current_tab => "Search/Simple.html",
-    Title => $title
+<& /Elements/Tabs
 &>
 
 % $m->callback( %ARGS, CallbackName => 'PreForm' );
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index d624e74..c136839 100755
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -48,10 +48,7 @@
 <& /Elements/Header,
     Title => $title,
     onload => "function () { hide('Ticket-Create-details') }" &>
-<& /Elements/Tabs, 
-    current_toptab => "Ticket/Create.html", 
-    Title => $title,
-    actions => $actions &>
+<& /Elements/Tabs &>
     
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 2dc8eba..03db6da 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -48,10 +48,7 @@
 <& /Elements/Header, 
     Title => $title,
     LinkRel => \%link_rel &>
-<& /Elements/Tabs,
-    Ticket => $TicketObj, 
-    current_tab => 'Ticket/Display.html?id='.$TicketObj->id,
-    Title => $title &>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@Actions, ARGSRef => \%ARGS, Ticket => $TicketObj);
 
diff --git a/share/html/Ticket/Forward.html b/share/html/Ticket/Forward.html
index 19403a3..2fed21d 100644
--- a/share/html/Ticket/Forward.html
+++ b/share/html/Ticket/Forward.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $Title &>
-<& /Elements/Tabs,
-    Ticket => $TicketObj, 
-    Title  => $Title,
-&>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Ticket/GnuPG.html b/share/html/Ticket/GnuPG.html
index 8c55175..9d5f8e9 100644
--- a/share/html/Ticket/GnuPG.html
+++ b/share/html/Ticket/GnuPG.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    Ticket => $txn->TicketObj,
-    current_tab => 'Ticket/Encrypt.html?id='. $id,
-    Title => $title,
-&>
+<& /Elements/Tabs &>
 
 % $m->callback( CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS );
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Ticket/Graphs/index.html b/share/html/Ticket/Graphs/index.html
index 3e8f190..41a8a38 100644
--- a/share/html/Ticket/Graphs/index.html
+++ b/share/html/Ticket/Graphs/index.html
@@ -46,11 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Elements/Tabs,
-    Ticket => $ticket,
-    Title => $title,
-    current_tab => "Ticket/ModifyLinks.html?id=$id",
-&>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Ticket/History.html b/share/html/Ticket/History.html
index 128b4f5..287aaaa 100755
--- a/share/html/Ticket/History.html
+++ b/share/html/Ticket/History.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Elements/Tabs,
-    Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id, 
-    Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
+<& /Elements/Tabs &>
 
 % $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'BeforeActionList' );
 
diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
index 644d303..0b26038 100755
--- a/share/html/Ticket/Modify.html
+++ b/share/html/Ticket/Modify.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
-<& /Elements/Tabs,
-    Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id, 
-    Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
 
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index f20fe39..5697d69 100755
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Elements/Tabs,
-    Ticket => $Ticket, 
-    current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id, 
-    Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Ticket/ModifyDates.html b/share/html/Ticket/ModifyDates.html
index f6a7159..7e30cf8 100755
--- a/share/html/Ticket/ModifyDates.html
+++ b/share/html/Ticket/ModifyDates.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &>
-<& /Elements/Tabs,
-    Ticket => $TicketObj, 
-    current_tab => "Ticket/ModifyDates.html?id=".$TicketObj->Id, 
-    Title => loc('Modify dates for #[_1]', $TicketObj->Id) &> 
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Ticket/ModifyLinks.html b/share/html/Ticket/ModifyLinks.html
index 7acfaff..f410356 100755
--- a/share/html/Ticket/ModifyLinks.html
+++ b/share/html/Ticket/ModifyLinks.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &>
-<& /Elements/Tabs,
-    Ticket => $Ticket, 
-    current_tab => "Ticket/ModifyLinks.html?id=".$Ticket->Id, 
-    Title => loc("Link ticket #[_1]", $Ticket->Id) &>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Ticket/ModifyPeople.html b/share/html/Ticket/ModifyPeople.html
index 8b1f94d..5c6844e 100755
--- a/share/html/Ticket/ModifyPeople.html
+++ b/share/html/Ticket/ModifyPeople.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
-<& /Elements/Tabs,
-    Ticket => $Ticket, 
-    current_tab => "Ticket/ModifyPeople.html?id=".$Ticket->Id, 
-    Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Ticket/Reminders.html b/share/html/Ticket/Reminders.html
index 5158ce0..64fef40 100755
--- a/share/html/Ticket/Reminders.html
+++ b/share/html/Ticket/Reminders.html
@@ -46,10 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Reminder ticket #[_1]", $Ticket->Id) &>
-<& /Elements/Tabs,
-    Ticket => $Ticket, 
-    current_tab => "Ticket/Reminders.html?id=".$Ticket->Id, 
-    Title => loc("Reminders for ticket #[_1]", $Ticket->Id) &>
+<& /Elements/Tabs &>
     
 % $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $Ticket);
     
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 7b9464f..7063ac2 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title  => $title &>
-<& /Elements/Tabs,
-    Ticket => $TicketObj,
-    Title => $title &>
+<& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $TicketObj);
 <& /Elements/ListActions, actions => \@results &>
diff --git a/share/html/Tools/Offline.html b/share/html/Tools/Offline.html
index 6243b27..d723a4b 100644
--- a/share/html/Tools/Offline.html
+++ b/share/html/Tools/Offline.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Offline upload") &>
-<& /Elements/Tabs,
-    current_tab => "Tools/Offline.html", 
-    Title => loc("Offline edits") &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/Tools/Watching.html b/share/html/Tools/Watching.html
index c355b0e..e2507e9 100644
--- a/share/html/Tools/Watching.html
+++ b/share/html/Tools/Watching.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Watching Queues") &>
-<& /Elements/Tabs,
-    Title => loc("Watching Queues") &>
+<& /Elements/Tabs &>
 
 <%perl>
 my $count = 0;
diff --git a/share/html/Tools/index.html b/share/html/Tools/index.html
index d5472d3..4d8c480 100644
--- a/share/html/Tools/index.html
+++ b/share/html/Tools/index.html
@@ -46,8 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Tools") &>
-<& /Elements/Tabs,
-    Title => loc("Tools") &>
+<& /Elements/Tabs &>
 <& /Elements/ListMenu, items => $tabs &>
 
 <%init>
diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
index 6fc78ab..d1c5a43 100755
--- a/share/html/User/Prefs.html
+++ b/share/html/User/Prefs.html
@@ -46,9 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title=>loc("Preferences") &>
-<& /Elements/Tabs,
-    current_tab => 'User/Prefs.html', 
-    Title => loc("Preferences") &>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 
diff --git a/share/html/index.html b/share/html/index.html
index 938aaa1..f0bd103 100755
--- a/share/html/index.html
+++ b/share/html/index.html
@@ -75,9 +75,7 @@ If you need commercial support, please contact us at sales at bestpractical.com.
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Tabs, 
-    Title          => loc("RT at a glance"),
-    &>
+<& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>    
 <& /Elements/MyRT &>
 <%init>

commit 9d1d2368bf656e0e60b424099f7a8e15d80978ba
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 12:51:34 2010 -0400

    Move display of Title to Header

diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index a6f6e39..71e936c 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -89,7 +89,7 @@
   <& /Elements/PersonalQuickbar, %ARGS &>
 </div>
 % }
-
+<div id="header"><h1><% $Title %></h1></div>
 <%INIT>
 $r->headers_out->{'Pragma'} = 'no-cache';
 $r->headers_out->{'Cache-control'} = 'no-cache';
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index c1851aa..b85ecb5 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -47,17 +47,14 @@
 %# END BPS TAGGED BLOCK }}}
 % if ( $show_menu ) {
 <div id="main-navigation"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
-
 <div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu', 'parent_id' => 'page' &></div>
 % }
-% # toplevel 0 disables the superfish js stuff
 <div id="topactions"><& /Elements/WidgetBar, menu => PageWidgets() &></div>
 <script type="text/javascript">
 jQuery(document).ready(function(){ jQuery("#app-nav").superfish(); });
 jQuery(document).ready(function(){ jQuery("#page-menu").superfish(); });
 jQuery(document).ready(function(){ jQuery("#actions-menu").superfish(); });
 </script>
-<div id="header"><h1><% $title %></h1></div>
 <div id="body">
 % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
 % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index fe19dc8..1364cb5 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -45,17 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/PageLayout,
-    current_toptab => $current_toptab,
-    current_tab => $current_tab,
-    toptabs => $toptabs,
-    topactions => $topactions,
-    tabs => $tabs,
-    actions => $actions,
-    subactions => $subactions,
-    title => $Title,
-    show_menu => $show_menu,
-&>
+<& /Elements/PageLayout, show_menu => $show_menu &>
 <a name="skipnav" id="skipnav" accesskey="8"></a>
 <%INIT>
 
@@ -565,13 +555,5 @@ if ( $request_path =~ qr'/SelfService' ) {
 
 </%INIT>
 <%ARGS>
-$current_toptab => undef
-$current_tab => undef
-$toptabs => undef
-$topactions => undef
-$tabs => undef
-$actions => undef
-$subactions => undef
-$Title => undef
 $show_menu => 1
 </%ARGS>

commit 9ea9b24c72bf97ae0c2e294074069c94cafb7f63
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 12:58:08 2010 -0400

    Fix case errors that prevented Open and Home from being correctly localized

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 647db67..814a70a 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1985,7 +1985,7 @@ Use the following format to define labels and actions of transitions:
     default => {
         ...
         actions => {
-            'new -> open'     => ['Open It', 'Respond'],
+            'new -> open'     => ['Open it', 'Respond'],
             'new -> resolved' => ['Resolve', 'Comment'],
             'new -> rejected' => ['Reject',  'Respond'],
             'new -> deleted'  => ['Delete',  ''],
@@ -1995,7 +1995,7 @@ Use the following format to define labels and actions of transitions:
             'open -> rejected' => ['Reject',  'Respond'],
             'open -> deleted'  => ['Delete',  'hide'],
 
-            'stalled -> open'  => ['Open It',  ''],
+            'stalled -> open'  => ['Open it',  ''],
             'resolved -> open' => ['Re-open',  'Comment'],
             'rejected -> open' => ['Re-open',  'Comment'],
             'deleted -> open'  => ['Undelete', ''],
@@ -2046,7 +2046,7 @@ Set(%Lifecycles,
         actions => {
 
             # 'from -> to'    => [action text, Respond/Comment/hide/''],
-            'new -> open'     => [ 'Open It', 'Respond' ],
+            'new -> open'     => [ 'Open it', 'Respond' ],
             'new -> resolved' => [ 'Resolve', 'Comment' ],
             'new -> rejected' => [ 'Reject',  'Respond' ],
             'new -> deleted'  => [ 'Delete',  '' ],
@@ -2056,7 +2056,7 @@ Set(%Lifecycles,
             'open -> rejected' => [ 'Reject',  'Respond' ],
             'open -> deleted'  => [ 'Delete',  'hide' ],
 
-            'stalled -> open'  => [ 'Open It',  '' ],
+            'stalled -> open'  => [ 'Open it',  '' ],
             'resolved -> open' => [ 'Re-open',  'Comment' ],
             'rejected -> open' => [ 'Re-open',  'Comment' ],
             'deleted -> open'  => [ 'Undelete', '' ],
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 1364cb5..7a1dcce 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -59,7 +59,7 @@ my $query_string = sub {
 };
 
 if ( $request_path !~ qr{^/SelfService/} ) {
-    my $home = Menu->child( home => title => loc('Home Page'), path => '/' );
+    my $home = Menu->child( home => title => loc('Homepage'), path => '/' );
     my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
     my $limit      = 7;
 

commit a959d5990ea663aa3ba7aa8829b81f2970a5ddf9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 13:03:11 2010 -0400

    tweaks to page nav

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 7a1dcce..172aaf8 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -327,7 +327,8 @@ if ( $request_path !~ qr{^/SelfService/} ) {
             my $tabs = PageMenu();
             $tabs->child( bookmark => title => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ),
                       escape_title => 0,
-                      link_item    => 0
+                      link_item    => 0,
+                sort_order => 99
             );
 
             $tabs->child( display => title => loc('Display') => path => "/Ticket/Display.html?id=" . $id );
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index ed1103a..b927ae7 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -55,10 +55,11 @@
 
 #page-navigation {
     position: absolute;
-    top: 5.4em;
+    top: 6.6em;
     right: 0em;
     left: auto;
     z-index: 9995;
+    font-size: 0.8em;
 }
 .sf-menu {
     width: 100%;

commit fea124279e5e7a3513dc54d7b521687f5d41e0bf
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 13:17:58 2010 -0400

    small cleanups to search nav

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 172aaf8..2583cf4 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -316,8 +316,7 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
     }
 
-    if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
-        my $search = Menu()->child('search');
+    if ( $request_path =~ qr'Ticket/' ) {
         my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order  => 99 );
         if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
             my $id  = $1;
@@ -434,23 +433,26 @@ if ( $request_path !~ qr{^/SelfService/} ) {
                     $session{"tickets"}->PrepForSerialization();
                 }
 
+                my $search = Menu()->child('search');
                 # Don't display prev links if we're on the first ticket
                 if ( $item_map->{$id}->{prev} ) {
                     $search->child( 'first', title => '<< ' . loc('First') => class => "nav",
                               path => "/Ticket/Display.html?id=" . $item_map->{first});
                     $search->child( prev => title => '< ' . loc('Prev') => class => "nav",
                         path => "/Ticket/Display.html?id=" . $item_map->{$id}->{prev});
-
+                }
                     # Don't display next links if we're on the last ticket
                     if ( $item_map->{$id}->{next} ) {
-                        $search->child( next       => title => loc('next') . ' >' => class => "nav",
+                        $search->child( next       => title => loc('Next') . ' >' => class => "nav",
                                         path => "/Ticket/Display.html?id=" . $item_map->{$id}->{next});
                         $search->child( last        => title => loc('Last') . ' >>' => class => "nav",
                                         path => "/Ticket/Display.html?id=" . $item_map->{last});
-                    }
                 }
             }
         }
+    }
+    if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
+        my $search = Menu()->child('search');
         my $args      = '';
         my $has_query = '';
         my $current_search = $session{"CurrentSearchHash"} || {};
@@ -478,7 +480,7 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
         $args = "?" . $query_string->(%query_args);
 
-        my $current_search_menu = $search->child( current_search => title => loc('Current Search') );
+        my $current_search_menu = $search->child( current_search => title => loc('Current Search'), link_item => 1 );
         $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" );
@@ -497,7 +499,7 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
             $current_search_menu->child( results => title => loc('Show Results') => path => "/Search/Results.html$args" );
             $current_search_menu->child( bulk => title => loc('Bulk Update') => path => "/Search/Bulk.html$args" );
-            $current_search_menu->child( chart => title => loc('Graph'), path => "Search/Chart.html$args");
+            $current_search_menu->child( chart => title => loc('Graph'), path => "/Search/Chart.html$args");
         }
     }
 

commit 8c1290522de79469bbf01de492898858a0d2568a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 13:28:42 2010 -0400

    removed the now-redundant chart widget at the bottom of the search
    results page

diff --git a/share/html/Search/Elements/ResultViews b/share/html/Search/Elements/ResultViews
index 98f987e..04237da 100644
--- a/share/html/Search/Elements/ResultViews
+++ b/share/html/Search/Elements/ResultViews
@@ -64,14 +64,6 @@ $ShortQueryString => undef
 % # Now let callbacks add their extra tools
 % $m->callback( %ARGS, CallbackName => 'AfterTools' );
 </ul>
-<form method="get" action="<%RT->Config->Get('WebPath')%>/Search/Chart.html">
-% my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order);
-% foreach my $key (keys(%hiddens)) {
-<input type="hidden" class="hidden" name="<%$key%>" value="<%defined($hiddens{$key})?$hiddens{$key}:''%>" />
-% }
-<&|/l, $m->scomp('SelectChartType', Name => 'ChartStyle'), $m->scomp('SelectGroupBy', Name => 'PrimaryGroupBy', Query => $Query) 
-&>[_1] chart by [_2]</&><input type="submit" class="button" value="<%loc('Go')%>" />
-</form>
 <%init>
 my $ical_path = join '/', map $m->interp->apply_escapes($_, 'u'),
     $session{'CurrentUser'}->UserObj->Name,

commit 30e921c39eefc4dc125c81a23e87421fb92b715f
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 13:56:44 2010 -0400

    finish overhauling search navigation

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 2583cf4..d434326 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -84,15 +84,6 @@ if ( $request_path !~ qr{^/SelfService/} ) {
     my $tickets = Menu->child( search => title => loc('Tickets'), path => '/Search/Build.html' );
     $tickets->child( simple => title => loc('Simple Search') => path => "/Search/Simple.html" );
     $tickets->child( new => title => loc('New Search') => path => "/Search/Build.html?NewQuery=1" );
-    my $new = $tickets->child( create => title => loc('New ticket'), path => '/Ticket/Create.html' );
-
-    my $q = RT::Queues->new( $session{'CurrentUser'} );
-    $q->FindAllRows;
-
-    while ( my $queue = $q->Next ) {
-        next unless $queue->CurrentUserHasRight('CreateTicket');
-        $new->child( $queue->id => title => $queue->Name, path => '/Ticket/Create.html?Queue=' . $queue->id );
-    }
 
     my $tools = Menu->child(  tools => title => loc('Tools'), path => '/Tools/index.html' );
     my $dashes = $tools->child( dashboards => title => loc('Dashboards'), path => '/Dashboards/index.html' );
@@ -317,12 +308,12 @@ if ( $request_path !~ qr{^/SelfService/} ) {
     }
 
     if ( $request_path =~ qr'Ticket/' ) {
-        my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order  => 99 );
         if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
             my $id  = $1;
             my $obj = RT::Ticket->new( $session{'CurrentUser'} );
             $obj->Load($id);
 
+            my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order  => 99 );
             my $tabs = PageMenu();
             $tabs->child( bookmark => title => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ),
                       escape_title => 0,
@@ -480,7 +471,13 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
         $args = "?" . $query_string->(%query_args);
 
-        my $current_search_menu = $search->child( current_search => title => loc('Current Search'), link_item => 1 );
+
+        my $current_search_menu;
+        if ( $request_path =~ qr'^/Ticket' ) {
+            $current_search_menu = $search->child( current_search => title => loc('Current Search'), link_item => 1 );
+        } 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" );
@@ -499,8 +496,31 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
             $current_search_menu->child( results => title => loc('Show Results') => path => "/Search/Results.html$args" );
             $current_search_menu->child( bulk => title => loc('Bulk Update') => path => "/Search/Bulk.html$args" );
-            $current_search_menu->child( chart => title => loc('Graph'), path => "/Search/Chart.html$args");
-        }
+            $current_search_menu->child( chart => title => loc('Graph'),
+                                         path => "/Search/Chart.html$args" );
+            $current_search_menu->child(
+                                   spreadsheet => title => loc('Spreadsheet'),
+                                   path => "/Search/Results.tsv$args" );
+
+            my $RSSQueryString = "?"
+                . $query_string->( Query   => $query_args{Query},
+                                   Order   => $query_args{Order},
+                                   OrderBy => $query_args{OrderBy}
+                                 );
+            my $RSSPath = join '/', map $m->interp->apply_escapes( $_, 'u' ),
+                $session{'CurrentUser'}->UserObj->Name,
+                $session{'CurrentUser'}
+                ->UserObj->GenerateAuthString(   $query_args{Query}
+                                               . $query_args{Order}
+                                               . $query_args{OrderBy} );
+
+            $current_search_menu->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);
+}
     }
 
     if ( $request_path =~ /^\/(?:index.html|$)/ ) {
diff --git a/share/html/Search/Elements/ResultViews b/share/html/Search/Elements/ResultViews
deleted file mode 100644
index 04237da..0000000
--- a/share/html/Search/Elements/ResultViews
+++ /dev/null
@@ -1,72 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# 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 }}}
-<%args>
-$QueryString => undef
-$Query => undef
-$Format => undef
-$Rows => undef
-$OrderBy => undef
-$Order => undef
-$RSSFeedURL => undef
-$ShortQueryString => undef
-
-</%args>
-<ul class="search-result-views">
-<li><a href="<%RT->Config->Get('WebPath')%>/Search/Results.tsv<%$QueryString%>"><&|/l&>Spreadsheet</&></a></li>
-<li><a href="<%$RSSFeedURL%>"><&|/l&>RSS</&></a></li>
-<li><a href="<%RT->Config->Get('WebURL')%>/NoAuth/iCal/<% $ical_path %>"><% loc('iCal') %></a></li>
-<li><a href="<%RT->Config->Get('WebPath')%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Editable text</&></a></li>
-% # Now let callbacks add their extra tools
-% $m->callback( %ARGS, CallbackName => 'AfterTools' );
-</ul>
-<%init>
-my $ical_path = join '/', map $m->interp->apply_escapes($_, 'u'),
-    $session{'CurrentUser'}->UserObj->Name,
-    $session{'CurrentUser'}->UserObj->GenerateAuthString( $Query ),
-    $Query;
-</%init>
diff --git a/share/html/Search/Results.html b/share/html/Search/Results.html
index 41325a7..5baf58a 100755
--- a/share/html/Search/Results.html
+++ b/share/html/Search/Results.html
@@ -47,7 +47,6 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title,
     Refresh => $session{'tickets_refresh_interval'} || RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} ),
-    RSSAutoDiscovery => $RSSFeedURL,
     LinkRel => \%link_rel &>
 <& /Elements/Tabs &>
 <& /Elements/CollectionList, 
@@ -72,21 +71,6 @@
 <input type="submit" class="button" value="<&|/l&>Change</&>" />
 </form>
 </div>
-<div align="right" class="search-result-actions">
-<& Elements/ResultViews,
-    Collection => $session{'tickets'},
-    QueryString => $QueryString,
-    Query => $Query,
-    Format => $Format,
-    Rows => $Rows,
-    OrderBy => $OrderBy,
-    Order => $Order,
-    RSSFeedURL => $RSSFeedURL,
-    ShortQueryString => $ShortQueryString,
-&>
-
-% $m->callback( QueryString => $QueryString, CallbackName => 'SearchActions' );
-</div>
 <%INIT>
 # Read from user preferences
 my $prefs = $session{'CurrentUser'}->UserObj->Preferences("SearchDisplay") || {};
@@ -154,11 +138,6 @@ my $QueryString = "?".$m->comp('/Elements/QueryString',
                                Order => $Order,
                                Page => $Page);
 my $ShortQueryString = "?".$m->comp('/Elements/QueryString', Query => $Query);
-my $RSSQueryString = "?".$m->comp('/Elements/QueryString', Query => $Query, Order => $Order, OrderBy => $OrderBy);
-my $RSSPath  = join '/', map $m->interp->apply_escapes($_, 'u'),
-    $session{'CurrentUser'}->UserObj->Name,
-    $session{'CurrentUser'}->UserObj->GenerateAuthString( $Query.$Order.$OrderBy );
-my $RSSFeedURL = RT->Config->Get('WebPath')."/NoAuth/rss/$RSSPath/$RSSQueryString";
 
 if ($ARGS{'TicketsRefreshInterval'}) {
 	$session{'tickets_refresh_interval'} = $ARGS{'TicketsRefreshInterval'};
diff --git a/t/web/search_rss.t b/t/web/search_rss.t
index d273e36..67cae1f 100644
--- a/t/web/search_rss.t
+++ b/t/web/search_rss.t
@@ -22,7 +22,7 @@ $agent->form_name('BuildQuery');
 $agent->field('idOp', '>');
 $agent->field('ValueOfid', '0');
 $agent->submit('DoSearch');
-$agent->follow_link_ok({id => 'search-current_search-results'});
+$agent->follow_link_ok({id => 'page-results'});
 
 for ( 1 .. 5 ) {
     $agent->content_contains('Ticket ' . $_);

commit b852c9a2e3cba4078af3438ec973a0492a911e81
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 14:07:43 2010 -0400

    warnings avoidance

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index d434326..36d5e65 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -456,8 +456,8 @@ if ( $request_path !~ qr{^/SelfService/} ) {
             SavedChartSearchId => $m->request_args->{'SavedChartSearchId'} || $current_search->{SavedChartSearchId},
             Query => $m->request_args->{'Query'} || $current_search->{'Query'},
             Format => $m->request_args->{'Format'} || $current_search->{'Format'},
-            OrderBy => $m->request_args->{'OrderBy'} || $current_search->{'OrderBy'},
-            Order => $m->request_args->{'Order'} || $current_search->{'Order'},
+            OrderBy => $m->request_args->{'OrderBy'} || $current_search->{'OrderBy'} ||'',
+            Order => $m->request_args->{'Order'} || $current_search->{'Order'} ||'',
             Page => $m->request_args->{'Page'} || $current_search->{'Page'},
             RowsPerPage => ( defined $m->request_args->{'RowsPerPage'}
                              ? $m->request_args->{'RowsPerPage'}

commit f58376a6f9a9d2a000e88bcd917ee58e90e35ee0
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 14:11:37 2010 -0400

    flop nav, as a cheap hack around superfish running over the edge of the page

diff --git a/share/html/NoAuth/css/web2/layout.css b/share/html/NoAuth/css/web2/layout.css
index b7e52ac..e5c4991 100644
--- a/share/html/NoAuth/css/web2/layout.css
+++ b/share/html/NoAuth/css/web2/layout.css
@@ -171,7 +171,7 @@ div#footer #bpscredits {
 
 div#logo {
     position: absolute;
-    left: 2px;
+    right: 2px;
     top: 0;
     height: 2.3em;
 }
@@ -180,14 +180,16 @@ div#logo a img {
     border: 0;
     height: 100% !important;
     width: auto !important;
+    float: right;
 }
 
 div#logo .rtname {
     position: relative;
     font-weight: bold;
     text-align: center;
-    top: -0.8em;
-    left: 0.5em;
+    top: 0.7em;
+    padding-right: 1em;
+    float:left;
 }
 
 
diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index b927ae7..8ae2393 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -48,7 +48,7 @@
 #main-navigation {
     position: absolute;
     top: 0;
-    right: 0;
+    left: 0;
     left: auto;
     z-index: 9999;
 }

commit b2a8c59cde08884dfea65466bd0cdca3419abe3d
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 14:17:54 2010 -0400

    restore custom page nav on ticket create

diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index c136839..128fcb6 100755
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -446,15 +446,8 @@ if ((!exists $ARGS{'AddMoreAttach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} e
         }
     }
 }
-
-my $actions = {
-    A => {
-        html => q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Basics') . q[</a>],
-    },
-    B => {
-        html => q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Details') . q[</a>],
-    },
-};
+PageMenu->child( basics => title =>  q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Basics') . q[</a>], escape_title => 0, link_item => 0);
+PageMenu->child( details => title =>  q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Details') . q[</a>], escape_title => 0, link_item => 0);
 </%INIT>
 
 <%ARGS>

commit 13b3078839b8dd35f2901f7bf6192d4bdc35c4ce
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Nov 3 14:18:05 2010 -0400

    tweak page nav location

diff --git a/share/html/NoAuth/css/web2/nav.css b/share/html/NoAuth/css/web2/nav.css
index 8ae2393..0aa9611 100644
--- a/share/html/NoAuth/css/web2/nav.css
+++ b/share/html/NoAuth/css/web2/nav.css
@@ -55,7 +55,7 @@
 
 #page-navigation {
     position: absolute;
-    top: 6.6em;
+    top: 6.8em;
     right: 0em;
     left: auto;
     z-index: 9995;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list