[Rt-commit] rt branch, admin-menu-tweak, updated. rt-3.9.7-13-g7a39c8b

Thomas Sibley trs at bestpractical.com
Wed Dec 8 16:27:17 EST 2010


The branch, admin-menu-tweak has been updated
       via  7a39c8b8dfb10a761ce2e82275c9bb347d4f8279 (commit)
      from  d627176b7b41b9098aa6740ff51773896fd11745 (commit)

Summary of changes:
 share/html/Elements/Tabs |   23 ++++++-----------------
 1 files changed, 6 insertions(+), 17 deletions(-)

- Log -----------------------------------------------------------------
commit 7a39c8b8dfb10a761ce2e82275c9bb347d4f8279
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Dec 8 16:21:08 2010 -0500

    Cleanup the Templates and Scrips page menu
    
    Move it out of the dropdown

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 8cf8b41..c1d12f6 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -345,33 +345,22 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
     }
 
-    if ( $request_path =~ qr{^/Admin/Global/(Scrip|Template)(s)?\.html} ) {
+    if ( $request_path =~ qr{^/Admin/Global/(Scrip|Template)s?\.html} ) {
         my $type = $1;
         my $tabs = PageMenu();
 
         my %labels = (
             Scrip       => loc('Scrips'),
             Template    => loc('Templates')
-                     );
-
-        my $section;
-        #if ( $request_path =~ qr{^/Admin/Global/(\w+)s.html$} || $m->request_args->{'Create'} )
-
-        #{
-        #    $section = $tabs;
-
-        #} else {
-            $section = $tabs->child( select => title => $labels{$type},
-                                     path => "/Admin/Global/${type}s.html" );
-        #}
+        );
 
         # With only two elements, swapping between dropdown and menu is kinda dumb
         # In the glorious future this should be cleaner.
 
-        $section->child( select => title => loc('Select'),
-                         path   => "/Admin/Global/${type}s.html" );
-        $section->child( create => title => loc('Create'),
-                         path => "/Admin/Global/${type}.html?Create=1" );
+        $tabs->child( select => title => loc('Select'),
+                      path   => "/Admin/Global/${type}s.html" );
+        $tabs->child( create => title => loc('Create'),
+                      path   => "/Admin/Global/${type}.html?Create=1" );
 
     }
 

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


More information about the Rt-commit mailing list