3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 %# (Except where explictly superceded by other copyright notices)
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %# General Public License for more details.
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
24 <& /Admin/Elements/Tabs,
26 current_tab => 'Admin/Queues/',
27 current_subtab => $current_tab,
34 title => $QueueObj->Name,
35 path => "Admin/Queues/Modify.html?id=".$id,
36 current_subtab => $current_tab,
38 C => { title => loc('Basics'),
39 path => "Admin/Queues/Modify.html?id=".$id,
41 D => { title => loc('Watchers'),
42 path => "Admin/Queues/People.html?id=".$id,
45 E => { title => loc('Scrips'),
46 path => "Admin/Queues/Scrips.html?id=".$id,
48 F => { title => loc('Templates'),
49 path => "Admin/Queues/Templates.html?id=".$id,
52 G => { title => loc('Custom Fields'),
53 path => 'Admin/Queues/CustomFields.html?id='.$id,
56 H => { title => loc('Group Rights'),
57 path => "Admin/Queues/GroupRights.html?id=".$id,
59 I => { title => loc('User Rights'),
60 path => "Admin/Queues/UserRights.html?id=".$id,
65 if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue')) {
66 $tabs->{"A"} = { title => loc('Select queue'),
67 path => "Admin/Queues/",
69 $tabs->{"B"} = { title => loc('New queue'),
70 path => "Admin/Queues/Modify.html?Create=1",
75 # Now let callbacks add their extra tabs
76 $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
77 foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {
78 if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
79 $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs;
80 $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab;
83 $current_tab = "Admin/Queues/Modify.html?id=".$id if $id;
90 $current_subtab => undef