[Rt-commit] rt branch, admin-menu-tweak, created. rt-3.9.7-11-ge984f34

Jesse Vincent jesse at bestpractical.com
Wed Dec 8 12:33:36 EST 2010


The branch, admin-menu-tweak has been created
        at  e984f34892725def8df50a4d64479056b79447f9 (commit)

- Log -----------------------------------------------------------------
commit 188142918bb51cfc5cf4f82e77aae8c157b87d6a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Dec 8 11:53:48 2010 -0500

    Just because we're on a listing page doesn't mean we shouldn't show the
    list

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 131d206..574a14b 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -231,9 +231,7 @@ if ( $request_path !~ qr{^/SelfService/} ) {
         my $type = $1;
         my $tabs = PageMenu();
 
-        if ( $request_path !~ qr{^/Admin/$type/?(?:index.html)?$} ) {
-            $tabs->child( select => title => loc('Select'), path => "/Admin/$type/" );
-        }
+        $tabs->child( select => title => loc('Select'), path => "/Admin/$type/" );
 
         if ( $request_path ne "/Admin/$type/Modify.html" || !$m->request_args->{Create} ) {
             $tabs->child( create => title => loc('Create'), path => "/Admin/$type/Modify.html?Create=1" );

commit e984f34892725def8df50a4d64479056b79447f9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Dec 8 12:30:45 2010 -0500

    Give more context to Select / Create options in the admin menu.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 574a14b..3d5e8a5 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -231,11 +231,32 @@ if ( $request_path !~ qr{^/SelfService/} ) {
         my $type = $1;
         my $tabs = PageMenu();
 
-        $tabs->child( select => title => loc('Select'), path => "/Admin/$type/" );
+        my %labels = (
+            Queues       => loc("Queues"),
+            Users        => loc("Users"),
+            Groups       => loc("Groups"),
+            CustomFields => loc("Custom Fields"),
 
-        if ( $request_path ne "/Admin/$type/Modify.html" || !$m->request_args->{Create} ) {
-            $tabs->child( create => title => loc('Create'), path => "/Admin/$type/Modify.html?Create=1" );
+                     );
+
+        my $section;
+        if ( $request_path =~ qr{^/Admin/$type/?(?:index.html)?$}
+             || (    $request_path =~ qr{^/Admin/$type/(?:Modify.html)$}
+                  && $m->request_args->{'Create'} )
+           )
+
+        {
+            $section = $tabs;
+
+        } else {
+            $section = $tabs->child( select => title => $labels{$type},
+                                     path => "/Admin/$type/" );
         }
+
+        $section->child( select => title => loc('Select'),
+                         path   => "/Admin/$type/" );
+        $section->child( create => title => loc('Create'),
+                         path => "/Admin/$type/Modify.html?Create=1" );
     }
 
     if ( $request_path =~ qr{^/Admin/Queues} ) {

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


More information about the Rt-commit mailing list