%# BEGIN LICENSE BLOCK
%# 
%#  Copyright (c) 2002-2003 Jesse Vincent <jesse@bestpractical.com>
%#  
%#  This program is free software; you can redistribute it and/or modify
%#  it under the terms of version 2 of the GNU General Public License 
%#  as published by the Free Software Foundation.
%# 
%#  A copy of that license should have arrived with this
%#  software, but in any event can be snarfed from www.gnu.org.
%# 
%#  This program is distributed in the hope that it will be useful,
%#  but WITHOUT ANY WARRANTY; without even the implied warranty of
%#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%#  GNU General Public License for more details.
%# 
%# END LICENSE BLOCK
<& /Elements/Header, Title => $Title &>
<& /Admin/RTFM/Elements/Tabs, 
    subtabs => $tabs, 
    current_tab => 'Admin/RTFM/Classes/index.html', 
    current_subtab => $current_tab, 
    Title => $Title &>
<%INIT>
my $tabs;
if ($id) {

   $tabs = {
                 D => { title => loc('Basics'),
                        path => "Admin/RTFM/Classes/Modify.html?id=".$id,
                      },

                 E => { title => loc('Topics'),
                        path => "Admin/RTFM/Classes/Topics.html?id=".$id,
                      },

                 F => { title => loc('Custom Fields'),
                        path => 'Admin/RTFM/Classes/CustomFields.html?id='.$id,
                      },

                 G => { title => loc('Group Rights'),
                        path => "Admin/RTFM/Classes/GroupRights.html?id=".$id,
                      },      

                 H => { title => loc('User Rights'),
                        path => "Admin/RTFM/Classes/UserRights.html?id=".$id,
                      },
           };
}
if ($session{'CurrentUser'}->HasRight( Object => $RT::FM::System, Right => 'AdminClass')) {
  $tabs->{"A"} = { title => loc('Select class'),
                        path => "Admin/RTFM/Classes/index.html",
                           };
  $tabs->{"B"} = { title => loc('New class'),
                        path => "Admin/RTFM/Classes/Modify.html?Create=1",
                        separator => 1,
                           };
}

</%INIT>
<%ARGS>
$id => undef
$current_tab => undef
$current_subtab => undef
$subtabs => undef
$Title => undef
</%ARGS>
