[Rt-commit] rt branch, menu-redo, updated. 32b2508a5bae55521077623b22d18abb85a2011c
jesse
jesse at bestpractical.com
Wed Oct 21 19:19:05 EDT 2009
The branch, menu-redo has been updated
via 32b2508a5bae55521077623b22d18abb85a2011c (commit)
via f8a2fc6597dae878987cd8919b79b1ebf6e3666b (commit)
from b7e0cfe19eb2e22613cbb92d098955d56987439f (commit)
Summary of changes:
lib/RT/Dispatcher.pm | 710 ++++++++++---------------------------
lib/RT/View/Admin/CustomFields.pm | 2 -
lib/RT/View/Admin/Groups.pm | 2 -
lib/RT/View/Admin/Queues.pm | 2 -
lib/RT/View/Admin/Rules.pm | 2 -
lib/RT/View/Admin/Users.pm | 2 -
lib/RT/View/CRUD.pm | 9 -
7 files changed, 195 insertions(+), 534 deletions(-)
- Log -----------------------------------------------------------------
commit f8a2fc6597dae878987cd8919b79b1ebf6e3666b
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Oct 21 17:10:13 2009 -0400
Remove "foo label => " from dispatcher rules
diff --git a/lib/RT/Dispatcher.pm b/lib/RT/Dispatcher.pm
index 09cbbef..0afcbad 100644
--- a/lib/RT/Dispatcher.pm
+++ b/lib/RT/Dispatcher.pm
@@ -180,46 +180,46 @@ on qr{^/Ticket/Graphs/(\d+)} => run {
};
before qr{.*} => run {
- Jifty->web->navigation->child( a => label => _('Homepage'), url => '/' );
+ Jifty->web->navigation->child(_('Homepage'), url => '/' );
Jifty->web->navigation->child(
- ab => label => _('Simple Search'),
+_('Simple Search'),
url => '/Search/Simple.html'
);
Jifty->web->navigation->child(
- b => label => _('Tickets'),
+_('Tickets'),
url => '/Search/Build.html'
);
- my $tools = Jifty->web->navigation->child( c => label => _('Tools'), url => '/Tools/index.html' );
- $tools->child( a => label => _('Dashboards'), url => '/Dashboards/index.html');
- my $reports = $tools->child( c => label => _('Reports'), url => '/Tools/Reports/index.html');
+ my $tools = Jifty->web->navigation->child(_('Tools'), url => '/Tools/index.html' );
+ $tools->child(_('Dashboards'), url => '/Dashboards/index.html');
+ my $reports = $tools->child(_('Reports'), url => '/Tools/Reports/index.html');
$reports->child(
- a => label => _('Resolved by owner'),
+_('Resolved by owner'),
url => '/Tools/Reports/ResolvedByOwner.html',
);
$reports->child(
- b => label => _('Resolved in date range'),
+_('Resolved in date range'),
url => '/Tools/Reports/ResolvedByDates.html',
);
$reports->child(
- c => label => _('Created in a date range'),
+_('Created in a date range'),
url => '/Tools/Reports/CreatedByDates.html',
);
- $tools->child( d => label => _('My Day'), url => '/Tools/MyDay.html');
+ $tools->child(_('My Day'), url => '/Tools/MyDay.html');
if ( Jifty->web->current_user->user_object &&
Jifty->web->current_user->has_right( right => 'ShowConfigTab', object => RT->system ) ) {
- my $admin = Jifty->web->navigation->child( e => label => _('Configuration'), url => '/Admin/' );
+ my $admin = Jifty->web->navigation->child(_('Configuration'), url => '/Admin/' );
$admin->child(
- A => label => _('Users'),
+_('Users'),
url => '/Admin/Users/',
);
$admin->child(
- B => label => _('Groups'),
+_('Groups'),
url => '/Admin/Groups/',
);
$admin->child(
- C => label => _('Queues'),
+_('Queues'),
url => '/Admin/Queues/',
);
$admin->child(
@@ -236,37 +236,37 @@ before qr{.*} => run {
);
$admin_global->child(
- B => label => _('Templates'),
+_('Templates'),
url => '/Admin/Global/Templates.html',
);
$admin_global->child(
- C => label => _('Workflows'),
+_('Workflows'),
url => '/Admin/Global/Workflows/index.html',
);
$admin_global->child(
- F => label => _('Custom Fields'),
+_('Custom Fields'),
url => '/Admin/Global/CustomFields/index.html',
);
$admin_global->child(
- G => label => _('Group rights'),
+_('Group rights'),
url => '/Admin/Global/GroupRights.html',
);
$admin_global->child(
- H => label => _('User rights'),
+_('User rights'),
url => '/Admin/Global/UserRights.html',
);
$admin_global->child(
- I => label => _('RT at a glance'),
+_('RT at a glance'),
url => '/Admin/Global/MyRT.html',
);
$admin_global->child(
- Y => label => _('Jifty'),
+_('Jifty'),
url => '/Admin/Global/Jifty.html',
);
$admin_global->child(
- Z => label => _('System'),
+_('System'),
url => '/Admin/Global/System.html',
);
@@ -275,11 +275,11 @@ before qr{.*} => run {
url => '/Admin/Tools/',
);
$admin_tools->child(
- A => label => _('System Configuration'),
+_('System Configuration'),
url => '/Admin/Tools/Configuration.html',
);
$admin_tools->child(
- E => label => _('Shredder'),
+_('Shredder'),
url => '/Admin/Tools/Shredder',
);
}
@@ -290,25 +290,25 @@ before qr{.*} => run {
) )
{
my $prefs = Jifty->web->navigation->child(
- k => label => _('Preferences'),
+_('Preferences'),
url => '/Prefs/Other.html'
);
$prefs->child(
- a => label => _('Settings'),
+_('Settings'),
url => '/Prefs/Other.html',
);
$prefs->child(
- b => label => _('About me'),
+_('About me'),
url => '/User/Prefs.html',
);
$prefs->child(
- f => label => _('Search options'),
+_('Search options'),
url => '/Prefs/SearchOptions.html',
);
$prefs->child(
- r => label => _('RT at a glance'),
+_('RT at a glance'),
url => '/Prefs/MyRT.html',
);
}
@@ -321,7 +321,7 @@ before qr{.*} => run {
)
{
Jifty->web->navigation->child(
- p => label => _('Approval'),
+_('Approval'),
url => '/Approvals/'
);
}
@@ -345,21 +345,21 @@ before '/SelfService' => sub {
}
Jifty->web->navigation->child(
- A => label => _('Open tickets'),
+_('Open tickets'),
url => '/SelfService/',
);
Jifty->web->navigation->child(
- B => label => _('Closed tickets'),
+_('Closed tickets'),
url => '/SelfService/Closed.html',
);
if ( $queue_count > 1 ) {
Jifty->web->navigation->child(
- C => label => _('New ticket'),
+_('New ticket'),
url => '/SelfService/CreateTicketInQueue.html'
);
} else {
Jifty->web->navigation->child(
- C => label => _('New ticket'),
+_('New ticket'),
url => '/SelfService/Create.html?queue=' . $queue_id
);
}
@@ -371,7 +371,7 @@ before '/SelfService' => sub {
)
{
Jifty->web->navigation->child(
- Z => label => _('Preferences'),
+_('Preferences'),
url => '/SelfService/Prefs.html'
);
}
@@ -408,21 +408,21 @@ Jifty->web->navigation->child( "this" =>
url => $modify,
current_subtab => $current_subtab,
Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child( a_Basics => label => _('Basics'),
+ Jifty->web->navigation->child(_('Basics'),
url => $modify,
);
- Jifty->web->navigation->child( b_Queries => label => _('Queries'),
+ Jifty->web->navigation->child(_('Queries'),
url => $queries,
);
- Jifty->web->navigation->child( c_Subscription => label => _('Subscription'),
+ Jifty->web->navigation->child(_('Subscription'),
url =>
"Dashboards/Subscription.html?dashboard_id=" . $dashboard_obj->id
);
- Jifty->web->navigation->child( z_Preview => label => _('Show'),
+ Jifty->web->navigation->child(_('Show'),
url => $render,
);
}
@@ -445,7 +445,7 @@ my $dashboard = RT::Dashboard->new( current_user => Jifty->web->current_user );
my @objects = $dashboard->_privacy_objects(create => 1);
if (@objects) {
-Jifty->web->navigation->child( "B" => label => _('New dashboard'),
+Jifty->web->navigation->child(_('New dashboard'),
url => "Dashboards/Modify.html?create=1",
separator => 1 };
}
@@ -476,10 +476,10 @@ if ($id) {
Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child( C => label => _('Basics'),
+ Jifty->web->navigation->child(_('Basics'),
url => "Admin/CustomFields/Modify.html?id=" . $id,
);
- Jifty->web->navigation->child( F => label => _('Group rights'),
+ Jifty->web->navigation->child(_('Group rights'),
url => "Admin/CustomFields/GroupRights.html?id="
. $id);
Jifty->web->navigation->child( G =>
@@ -501,10 +501,10 @@ Jifty->web->navigation->child( 'this'}->{subtabs}->{D =>
}
if (Jifty->web->current_user->has_right( object => RT->system, right => 'AdminCustomField')) {
-Jifty->web->navigation->child( "A" => label => _('Select'),
+Jifty->web->navigation->child(_('Select'),
url => "Admin/CustomFields/",
};
-Jifty->web->navigation->child( "B" => label => _('Create'),
+Jifty->web->navigation->child(_('Create'),
url => "Admin/CustomFields/Modify.html?create=1",
separator => 1,
};
@@ -835,27 +835,27 @@ Jifty->web->navigation->child( "j" =>
my $tabs = {
- $rules_admin->child( A => label => _('Select'), url => "Admin/Rules/");
- $rules_admin->child( E => label => _('Create'), url => 'Admin/Rules/Modify.html?create=1');
+ $rules_admin->child(_('Select'), url => "Admin/Rules/");
+ $rules_admin->child(_('Create'), url => 'Admin/Rules/Modify.html?create=1');
};
# /Admin/Users tabs
my $user = $user_admin->child(url => "Admin/Users/Modify.html?id=".$id,);
- $user->child( Basics => label => _('Basics'), url => "Admin/Users/Modify.html?id=".$id);
- $user->child( Memberships => label => _('Memberships'), url => "Admin/Users/Memberships.html?id=".$id);
- $user->child( History => label => _('History'), url => "Admin/Users/History.html?id=".$id);
- $user->child( 'MyRT' => label => _('RT at a glance'), url => "Admin/Users/MyRT.html?id=".$id);
+ $user->child(_('Basics'), url => "Admin/Users/Modify.html?id=".$id);
+ $user->child(_('Memberships'), url => "Admin/Users/Memberships.html?id=".$id);
+ $user->child(_('History'), url => "Admin/Users/History.html?id=".$id);
+ $user->child(_('RT at a glance'), url => "Admin/Users/MyRT.html?id=".$id);
}
};
if ( RT->config->get('gnupg')->{'enable'} ) {
-Jifty->web->navigation->child( 'this'}{'subtabs'}{'GnuPG' => label => _('GnuPG'), url => "Admin/Users/GnuPG.html?id=".$id,
+Jifty->web->navigation->child(_('GnuPG'), url => "Admin/Users/GnuPG.html?id=".$id,
};
}
}
if (Jifty->web->current_user->has_right( object => RT->system, right => 'AdminUsers')) {
-Jifty->web->navigation->child( "A" => label => _('Select'), url => "Admin/Users/");
-Jifty->web->navigation->child( "B" => label => _('Create'), url => "Admin/Users/Modify.html?create=1", separator => 1);
+Jifty->web->navigation->child(_('Select'), url => "Admin/Users/");
+Jifty->web->navigation->child(_('Create'), url => "Admin/Users/Modify.html?create=1", separator => 1);
}
# Admin/Queues
@@ -946,9 +946,9 @@ Jifty->web->navigation->child( "this" =>
label => $group_obj->name,
url => "User/Groups/Modify.html?id=" . $group_obj->id,
Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child( Basics => label => _('Basics'), url => "User/Groups/Modify.html?id=" . $group_obj->id);
+ Jifty->web->navigation->child(_('Basics'), url => "User/Groups/Modify.html?id=" . $group_obj->id);
- Jifty->web->navigation->child( Members => label => _('Members'), url => "User/Groups/Members.html?id=" . $group_obj->id);
+ Jifty->web->navigation->child(_('Members'), url => "User/Groups/Members.html?id=" . $group_obj->id);
} };
}
commit 32b2508a5bae55521077623b22d18abb85a2011c
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Oct 21 19:18:27 2009 -0400
further refinements of dispatcher overhaul
diff --git a/lib/RT/Dispatcher.pm b/lib/RT/Dispatcher.pm
index 0afcbad..21611f8 100644
--- a/lib/RT/Dispatcher.pm
+++ b/lib/RT/Dispatcher.pm
@@ -180,155 +180,87 @@ on qr{^/Ticket/Graphs/(\d+)} => run {
};
before qr{.*} => run {
- Jifty->web->navigation->child(_('Homepage'), url => '/' );
- Jifty->web->navigation->child(
-_('Simple Search'),
- url => '/Search/Simple.html'
- );
- Jifty->web->navigation->child(
-_('Tickets'),
- url => '/Search/Build.html'
- );
- my $tools = Jifty->web->navigation->child(_('Tools'), url => '/Tools/index.html' );
- $tools->child(_('Dashboards'), url => '/Dashboards/index.html');
- my $reports = $tools->child(_('Reports'), url => '/Tools/Reports/index.html');
- $reports->child(
-_('Resolved by owner'),
- url => '/Tools/Reports/ResolvedByOwner.html',
- );
- $reports->child(
-_('Resolved in date range'),
- url => '/Tools/Reports/ResolvedByDates.html',
- );
- $reports->child(
-_('Created in a date range'),
- url => '/Tools/Reports/CreatedByDates.html',
- );
+ Jifty->web->navigation->child( _('Homepage'), url => '/' );
+ Jifty->web->navigation->child( _('Simple Search'), url => '/Search/Simple.html' );
+ Jifty->web->navigation->child( _('Tickets'), url => '/Search/Build.html' );
+ my $tools = Jifty->web->navigation->child( _('Tools'), url => '/Tools/index.html' );
+ $tools->child( _('Dashboards'), url => '/Dashboards/index.html' );
- $tools->child(_('My Day'), url => '/Tools/MyDay.html');
+ my $reports = $tools->child( _('Reports'), url => '/Tools/Reports/index.html' );
+ $reports->child( _('Resolved by owner'), url => '/Tools/Reports/ResolvedByOwner.html', );
+ $reports->child( _('Resolved in date range'), url => '/Tools/Reports/ResolvedByDates.html', );
+ $reports->child( _('Created in a date range'), url => '/Tools/Reports/CreatedByDates.html', );
- if ( Jifty->web->current_user->user_object &&
- Jifty->web->current_user->has_right( right => 'ShowConfigTab', object => RT->system ) ) {
- my $admin = Jifty->web->navigation->child(_('Configuration'), url => '/Admin/' );
- $admin->child(
-_('Users'),
- url => '/Admin/Users/',
- );
- $admin->child(
-_('Groups'),
- url => '/Admin/Groups/',
- );
- $admin->child(
-_('Queues'),
- url => '/Admin/Queues/',
- );
- $admin->child(
- D => 'label' => _('Custom Fields'),
- url => '/Admin/CustomFields/',
- );
- $admin->child(
- E => 'label' => _('Rules'),
- url => '/admin/rules/',
- );
- my $admin_global = $admin->child(
- F => 'label' => _('Global'),
- url => '/Admin/Global/',
- );
+ $tools->child( _('My Day'), url => '/Tools/MyDay.html' );
- $admin_global->child(
-_('Templates'),
- url => '/Admin/Global/Templates.html',
- );
- $admin_global->child(
-_('Workflows'),
- url => '/Admin/Global/Workflows/index.html',
- );
+ if ( Jifty->web->current_user->user_object
+ && Jifty->web->current_user->has_right( right => 'ShowConfigTab', object => RT->system ) )
+ {
+ my $admin = Jifty->web->navigation->child( Config => label => _('Configuration'), url => '/Admin/' );
+ $admin->child( _('Users'), url => '/Admin/Users/', );
+ $admin->child( _('Groups'), url => '/Admin/Groups/', );
+ $admin->child( _('Queues'), url => '/Admin/Queues/', );
+ $admin->child( _('Custom Fields'), url => '/Admin/CustomFields/', );
+ $admin->child( _('Rules'), url => '/admin/rules/', );
+
+ my $admin_global = $admin->child( _('Global'), url => '/Admin/Global/', );
+
+ $admin_global->child( _('Templates'), url => '/Admin/Global/Templates.html', );
+ my $workflows = $admin_global->child( _('Workflows'), url => '/Admin/Global/Workflows/index.html', );
+ {
+ $workflows->child( _('Select') .'/'. _('Create') => url => "/Admin/Global/Workflows/index.html");
+ $workflows->child( _('Localization') => url => "/Admin/Global/Workflows/Localization.html");
+ $workflows->child( _('Mappings') => url => "/Admin/Global/Workflows/Mappings.html");
+ }
- $admin_global->child(
-_('Custom Fields'),
- url => '/Admin/Global/CustomFields/index.html',
- );
- $admin_global->child(
-_('Group rights'),
- url => '/Admin/Global/GroupRights.html',
- );
- $admin_global->child(
-_('User rights'),
- url => '/Admin/Global/UserRights.html',
- );
- $admin_global->child(
-_('RT at a glance'),
- url => '/Admin/Global/MyRT.html',
- );
- $admin_global->child(
-_('Jifty'),
- url => '/Admin/Global/Jifty.html',
- );
- $admin_global->child(
-_('System'),
- url => '/Admin/Global/System.html',
- );
+ $admin_global->child( _('Custom Fields'), url => '/Admin/Global/CustomFields/index.html', );
+ $admin_global->child( _('Group rights'), url => '/Admin/Global/GroupRights.html', );
+ $admin_global->child( _('User rights'), url => '/Admin/Global/UserRights.html', );
+ $admin_global->child( _('RT at a glance'), url => '/Admin/Global/MyRT.html', );
+ $admin_global->child( _('Jifty'), url => '/Admin/Global/Jifty.html', );
+ $admin_global->child( _('System'), url => '/Admin/Global/System.html', );
- my $admin_tools = $admin->child(
- G => 'label' => _('Tools'),
- url => '/Admin/Tools/',
- );
- $admin_tools->child(
-_('System Configuration'),
- url => '/Admin/Tools/Configuration.html',
- );
- $admin_tools->child(
-_('Shredder'),
- url => '/Admin/Tools/Shredder',
- );
+ my $admin_tools = $admin->child( _('Tools'), url => '/Admin/Tools/',);
+ $admin_tools->child( _('System Configuration'), url => '/Admin/Tools/Configuration.html', );
+ $admin_tools->child( _('Shredder'), url => '/Admin/Tools/Shredder', );
}
- if ( Jifty->web->current_user->user_object &&
- Jifty->web->current_user->has_right(
+ if (Jifty->web->current_user->user_object
+ && Jifty->web->current_user->has_right(
right => 'ModifySelf',
object => RT->system
- ) )
+ )
+ )
{
- my $prefs = Jifty->web->navigation->child(
-_('Preferences'),
- url => '/Prefs/Other.html'
- );
+ my $prefs = Jifty->web->navigation->child( _('Preferences'), url => '/Prefs/Other.html' );
- $prefs->child(
-_('Settings'),
- url => '/Prefs/Other.html',
- );
+ $prefs->child( _('Settings'), url => '/Prefs/Other.html', );
+ $prefs->child( _('About me'), url => '/User/Prefs.html', );
+ $prefs->child( _('Search options'), url => '/Prefs/SearchOptions.html', );
+ $prefs->child( _('RT at a glance'), url => '/Prefs/MyRT.html', );
+ }
- $prefs->child(
-_('About me'),
- url => '/User/Prefs.html',
- );
- $prefs->child(
-_('Search options'),
- url => '/Prefs/SearchOptions.html',
- );
- $prefs->child(
-_('RT at a glance'),
- url => '/Prefs/MyRT.html',
- );
+ if (Jifty->web->current_user->user_object && Jifty->web->current_user->has_right( right => 'ShowApprovalsTab', object => RT->system)) {
+ Jifty->web->navigation->child( _('Approval'), url => '/Approvals/' );
}
+};
- if ( Jifty->web->current_user->user_object &&
- Jifty->web->current_user->has_right(
- right => 'ShowApprovalsTab',
- object => RT->system
- )
- )
- {
- Jifty->web->navigation->child(
-_('Approval'),
- url => '/Approvals/'
+before 'Dashboards/' => sub {
+ my $dashboard_list = Jifty->web->page_navigation( _('Select dashboard'), url => "/Dashboards/index.html" );
+
+ my $dashboard = RT::Dashboard->new( current_user => Jifty->web->current_user );
+ my @objects = $dashboard->_privacy_objects( create => 1 );
+
+ if (@objects) {
+ Jifty->web->page_navigation->child(
+ _('New dashboard'),
+ url => "/Dashboards/Modify.html?create=1",
+ separator => 1
);
}
};
-
before '/SelfService' => sub {
my $queues = RT::Model::QueueCollection->new( current_user => Jifty->web->current_user );
@@ -344,42 +276,65 @@ before '/SelfService' => sub {
last if ( $queue_count > 1 );
}
- Jifty->web->navigation->child(
-_('Open tickets'),
- url => '/SelfService/',
- );
- Jifty->web->navigation->child(
-_('Closed tickets'),
- url => '/SelfService/Closed.html',
- );
+ my $TOP = Jifty->web->navigation();
+
+ $TOP->child( _('Open tickets'), url => '/SelfService/', );
+ $TOP->child( _('Closed tickets'), url => '/SelfService/Closed.html', );
if ( $queue_count > 1 ) {
- Jifty->web->navigation->child(
-_('New ticket'),
- url => '/SelfService/CreateTicketInQueue.html'
- );
+ $TOP->child( _('New ticket'), url => '/SelfService/CreateTicketInQueue.html' );
} else {
- Jifty->web->navigation->child(
-_('New ticket'),
- url => '/SelfService/Create.html?queue=' . $queue_id
- );
+ $TOP->child( _('New ticket'), url => '/SelfService/Create.html?queue=' . $queue_id );
}
- if (Jifty->web->current_user->has_right(
- right => 'ModifySelf',
- object => RT->system
- )
- )
- {
- Jifty->web->navigation->child(
-_('Preferences'),
- url => '/SelfService/Prefs.html'
- );
+ if (Jifty->web->current_user->has_right( right => 'ModifySelf', object => RT->system)) {
+ $TOP->child( _('Preferences'), url => '/SelfService/Prefs.html' );
}
+ # XXX TODO RENDER GOTO TICKET WIDGET
+ #Jifty->web->navigation->child( B => html => $m->scomp('GotoTicket')
};
+before 'Admin/Queues' => sub {
+
+ #
+ my $id = 'MUST DEAL';
+ my $queue_obj = "must deal!";
+ my $tabs;
+ if ($id) {
+ my $queue = Jifty->web->page_navigation->child( $queue_obj->name => url => "Admin/Queues/Modify.html?id=" . $id );
+ $queue->child( _('Basics'), url => "Admin/Queues/Modify.html?id=" . $id );
+ $queue->child( _('Watchers'), url => "Admin/Queues/People.html?id=" . $id );
+ $queue->child( _('Templates'), url => "Admin/Queues/Templates.html?id=" . $id );
+
+ $queue->child( _('Ticket Custom Fields'),
+ url => '/Admin/Queues/CustomFields.html?sub_type=RT::Model::Ticket&id=' . $id );
+ $queue->child( _('Transaction Custom Fields'),
+ url => '/Admin/Queues/CustomFields.html?sub_type=RT::Model::Ticket-RT::Model::Transaction&id=' . $id );
+ $queue->child( _('Group rights'), url => "Admin/Queues/GroupRights.html?id=" . $id );
+ $queue->child( _('User rights'), url => "Admin/Queues/UserRights.html?id=" . $id );
+ }
+ if ( Jifty->web->current_user->has_right( object => RT->system, right => 'AdminQueue' ) ) {
+ Jifty->web->page_navigation->child( _('Select'), url => "Admin/Queues/" );
+ Jifty->web->page_navigation->child( _('Create'), url => "Admin/Queues/Modify.html?create=1", separator => 1 );
+ }
+};
+
+before 'User/Group' => sub {
+ my $group_obj = undef; #XXX TODO
+
+ # User/Groups
+ if ( $group_obj and $group_obj->id ) {
+ my $group = Jifty->web->navigation->child( url => "User/Groups/Modify.html?id=" . $group_obj->id );
+ $group->child( _('Basics'), url => "User/Groups/Modify.html?id=" . $group_obj->id );
+ $group->child( _('Members'), url => "User/Groups/Members.html?id=" . $group_obj->id );
+
+ }
+ Jifty->web->page_navigation( _('Select group') => url => "User/Groups/index.html" );
+ Jifty->web->page_navigation( _('New group') => url => "User/Groups/Modify.html?create=1", separator => 1 );
+
+};
=for later Navigation
# Top level tabs /Elements/Tabs
@@ -393,61 +348,20 @@ my $basetopactions = {
# /Tools/Dashboards tabs
-my $tabs;
-my $real_subtab = $current_subtab;
if ( $dashboard_obj and $dashboard_obj->id ) {
+ $dash = Jifty->web->navigation->child( "this" => label => $dashboard_obj->name, url => "Dashboards/Modify.html?id=" . $dashboard_obj->id);
+ $dash->child(_('Basics'), url => "Dashboards/Modify.html?id=" . $dashboard_obj->id);
+ $dash->child(_('Queries'), url => "Dashboards/Queries.html?id=" . $dashboard_obj->id);
+ $dash->child(_('Subscription'), url => "Dashboards/Subscription.html?dashboard_id=" . $dashboard_obj->id);
+ $dash->child(_('Show'), url => "Dashboards/" . $dashboard_obj->id . "/".$dashboard_obj->name)
- my $name = $dashboard_obj->name;
-
- my $modify = "Dashboards/Modify.html?id=" . $dashboard_obj->id;
- my $queries = "Dashboards/Queries.html?id=" . $dashboard_obj->id;
- my $render = "Dashboards/" . $dashboard_obj->id . "/$name";
-
-Jifty->web->navigation->child( "this" =>
- label => $dashboard_obj->name,
- url => $modify,
- current_subtab => $current_subtab,
- Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child(_('Basics'),
- url => $modify,
- );
-
- Jifty->web->navigation->child(_('Queries'),
- url => $queries,
- );
-
- Jifty->web->navigation->child(_('Subscription'),
- url =>
- "Dashboards/Subscription.html?dashboard_id=" . $dashboard_obj->id
- );
-
-
- Jifty->web->navigation->child(_('Show'),
- url => $render,
- );
}
- };
- delete $tabs->{"this"}{"subtabs"}{"c_Subscription"}
- unless $dashboard_obj->current_user_can_subscribe;
+ delete $tabs->{"this"}{"subtabs"}{"c_Subscription"} unless $dashboard_obj->current_user_can_subscribe;
$tabs->{"this"}{"subtabs"}{"z_Preview"}{url} = $real_subtab
if $real_subtab =~ /Render/
|| $real_subtab =~ /Dashboard\/\d+/;
-
- $current_subtab = $modify;
-}
-
-$tabs->{"A"} = { label => _('Select dashboard'),
- url => "Dashboards/index.html" };
-
-my $dashboard = RT::Dashboard->new( current_user => Jifty->web->current_user );
-my @objects = $dashboard->_privacy_objects(create => 1);
-
-if (@objects) {
-Jifty->web->navigation->child(_('New dashboard'),
- url => "Dashboards/Modify.html?create=1",
- separator => 1 };
}
@@ -455,146 +369,50 @@ Jifty->web->navigation->child(_('New dashboard'),
# /SelfService Tabs
-my $actions = {
- Jifty->web->navigation->child( B => html => $m->scomp('GotoTicket')
- }
- };
-
-
# /Admin/CustomFields tabs
+if (Jifty->web->current_user->has_right( object => RT->system, right => 'AdminCustomField')) {
+Jifty->web->page_navigation->child(_('Select'), url => "Admin/CustomFields/");
+Jifty->web->page_navigation->child(_('Create'), url => "Admin/CustomFields/Modify.html?create=1", separator => 1,);
if ($id) {
- my $cf = RT::Model::CustomField->new( current_user => Jifty->web->current_user );
+ my $cf = RT::Model::CustomField->new();
$cf->load($id);
- $tabs = {
- Jifty->web->navigation->child( this =>
- label => $cf->name,
- url => "Admin/CustomFields/Modify.html?id=" . $id,
- current_subtab => $current_tab,
-
- Jifty->web->navigation->child( subtabs =>
-
- Jifty->web->navigation->child(_('Basics'),
- url => "Admin/CustomFields/Modify.html?id=" . $id,
- );
- Jifty->web->navigation->child(_('Group rights'),
- url => "Admin/CustomFields/GroupRights.html?id="
- . $id);
- Jifty->web->navigation->child( G =>
- label => _('User rights'),
- url => "Admin/CustomFields/UserRights.html?id=" . $id,
- );
-
- } }
+ $cftabs = Jifty->web->page_navigation->child( $cf->name, url => "Admin/CustomFields/Modify.html?id=" . $id );
- };
+ $cftabs->child(_('Basics') => url => "Admin/CustomFields/Modify.html?id=" . $id);
+ $cftabs->child( _('Group rights') => url => "Admin/CustomFields/GroupRights.html?id=" . $id);
+ $cftabs->child( _('User rights') => url => "Admin/CustomFields/UserRights.html?id=" . $id);
- if ($cf->lookup_type =~ /^RT::Model::Queue-/io) {
-Jifty->web->navigation->child( 'this'}->{subtabs}->{D =>
- label => _('Applies to'),
- url => "Admin/CustomFields/Objects.html?id=" . $id,
- };
- }
-}
-if (Jifty->web->current_user->has_right( object => RT->system, right => 'AdminCustomField')) {
-Jifty->web->navigation->child(_('Select'),
- url => "Admin/CustomFields/",
- };
-Jifty->web->navigation->child(_('Create'),
- url => "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}->{'url'} eq $current_tab) {
- $tabs->{'this'}->{'subtabs'}->{$tab}->{'subtabs'} = $subtabs;
- $tabs->{'this'}->{'subtabs'}->{$tab}->{'current_subtab'} = $current_subtab;
+ if ($cf->lookup_type =~ /^RT::Model::Queue-/io) {
+ $cftabs->child( _('Applies to'), url => "Admin/CustomFields/Objects.html?id=" . $id);
}
-}
-if( $id ) { $current_tab = "Admin/CustomFields/Modify.html?id=" . $id }
-
-# /Admin tabs
-
-
- my $tabs = {
-
-
- };
-
-# /Admin/Global tabs
- my $tabs = {
-
-};
+}
#/Admin/Global/Workflows tabs
-#
-my $base = "Admin/Global/Workflows";
-my $parent_subtab;
-my $parent_subtabs = {
- Jifty->web->navigation->child( A =>
- label => _('Select') .'/'. _('Create'),
- url => "$base/index.html",
- );
- Jifty->web->navigation->child( B =>
- label => _('Localization'),
- url => "$base/Localization.html",
- );
- Jifty->web->navigation->child( C =>
- label => _('Mappings'),
- url => "$base/Mappings.html",
- );
-};
if ( $schema ) {
my $qs_name = $m->comp( '/Elements/QueryString', name => $schema->name );
- $current_tab .= "?$qs_name";
-
- $parent_subtab = "$base/Summary.html?$qs_name";
-Jifty->web->navigation->child( 'E' =>
- label => $schema->name,
- url => $parent_subtab,
- separator => 1,
- current_subtab => $current_tab,
- Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child( A =>
- label => _("Summary"),
- url => "$base/Summary.html?$qs_name",
- );
- Jifty->web->navigation->child( B =>
- label => _("Statuses"),
- url => "$base/Statuses.html?$qs_name",
- );
- Jifty->web->navigation->child( C =>
- label => _("Transitions"),
- url => "$base/Transitions.html?$qs_name",
- );
- Jifty->web->navigation->child( D =>
- label => _("Interface"),
- url => "$base/Interface.html?$qs_name",
- );
+
+ $workflow = Jifty->web->page_navigation( $schema->name, url => "$base/Summary.html?$qs_name");
+ $workflow->child( _("Summary") => url => "$base/Summary.html?$qs_name");
+ $workflow->child( _("Statuses") => url => "$base/Statuses.html?$qs_name");
+ $workflow->child( _("Transitions") => url => "$base/Transitions.html?$qs_name");
+ $workflow->child( _("Interface") => url => "$base/Interface.html?$qs_name");
);
};
}
-else {
- $parent_subtab = $current_tab;
-}
-
# /Ticket/Elements/Tabs
-my $tabs = {};
-my $actions;
-my $current_toptab = "Search/Build.html", my $searchtabs = {};
+my $current_toptab = "Search/Build.html"; my $searchtabs = {};
if ($ticket) {
@@ -613,85 +431,40 @@ if ($ticket) {
# Don't display prev links if we're on the first ticket
if ( $item_map->{ $ticket->id }->{prev} ) {
-Jifty->web->navigation->child( '_a' =>
- class => "nav",
- url => "Ticket/Display.html?id=" . $item_map->{first);
- label => '<< ' . _('First')
- };
-Jifty->web->navigation->child( "_b" =>
- class => "nav",
- url => "Ticket/Display.html?id="
- . $item_map->{ $ticket->id }->{prev);
- label => '< ' . _('Prev')
- };
- }
+Jifty->web->page_navigation->child( '<< ' . _('First') => class => "nav", url => "Ticket/Display.html?id=" . $item_map->{first});
+Jifty->web->page_navigation->child( '< ' . _('Prev') => class => "nav", url => "Ticket/Display.html?id=" . $item_map->{ $ticket->id }->{prev});
# Don't display next links if we're on the last ticket
if ( $item_map->{ $ticket->id }->{next} ) {
-Jifty->web->navigation->child( 'd' =>
- class => "nav",
- url => "Ticket/Display.html?id="
- . $item_map->{ $ticket->id }->{next);
- label => _('next') . ' >'
- };
-Jifty->web->navigation->child( 'e' =>
- class => "nav",
- url => "Ticket/Display.html?id=" . $item_map->{last);
- label => _('Last') . ' >>'
- };
- }
- }
+ Jifty->web->page_navigation->child(
+ _('next') . ' >' => class => "nav",
+ url => "Ticket/Display.html?id=" . $item_map->{ $ticket->id }->{next}
+ );
+ Jifty->web->page_navigation->child(
+ _('Last') . ' >>' => class => "nav",
+ url => "Ticket/Display.html?id=" . $item_map->{last}
+ );
-Jifty->web->navigation->child( "this" =>
- class => "currentnav",
- url => "Ticket/Display.html?id=" . $ticket->id,
- label => "#" . $id,
- current_subtab => $current_subtab
- };
+ my $ticket = Jifty->web->page_navigation->child(
+ "#" . $id => class => "currentnav",
+ url => "Ticket/Display.html?id=" . $ticket->id,
+ );
- my $ticket_page_tabs = {
- Jifty->web->navigation->child( _A =>
- label => _('Display'),
- url => "Ticket/Display.html?id=" . $id,
- );
+ $ticket->child( _('Display') => url => "Ticket/Display.html?id=" . $id );
- Jifty->web->navigation->child( _Ab =>
- label => _('History'),
- url => "Ticket/History.html?id=" . $id,
- );
- Jifty->web->navigation->child( _B =>
- label => _('Basics'),
- url => "Ticket/Modify.html?id=" . $id,
- );
+ $ticket->child( _('History') => url => "Ticket/History.html?id=" . $id );
+ $ticket->child( _('Basics') => url => "Ticket/Modify.html?id=" . $id );
- Jifty->web->navigation->child( _C =>
- label => _('Dates'),
- url => "Ticket/ModifyDates.html?id=" . $id,
- );
- Jifty->web->navigation->child( _D =>
- label => _('People'),
- url => "Ticket/ModifyPeople.html?id=" . $id,
- );
- Jifty->web->navigation->child( _E =>
- label => _('Links'),
- url => "Ticket/ModifyLinks.html?id=" . $id,
- );
- Jifty->web->navigation->child( _X =>
- label => _('Jumbo'),
- url => "Ticket/ModifyAll.html?id=" . $id,
- );
-
- };
- $current_tab = "Ticket/Display.html?id=" . $id;
+ $ticket->child( _('Dates') => url => "Ticket/ModifyDates.html?id=" . $id );
+ $ticket->child( _('People'), url => "Ticket/ModifyPeople.html?id=" . $id );
+ $ticket->child( _('Links'), url => "Ticket/ModifyLinks.html?id=" . $id );
+ $ticket->child( _('Jumbo'), url => "Ticket/ModifyAll.html?id=" . $id );
+ }
my %can = ( ModifyTicket => $ticket->current_user_has_right('ModifyTicket'));
- if ( $can{'ModifyTicket'} or $ticket->current_user_has_right('ReplyToTicket') )
- {
-Jifty->web->navigation->child( 'F' =>
- label => _('Reply'),
- url => "Ticket/Update.html?action=respond&id=" . $id,
- };
+ if ( $can{'ModifyTicket'} or $ticket->current_user_has_right('ReplyToTicket') ) {
+ Jifty->web->navigation->child( _('Reply'), url => "Ticket/Update.html?action=respond&id=" . $id )
}
if ( $can{'ModifyTicket'} ) {
@@ -704,51 +477,28 @@ Jifty->web->navigation->child( 'F' =>
my $url = 'Ticket/';
if ( $action ) {
- $url .= "Update.html?". $m->comp(
- '/Elements/QueryString',
- action => $action,
- default_status => $next,
- id => $id
- );
+ $url .= "Update.html?". $m->comp( '/Elements/QueryString', action => $action, default_status => $next, id => $id);
} else {
- $url .= "Display.html?". $m->comp(
- '/Elements/QueryString',
- Status => $next,
- id => $id
- );
+ $url .= "Display.html?". $m->comp( '/Elements/QueryString', Status => $next, id => $id);
}
-Jifty->web->navigation->child( 'G'. $i++ =>
- url => $url,
- label => _( $schema->transition_label( $current => $next ) ),
- };
+ Jifty->web->page_navigation->child( _( $schema->transition_label( $current => $next ) ) => url => $url);
}
}
if ( $ticket->current_user_has_right('OwnTicket') ) {
if ( $ticket->owner_obj->id == RT->nobody->id ) {
-Jifty->web->navigation->child( 'B' =>
- url => "Ticket/Display.html?action=take&id=" . $id,
- label => _('Take'),
- }
+ Jifty->web->page_navigation->child( _('Take') => url => "Ticket/Display.html?action=take&id=" . $id );
if $can{'ModifyTicket'}
or $ticket->current_user_has_right('TakeTicket');
} elsif ( $ticket->owner_obj->id != Jifty->web->current_user->id ) {
-Jifty->web->navigation->child( 'C' =>
- url => "Ticket/Display.html?action=steal&id=" . $id,
- label => _('Steal'),
- }
+ Jifty->web->page_navigation->child( _('Steal') => url => "Ticket/Display.html?action=steal&id=" . $id )
if $can{'ModifyTicket'}
or $ticket->current_user_has_right('StealTicket');
}
}
- if ( $can{'ModifyTicket'}
- or $ticket->current_user_has_right('CommentOnTicket') )
- {
-Jifty->web->navigation->child( 'E' =>
- label => _('Comment'),
- url => "Ticket/Update.html?action=comment&id=" . $id,
- };
+ if ( $can{'ModifyTicket'} or $ticket->current_user_has_right('CommentOnTicket') ) {
+Jifty->web->page_navigation->child( _('Comment') => url => "Ticket/Update.html?action=comment&id=" . $id );
}
$actions->{'_ZZ'}
@@ -760,46 +510,35 @@ Jifty->web->navigation->child( 'E' =>
my $args = '';
my $has_query = '';
my %query_args;
-my $search_id = $ARGS{'saved_search_id'}
- || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'searchid'} || '';
+my $search = Jifty->web->session->get('CurrentSearchHash') || {};
+my $search_id = $ARGS{'saved_search_id'} || && ->{'searchid'} || '';
+
+$has_query = 1 if ( $ARGS{'query'} or && ->{'query'} );
+
-$has_query = 1 if ( $ARGS{'query'} or Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'query'} );
-
%query_args = (
saved_search_id => ($search_id eq 'new') ? undef : $search_id,
- query => $ARGS{'query'} || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'query');
- format => $ARGS{'format'} || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'format');
- order_by => $ARGS{'order_by'}
- || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'order_by');
- order => $ARGS{'order'} || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'order');
- page => $ARGS{'page'} || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'page');
- rows_per_page => $ARGS{'rows_per_page'} || Jifty->web->session->get('CurrentSearchHash') && Jifty->web->session->get('CurrentSearchHash')->{'rows_per_page');
+ query => $ARGS{'query'} || $search->{'query'},
+ format => $ARGS{'format'} || $search->{'format'},
+ order_by => $ARGS{'order_by'} || $search->{'order_by'},
+ order => $ARGS{'order'} || $search->{'order'},
+ page => $ARGS{'page'} || $search->{'page'},
+ rows_per_page => $ARGS{'rows_per_page'} || $search->{'rows_per_page'}
);
$args = "?" . $m->comp( '/Elements/QueryString', %query_args );
-$tabs->{"f"} = {
- url => "Search/Build.html?NewQuery=1",
- label => _('New Search')
-};
-$tabs->{"g"} = {
- url => "Search/Build.html" . (($has_query) ? $args : ''),
- label => _('Edit Search')
-};
-$tabs->{"h"} = {
- url => "Search/Edit.html$args",
- label => _('Advanced'),
- separator => 1
-};
+$search->child( _('New Search') => url => "Search/Build.html?NewQuery=1" );
+$search->child( _('Edit Search') => url => "Search/Build.html" . (($has_query) ? $args : '');
+ $search->child( _('Advanced') => url => "Search/Edit.html$args");
+
+
if ($has_query) {
if ( $current_tab =~ m{Search/Results.html} ) {
- $current_tab = "Search/Results.html$args";
- if ( Jifty->web->current_user
- ->has_right( right => 'SuperUser', object => RT->system ) )
- {
+ if ( Jifty->web->current_user->has_right( right => 'SuperUser', object => RT->system ) ) {
my $shred_args = $m->comp(
'/Elements/QueryString',
search => 1,
@@ -808,26 +547,11 @@ if ($has_query) {
'Tickets:limit' => $query_args{'rows'}
);
-Jifty->web->navigation->child( "shredder" =>
- url => 'Admin/Tools/Shredder/?' . $shred_args,
- label => _('Shredder')
- };
-
- }
- }
- if ( $current_tab =~ m{Search/(Bulk|Build|Edit)\.html} ) {
- $current_tab = "Search/$1.html$args";
- }
+Jifty->web->page_navigation->child( _('Shredder') url => 'Admin/Tools/Shredder/?' . $shred_args );
-Jifty->web->navigation->child( "i" =>
- url => "Search/Results.html$args",
- label => _('Show Results'),
- };
+Jifty->web->page_navigation->child( _('Show Results') => url => "Search/Results.html$args");
-Jifty->web->navigation->child( "j" =>
- url => "Search/Bulk.html$args",
- label => _('Bulk Update'),
- };
+Jifty->web->page_navigation->child( _('Bulk Update') => url => "Search/Bulk.html$args");
}
@@ -858,33 +582,6 @@ Jifty->web->navigation->child(_('Select'), url => "Admin/Users/");
Jifty->web->navigation->child(_('Create'), url => "Admin/Users/Modify.html?create=1", separator => 1);
}
-# Admin/Queues
-#
-my $tabs;
-if ($id) {
-Jifty->web->navigation->child( 'this' =>
- label => $queue_obj->name,
- url => "Admin/Queues/Modify.html?id=".$id,
- current_subtab => $current_tab,
- Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child( _('Basics'), url => "Admin/Queues/Modify.html?id=".$id);
- Jifty->web->navigation->child( _('Watchers'), url => "Admin/Queues/People.html?id=".$id);
- Jifty->web->navigation->child( _('Templates'), url => "Admin/Queues/Templates.html?id=".$id);
-
- Jifty->web->navigation->child( _('Ticket Custom Fields'), url => '/Admin/Queues/CustomFields.html?sub_type=RT::Model::Ticket&id='.$id);
-
- Jifty->web->navigation->child( _('Transaction Custom Fields'), url => '/Admin/Queues/CustomFields.html?sub_type=RT::Model::Ticket-RT::Model::Transaction&id='.$id);
-
- Jifty->web->navigation->child( _('Group rights'), url => "Admin/Queues/GroupRights.html?id=".$id);
- Jifty->web->navigation->child( _('User rights'), url => "Admin/Queues/UserRights.html?id=".$id, }
- }
- };
-}
-if (Jifty->web->current_user->has_right( object => RT->system, right => 'AdminQueue')) {
-Jifty->web->navigation->child( _('Select'), url => "Admin/Queues/");
-Jifty->web->navigation->child( _('Create'), url => "Admin/Queues/Modify.html?create=1", separator => 1);
-}
-
# Admin/GlobalCustomFields
@@ -939,23 +636,6 @@ Jifty->web->navigation->child( $search->[0] =>
# User/
};
-
-# User/Groups
-if ( $group_obj and $group_obj->id ) {
-Jifty->web->navigation->child( "this" =>
- label => $group_obj->name,
- url => "User/Groups/Modify.html?id=" . $group_obj->id,
- Jifty->web->navigation->child( subtabs =>
- Jifty->web->navigation->child(_('Basics'), url => "User/Groups/Modify.html?id=" . $group_obj->id);
-
- Jifty->web->navigation->child(_('Members'), url => "User/Groups/Members.html?id=" . $group_obj->id);
-
- } };
-}
-$tabs->{"A"} = { label => _('Select group'), url => "User/Groups/index.html" };
-$tabs->{"B"} = { label => _('New group'), url => "User/Groups/Modify.html?create=1", separator => 1 };
-
-
=cut
# Now let callbacks add their extra tabs
diff --git a/lib/RT/View/Admin/CustomFields.pm b/lib/RT/View/Admin/CustomFields.pm
index 142819e..5e5d825 100644
--- a/lib/RT/View/Admin/CustomFields.pm
+++ b/lib/RT/View/Admin/CustomFields.pm
@@ -56,8 +56,6 @@ use constant page_title => 'Custom Field Management';
use constant object_type => 'CustomField';
use constant display_columns => qw(name type);
-use constant tab_url => '/Admin/Elements/CustomFieldTabs';
-use constant current_tab => 'Admin/Queues/';
1;
diff --git a/lib/RT/View/Admin/Groups.pm b/lib/RT/View/Admin/Groups.pm
index 348ec9f..f8580b7 100644
--- a/lib/RT/View/Admin/Groups.pm
+++ b/lib/RT/View/Admin/Groups.pm
@@ -54,8 +54,6 @@ use base 'RT::View::CRUD';
use constant page_title => 'Group Management';
use constant object_type => 'Group';
-use constant tab_url => '/Admin/Elements/GroupTabs';
-use constant current_tab => 'Admin/Groups/';
use constant display_columns => qw(id name description);
diff --git a/lib/RT/View/Admin/Queues.pm b/lib/RT/View/Admin/Queues.pm
index 13a39fb..be7b6a4 100644
--- a/lib/RT/View/Admin/Queues.pm
+++ b/lib/RT/View/Admin/Queues.pm
@@ -56,8 +56,6 @@ use constant page_title => 'Queue Management';
use constant object_type => 'Queue';
use constant display_columns => qw(id name description correspond_address initial_priority default_due_in);
-use constant tab_url => '/Admin/Elements/QueueTabs';
-use constant current_tab => 'Admin/Queues/';
1;
diff --git a/lib/RT/View/Admin/Rules.pm b/lib/RT/View/Admin/Rules.pm
index bd62203..51b16ca 100644
--- a/lib/RT/View/Admin/Rules.pm
+++ b/lib/RT/View/Admin/Rules.pm
@@ -54,8 +54,6 @@ use base 'RT::View::CRUD';
use constant page_title => 'Rule Management';
use constant object_type => 'Rule';
-use constant tab_url => '/Admin/Elements/RuleTabs';
-use constant current_tab => 'admin/rules/'; # this is not working
use constant display_columns => qw(id description condition_code prepare_code action_code);
diff --git a/lib/RT/View/Admin/Users.pm b/lib/RT/View/Admin/Users.pm
index 1076706..9a911ce 100644
--- a/lib/RT/View/Admin/Users.pm
+++ b/lib/RT/View/Admin/Users.pm
@@ -56,8 +56,6 @@ use constant page_title => 'User Management';
use constant object_type => 'User';
use constant display_columns => qw(id name email);
-use constant tab_url => '/Admin/Elements/UserTabs';
-use constant current_tab => 'Admin/Users/';
# limit to privileged users
sub _current_collection {
diff --git a/lib/RT/View/CRUD.pm b/lib/RT/View/CRUD.pm
index b2423ac..dd91b74 100644
--- a/lib/RT/View/CRUD.pm
+++ b/lib/RT/View/CRUD.pm
@@ -56,21 +56,12 @@ __PACKAGE__->use_mason_wrapper;
use constant per_page => 50;
-use constant tab_url => '/Elements/Tabs';
-use constant current_tab => '';
-sub current_subtab { shift->current_tab(@_) }
template 'index.html' => page {
title => shift->page_title,
} content {
my $self = shift;
- render_mason($self->tab_url, {
- current_tab => $self->current_tab,
- current_subtab => $self->current_subtab,
- title => $self->page_title,
- });
-
form {
render_region(
name => $self->object_type.'-list',
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list