[Rt-commit] rt branch, 3.9-menu_index_page, created. rt-3.9.7-864-g8bc1f21

Kevin Falcone falcone at bestpractical.com
Mon Dec 13 18:54:58 EST 2010


The branch, 3.9-menu_index_page has been created
        at  8bc1f212c407d9a3a683b0bed5aea25b31b1af35 (commit)

- Log -----------------------------------------------------------------
commit ed467edf7df3a9a9a16bdef818dcad29b0800ff8
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun Dec 5 02:44:16 2010 +0300

    move menu elements' description from Admin/index.html

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e728da7..abb0885 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -117,26 +117,26 @@ if ( $request_path !~ qr{^/SelfService/} ) {
     {
         my $admin = $tools->child( config => title => loc('Configuration'), path   => '/Admin/', sort_order => 1 );
         if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) ) {
-            my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', );
+            my $users = $admin->child( users => title => loc('Users'), path => '/Admin/Users/', description => loc('Manage users and passwords') );
             $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 $groups = $admin->child( loc('Groups'), path => '/Admin/Groups/', description => loc('Manage groups and group membership') );
 
         $groups->child( select => title => loc('Select'), path => "/Admin/Groups/" );
         $groups->child( create => title => 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/', description => loc('Manage queues and queue-specific properties') );
         $queues->child( select => title => loc('Select'), path => "/Admin/Queues/" );
         $queues->child( create => title => 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/', );
+            my $cfs = $admin->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/CustomFields/', description => loc('Manage custom fields and custom field values') );
             $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 $admin_global = $admin->child( global => title => loc('Global'), path   => '/Admin/Global/', description => loc('Manage properties and configuration which apply to all queues') );
 
         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" );
@@ -185,7 +185,7 @@ if ( $request_path !~ qr{^/SelfService/} ) {
         $admin_global->child( theme => title => loc('Theme'), path => '/Admin/Global/Theme.html', );
         $admin_global->child( 'rt-features' => title => loc('RT Features'), path => '/Admin/Global/Plugins.html', );
 
-        my $admin_tools = $admin->child( tools => title => loc('Tools'), path => '/Admin/Tools/', );
+        my $admin_tools = $admin->child( tools => title => loc('Tools'), path => '/Admin/Tools/', description => loc('Use other RT administrative tools') );
         $admin_tools->child( configuration => title => loc('System Configuration'), path => '/Admin/Tools/Configuration.html', );
 
         if (RT->Config->Get('StatementLog')

commit 29a404f1a7c37bdd440a0e325b00e520e4775081
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun Dec 5 02:45:08 2010 +0300

    re-use Menu instead of repeating tabs in index.html

diff --git a/share/html/Admin/index.html b/share/html/Admin/index.html
index baf1906..5eae4ce 100755
--- a/share/html/Admin/index.html
+++ b/share/html/Admin/index.html
@@ -47,55 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('RT Administration') &>
 <& /Elements/Tabs &>
-<& /Admin/Elements/CheckRestart &>
-<& /Elements/ListMenu, items => $tabs &>
+<& /Elements/ListMenu, menu => Menu()->child('tools')->child('config')  &>
 % if (RT->Config->Get('ShowRTNews')) {
 <& /Admin/Elements/Newsbox &>
 % }
-<%init>
-
-my $tabs = {
-    A => {
-        title       => loc('Users'),
-        path        => '/Admin/Users/index.html',
-        description => loc('Manage users and passwords'),
-    },
-    B => {
-        title => loc('Groups'),
-        path  => '/Admin/Groups/index.html',
-        description => loc('Manage groups and group membership'),
-    },
-    C => {
-        title       => loc('Queues'),
-        path        => '/Admin/Queues/index.html',
-        description => loc('Manage queues and queue-specific properties'),
-    },
-    D => {
-        'title'     => loc('Custom Fields'),
-        description => loc('Manage custom fields and custom field values'),
-          path      => '/Admin/CustomFields/index.html',
-    },
-    E => {
-        'title'     => loc('Global'),
-        path        => '/Admin/Global/index.html',
-        description =>
-          loc('Manage properties and configuration which apply to all queues'),
-    },
-    F => {
-        title => loc('Articles'),
-        path  => "/Admin/Articles/index.html",
-        description => loc('Manage Classes and Article Permissions')
-    },
-    G => {
-        'title'     => loc('Tools'),
-        path        => '/Admin/Tools/index.html',
-        description => loc('Use other RT administrative tools')
-    },
-};
-
-  $m->callback( %ARGS, tabs => $tabs );
-
-
-
-
-</%init>

commit edc903627c33ac7023be6e326969cd9e95f416d3
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun Dec 5 02:46:11 2010 +0300

    description accessor in Menu.pm

diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index b5a6eea..1ad2cf2 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(
-    title sort_order target escape_title class raw_html key
+    title sort_order target escape_title class raw_html key description
 ));
 
 =head1 NAME

commit 086ec10af7a65dbf59c6115acdd0bbbfa9c9debd
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun Dec 5 02:46:37 2010 +0300

    ListMenu that renders Menu objects instead of hashes

diff --git a/share/html/Elements/ListMenu b/share/html/Elements/ListMenu
index a4bad80..2c08a1e 100644
--- a/share/html/Elements/ListMenu
+++ b/share/html/Elements/ListMenu
@@ -46,13 +46,52 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%args>
-$items
+$menu
 </%args>
 <ul class="list-menu">
-%    foreach my $key (sort keys %$items) {
-<li><span class="menu-item"><a href="<%RT->Config->Get('WebPath')%><%$items->{$key}->{'path'}|n %>"><%$items->{$key}->{'title'}%></a></span><br />
-<span class="description"><%$items->{$key}->{description} || $items->{$key}->{text} || '' %></span>
-
+% for my $child ($menu->children) {
+<li><span class="menu-item"><% $show_link->( $child ) |n %></span><br />
+% if ( my $description = $child->description ) {
+<span class="description"><% $description %></span>\
+% }
+% if ( $child->has_children ) {
+<ul>
+% for my $grand ($child->children) {
+<li><% $show_link->( $grand ) |n %></li>
+% }
+</ul>
+% }
 </li>
-%}
+% }
 </ul>
+
+<%INIT>
+my $web_path = RT->Config->Get('WebPath');
+my $interp = $m->interp;
+my $show_link = sub {
+    my $e = shift;
+    my $res = '';
+    if ( $e->link_item ) {
+        $res .= '<a';
+        my $url = (not $e->path or $e->path =~ m{^\w+:/})
+            ? $e->path
+            : $web_path . $e->path;
+        $res .= ' href="'. $interp->apply_escapes($url, 'h') .'"'
+            if $url;
+
+        if ( $e->target ) {
+            $res .= ' target="'. $interp->apply_escapes( $e->target, 'h' ) .'"';
+        }
+        $res .= '>';
+    }
+
+    my $title = $e->title;
+    $title = $interp->apply_escapes( $title, 'h' );
+    $res .= $title;
+
+    if ( $e->link_item ) {
+        $res .= '</a>';
+    }
+    return $res;
+};
+</%INIT>

commit 2f95ddbbda2ba392535c2b34f29b9b63a3e104f3
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Sun Dec 5 02:47:34 2010 +0300

    css for two level MenuLists

diff --git a/share/html/NoAuth/css/base/admin.css b/share/html/NoAuth/css/base/admin.css
index d3388d7..2a146f6 100644
--- a/share/html/NoAuth/css/base/admin.css
+++ b/share/html/NoAuth/css/base/admin.css
@@ -54,12 +54,22 @@ ul.list-menu {
 
 }
 ul.list-menu .description {
+ font-style: italic;
  display: block;
  padding: 0.5em;
- font-style: italic;
  padding-left: 1em;
 }
 
+ul.list-menu ul {
+ list-style: none;
+ padding: 0.5em;
+ padding-left: 1em;
+}
+ul.list-menu ul li {
+ display: inline;
+ margin-right: 0.5em;
+}
+
 #rt-news .titlebox iframe {
     height: 100%;
     width: 100%;

commit b38d6ac4754517eedf50dfb248f7d90cfa03682a
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Dec 13 15:16:56 2010 -0500

    Move Admin/Global/index.html to the new listing style

diff --git a/share/html/Admin/Global/index.html b/share/html/Admin/Global/index.html
index eaa2c42..186d99d 100755
--- a/share/html/Admin/Global/index.html
+++ b/share/html/Admin/Global/index.html
@@ -47,41 +47,4 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &>
 <& /Elements/Tabs &>
-    <& /Elements/ListMenu, items => $items &>
-<%INIT>
-  my $items = {
-                
-               A => { title => loc('Scrips'),
-                           text => loc('Modify scrips which apply to all queues'),
-                           path => '/Admin/Global/Scrips.html',
-                         },
-               B => { title => loc('Templates'),
-                        text => loc('Edit system templates'),
-                        path => '/Admin/Global/Templates.html',
-                      },
-              
-                F => { title => loc('Custom Fields'),
-                text => loc('Modify global custom fields'),
-                        path => '/Admin/Global/CustomFields/index.html',
-                        },
-
-                G => { title => loc('Group Rights'),
-                                text => loc('Modify global group rights'),
-                                path => '/Admin/Global/GroupRights.html',
-                      },
-                H => { title => loc('User Rights'),
-                                text => loc('Modify global user rights'),
-                                path => '/Admin/Global/UserRights.html',
-                      },
-                I => { title => loc('RT at a glance'),
-                                text => loc('Modify the default "RT at a glance" view'),
-                                path => '/Admin/Global/MyRT.html',
-                      },
-                J => { title => loc('Theme'),
-                                path => '/Admin/Global/Theme.html',
-                      },
-                K => { title => loc('RT Features'),
-                                path => '/Admin/Global/Plugins.html',
-                      },
-};
-</%INIT>
+<& /Elements/ListMenu, menu => Menu()->child('tools')->child('config')->child('global') &>
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index abb0885..ee991b6 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -138,14 +138,16 @@ if ( $request_path !~ qr{^/SelfService/} ) {
 
         my $admin_global = $admin->child( global => title => loc('Global'), path   => '/Admin/Global/', description => loc('Manage properties and configuration which apply to all queues') );
 
-        my $scrips = $admin_global->child( scrips => title => loc('Scrips'), path => '/Admin/Global/Scrips.html', );
+        my $scrips = $admin_global->child( scrips => title => loc('Scrips'), path => '/Admin/Global/Scrips.html', description => loc('Modify scrips which apply to all queues') );
         $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', );
+        my $templates = $admin_global->child( loc('Templates'), path => '/Admin/Global/Templates.html', description => loc('Edit system templates') );
         $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 $cfadmin = $admin_global->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/Global/CustomFields/index.html', );
+        my $cfadmin = $admin_global->child( 'custom-fields' => title => loc('Custom Fields'),
+                                            path => '/Admin/Global/CustomFields/index.html',
+                                            description => loc('Modify global custom fields') );
         {
             $cfadmin->child( users => title => loc('Users') => text => loc('Select custom fields for all users'),
                              path => '/Admin/Global/CustomFields/Users.html');
@@ -178,12 +180,16 @@ if ( $request_path !~ qr{^/SelfService/} ) {
         $cfs->child( select => title => loc('Select'), path => '/Admin/CustomFields/index.html?'.$m->comp('/Elements/QueryString', type => 'RT::Class-RT::Article') );
         $cfs->child( create => title => loc('Create'), path => '/Admin/CustomFields/Modify.html?'.$m->comp("/Elements/QueryString", Create=>1, LookupType=> "RT::Class-RT::Article" ));
 
-        $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('topics'       => title => loc('Topics'), path => "/Admin/Global/Topics.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', );
-        $admin_global->child( 'rt-features' => title => loc('RT Features'), path => '/Admin/Global/Plugins.html', );
+        $admin_global->child( 'group-rights' => title => loc('Group Rights'), path => '/Admin/Global/GroupRights.html',
+                              description => loc('Modify global group rights') );
+        $admin_global->child( 'user-rights' => title => loc('User Rights'), path => '/Admin/Global/UserRights.html',
+                              description => loc('Modify global user rights') );
+        $admin_global->child( 'my-rt' => title => loc('RT at a glance'), path => '/Admin/Global/MyRT.html',
+                              description => loc('Modify the default "RT at a glance" view') );
+        $admin_global->child( theme => title => loc('Theme'), path => '/Admin/Global/Theme.html',
+                              description => loc('Customize the look of your RT') );
+        $admin_global->child( 'rt-features' => title => loc('RT Features'), path => '/Admin/Global/Plugins.html',
+                              description => loc('Enable and Disable Plugins') );
 
         my $admin_tools = $admin->child( tools => title => loc('Tools'), path => '/Admin/Tools/', description => loc('Use other RT administrative tools') );
         $admin_tools->child( configuration => title => loc('System Configuration'), path => '/Admin/Tools/Configuration.html', );

commit 2ae9411ce4721d711a56800bbe97a0673bbf55db
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Dec 13 16:36:31 2010 -0500

    convert Admin/Tools/index.html

diff --git a/share/html/Admin/Tools/index.html b/share/html/Admin/Tools/index.html
index 8b696b6..18e30f7 100644
--- a/share/html/Admin/Tools/index.html
+++ b/share/html/Admin/Tools/index.html
@@ -45,24 +45,6 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/Header, Title => loc('System Tools') &>
 <& /Elements/Tabs &>
-<& /Elements/ListMenu, items => $tabs &>
-<%init>
-my $title = loc('System Tools');
-
-my $tabs = {
-        A => { title => loc('System Configuration'),
-               path => '/Admin/Tools/Configuration.html',
-               text => loc('Detailed information about your RT setup'),
-        },
-        B => { title => loc('SQL Queries'),
-               path => '/Admin/Tools/Queries.html',
-               text => loc('Browse the SQL queries made in this process'),
-        },
-        E => { title => loc('Shredder'),
-               path  => '/Admin/Tools/Shredder/',
-               text  => loc('Permanently wipeout data from RT'),
-        },
-};
-</%init>
+<& /Elements/ListMenu, menu => Menu()->child('tools')->child('config')->child('tools') &>
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index ee991b6..c785b33 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -192,14 +192,15 @@ if ( $request_path !~ qr{^/SelfService/} ) {
                               description => loc('Enable and Disable Plugins') );
 
         my $admin_tools = $admin->child( tools => title => loc('Tools'), path => '/Admin/Tools/', description => loc('Use other RT administrative tools') );
-        $admin_tools->child( configuration => title => loc('System Configuration'), path => '/Admin/Tools/Configuration.html', );
-
+        $admin_tools->child( configuration => title => loc('System Configuration'), path => '/Admin/Tools/Configuration.html',
+                             description => loc('Detailed information about your RT setup') );
         if (RT->Config->Get('StatementLog')
-        && $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )) {
-            $admin_tools->child( 'sql-queries' => title => loc('SQL Queries'), path => '/Admin/Tools/Queries.html', );
+            && $session{'CurrentUser'}->HasRight( Right => 'SuperUser', Object => $RT::System )) {
+           $admin_tools->child( 'sql-queries' => title => loc('SQL Queries'), path => '/Admin/Tools/Queries.html',
+                                description => loc('Browse the SQL queries made in this process') );
         }
-
-        $admin_tools->child( shredder => title => loc('Shredder'), path => '/Admin/Tools/Shredder', );
+        $admin_tools->child( shredder => title => loc('Shredder'), path => '/Admin/Tools/Shredder',
+                             description => loc('Permanently wipeout data from RT'));
     }
 
     my $about_me = Menu->child( 'preferences' => title =>

commit e5ce957ad387f0fb65d587e9ff153ed50b6dd0d5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Dec 13 16:56:11 2010 -0500

    Fix Tools/index.html and Tools/Reports/index.html

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index c785b33..80df6b7 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -86,8 +86,8 @@ if ( $request_path !~ qr{^/SelfService/} ) {
     $tickets->child( new => title => loc('New Search') => path => "/Search/Build.html?NewQuery=1" );
 
     my $tools = Menu->child(  tools => title => loc('Tools'), path => '/Tools/index.html' );
-    my $dashes = $tools->child( dashboards => title => loc('Dashboards'), path => '/Dashboards/index.html', sort_order => 5 );
-
+    my $dashes = $tools->child( dashboards => title => loc('Dashboards'), path => '/Dashboards/index.html', sort_order => 2,
+                                description => loc('Named, shared collection of portlets') );
     $dashes->child( select => title => loc('Select'), path => "/Dashboards/index.html" );
     my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
     if ( $dashboard->CurrentUserCanCreateAny ) {
@@ -99,18 +99,26 @@ if ( $request_path !~ qr{^/SelfService/} ) {
     $articles->child( articles => title => loc('Articles') => path => "/Articles/index.html" );
     $articles->child( topics   => title => loc('Topics') => path => "/Articles/Topics.html" );
 
-    my $reports = $tools->child( reports => title => loc('Reports'), path => '/Tools/Reports/index.html', sort_order => 15 );
-    $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( reports => title => loc('Reports'), path => '/Tools/Reports/index.html', sort_order => 4,
+                                 description => loc('Various RT reports') );
+    $reports->child( loc('Resolved by owner'), path => '/Tools/Reports/ResolvedByOwner.html',
+        description => loc('Examine tickets resolved in a queue, grouped by owner'), );
+    $reports->child( loc('Resolved in date range'), path => '/Tools/Reports/ResolvedByDates.html',
+        description => loc('Examine tickets resolved in a queue between two dates'), );
+    $reports->child( loc('Created in a date range'), path => '/Tools/Reports/CreatedByDates.html',
+        description => loc('Examine tickets created in a queue between two dates'), );
 
-    $tools->child( my_day => title => loc('My Day'), path   => '/Tools/MyDay.html', sort_order => 25 );
+    $tools->child( my_day => title => loc('My Day'), path   => '/Tools/MyDay.html', sort_order => 5,
+                   description => loc('Easy updating of your open tickets') );
 
-    $tools->child( offline => title => loc('Offline'), path    => '/Tools/Offline.html', sort_order => 30 );
+    $tools->child( offline => title => loc('Offline'), path    => '/Tools/Offline.html', sort_order => 10,
+                   description => loc('Create tickets offline') );
+    $tools->child( watching => title => loc('Watching Queues'), path => '/Tools/Watching.html', sort_order => 15 );
 
     if ( $session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
     {
-        $tools->child( approval => title => loc('Approval'), path     => '/Approvals/', sort_order=> 20 );
+        $tools->child( approval => title => loc('Approval'), path     => '/Approvals/', sort_order=> 3,
+                       description => loc('My Approvals') );
     }
 
     if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) )
diff --git a/share/html/Tools/Reports/index.html b/share/html/Tools/Reports/index.html
index c219a6f..4075263 100644
--- a/share/html/Tools/Reports/index.html
+++ b/share/html/Tools/Reports/index.html
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Reports') &>
 <& /Elements/Tabs &>
-<& /Elements/ListMenu, items => $tabs &>
+<& /Elements/ListMenu, menu => Menu()->child('tools')->child('reports') &>
 
 % $m->callback;
 
diff --git a/share/html/Tools/index.html b/share/html/Tools/index.html
index b27b5f9..e2f0eaf 100644
--- a/share/html/Tools/index.html
+++ b/share/html/Tools/index.html
@@ -47,41 +47,4 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Tools") &>
 <& /Elements/Tabs &>
-<& /Elements/ListMenu, items => $tabs &>
-
-<%init>
-
-my $tabs = {
-    B => {
-        title       => loc('Offline'),
-        path        => '/Tools/Offline.html',
-        description => loc('Create tickets offline'),
-    },
-    C => {
-        title       => loc('Reports'),
-        path        => '/Tools/Reports/index.html',
-        description => loc('Various RT reports'),
-    },
-    D => {
-        title       => loc('My Day'),
-        path        => '/Tools/MyDay.html',
-        description => loc('Easy updating of your open tickets'),
-    },
-};
-
-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',
-        description => loc('Named, shared collection of portlets'),
-    };
-}
-
-$m->callback( %ARGS, tabs => $tabs );
-
-</%init>
+<& /Elements/ListMenu, menu => Menu()->child('tools') &>

commit 8bc1f212c407d9a3a683b0bed5aea25b31b1af35
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Dec 13 18:33:10 2010 -0500

    link_item died in b3bc3f829363b47584d9b8a94ab58e8e36f1bc9d
    
    Use the logic that Elements/Menu is using where it just checks
    for a path

diff --git a/share/html/Elements/ListMenu b/share/html/Elements/ListMenu
index 2c08a1e..ed1cffa 100644
--- a/share/html/Elements/ListMenu
+++ b/share/html/Elements/ListMenu
@@ -71,7 +71,7 @@ my $interp = $m->interp;
 my $show_link = sub {
     my $e = shift;
     my $res = '';
-    if ( $e->link_item ) {
+    if ( $e->path) {
         $res .= '<a';
         my $url = (not $e->path or $e->path =~ m{^\w+:/})
             ? $e->path
@@ -89,7 +89,7 @@ my $show_link = sub {
     $title = $interp->apply_escapes( $title, 'h' );
     $res .= $title;
 
-    if ( $e->link_item ) {
+    if ( $e->path) {
         $res .= '</a>';
     }
     return $res;

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


More information about the Rt-commit mailing list