[Rt-commit] rtfm branch, rt-3.9-tabs, created. 3ef50aaf44d3db1b2165d5f4992c7352b17500ec
Alex Vandiver
alexmv at bestpractical.com
Thu Nov 11 05:53:40 EST 2010
The branch, rt-3.9-tabs has been created
at 3ef50aaf44d3db1b2165d5f4992c7352b17500ec (commit)
- Log -----------------------------------------------------------------
commit 3ef50aaf44d3db1b2165d5f4992c7352b17500ec
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Nov 11 05:53:28 2010 -0500
Updates for RT 3.9's new menuing scheme
diff --git a/html/Admin/RTFM/Classes/CustomFields.html b/html/Admin/RTFM/Classes/CustomFields.html
index 5b42ee6..dd71db7 100644
--- a/html/Admin/RTFM/Classes/CustomFields.html
+++ b/html/Admin/RTFM/Classes/CustomFields.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, id => $Object->id, Title => $title, current_tab => "Admin/RTFM/Classes/CustomFields.html?id=$id" &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::FM::Class', SubType => 'RT::FM::Article' &>
<%INIT>
my $Object = RT::FM::Class->new( $session{'CurrentUser'} );
diff --git a/html/Admin/RTFM/Classes/GroupRights.html b/html/Admin/RTFM/Classes/GroupRights.html
index 6d124a9..b9a50cc 100644
--- a/html/Admin/RTFM/Classes/GroupRights.html
+++ b/html/Admin/RTFM/Classes/GroupRights.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, id => $id, Title => loc('Modify group rights for Class [_1]', $ClassObj->Name) &>
+<& /Elements/Header, Title => loc('Modify group rights for Class [_1]', $ClassObj->Name) &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="GroupRights.html">
diff --git a/html/Admin/RTFM/Classes/Modify.html b/html/Admin/RTFM/Classes/Modify.html
index e46268b..74bb7f0 100644
--- a/html/Admin/RTFM/Classes/Modify.html
+++ b/html/Admin/RTFM/Classes/Modify.html
@@ -44,8 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, id => $ClassObj->id, current_tab =>
-$current_subtab, Title => $title &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form action="<%$RT::WebPath%>/Admin/RTFM/Classes/Modify.html" method="post">
diff --git a/html/Admin/RTFM/Classes/Objects.html b/html/Admin/RTFM/Classes/Objects.html
index f30b531..c5e4a22 100644
--- a/html/Admin/RTFM/Classes/Objects.html
+++ b/html/Admin/RTFM/Classes/Objects.html
@@ -45,7 +45,8 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, id => $Class->id, current_tab => "Admin/RTFM/Classes/Objects.html?id=$id", Title => $title &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form action="Objects.html" method="post">
diff --git a/html/Admin/RTFM/Classes/Topics.html b/html/Admin/RTFM/Classes/Topics.html
index a0e372e..e7a1fcc 100644
--- a/html/Admin/RTFM/Classes/Topics.html
+++ b/html/Admin/RTFM/Classes/Topics.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, id => $ClassObj->Id, Title => $title, current_tab => "Admin/RTFM/Classes/Topics.html?id=$id" &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Admin/RTFM/Elements/Topics, title => $title, RootObj => $ClassObj, %ARGS &>
diff --git a/html/Admin/RTFM/Classes/UserRights.html b/html/Admin/RTFM/Classes/UserRights.html
index 456d0b2..14741f0 100644
--- a/html/Admin/RTFM/Classes/UserRights.html
+++ b/html/Admin/RTFM/Classes/UserRights.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, id => $id , Title => loc('Modify user rights for class [_1]', $ClassObj->Name) &>
+<& /Elements/Header, Title => loc('Modify user rights for class [_1]', $ClassObj->Name) &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="UserRights.html">
diff --git a/html/Admin/RTFM/Classes/index.html b/html/Admin/RTFM/Classes/index.html
index e514f27..7afe2f6 100644
--- a/html/Admin/RTFM/Classes/index.html
+++ b/html/Admin/RTFM/Classes/index.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/ClassTabs, current_tab => 'Admin/RTFM/Classes/', current_subtab => 'Admin/RTFM/Classes/', Title => loc("Select a Class") &>
+<& /Elements/Header, Title => loc("Select a Class") &>
+<& /Elements/Tabs &>
<table>
<tr>
diff --git a/html/Admin/RTFM/Elements/ClassTabs b/html/Admin/RTFM/Elements/ClassTabs
deleted file mode 100644
index ad17605..0000000
--- a/html/Admin/RTFM/Elements/ClassTabs
+++ /dev/null
@@ -1,99 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED 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,
- },
- I => { title => loc('Applies to'),
- path => "Admin/RTFM/Classes/Objects.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>
diff --git a/html/Admin/RTFM/Elements/GlobalTabs b/html/Admin/RTFM/Elements/GlobalTabs
deleted file mode 100644
index e363282..0000000
--- a/html/Admin/RTFM/Elements/GlobalTabs
+++ /dev/null
@@ -1,76 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $Title &>
-<& /Admin/RTFM/Elements/Tabs,
- subtabs => $tabs,
- current_tab => 'Admin/RTFM/Global/index.html',
- current_subtab => $current_tab,
- Title => $Title &>
-<%INIT>
-my $tabs;
-
- $tabs = {
-
- F => { title => loc('Group Rights'),
- path => "Admin/RTFM/Global/GroupRights.html",
- },
- G => { title => loc('User Rights'),
- path => "Admin/RTFM/Global/UserRights.html",
- },
- H => { title => loc('Topics'),
- path => "Admin/RTFM/Global/Topics.html" }
-
-
-
-};
-</%INIT>
-<%ARGS>
-$current_tab => undef
-$current_subtab => undef
-$subtabs => undef
-$Title => undef
-</%ARGS>
diff --git a/html/Admin/RTFM/Elements/Tabs b/html/Admin/RTFM/Elements/Tabs
deleted file mode 100644
index 01bbd36..0000000
--- a/html/Admin/RTFM/Elements/Tabs
+++ /dev/null
@@ -1,81 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Tabs,
- subtabs => $tabs,
- current_tab => 'Admin/RTFM/index.html',
- current_subtab => $current_tab,
- Title => $Title &>
-<%INIT>
- my $tabs = { Classes => { title => loc('Classes'),
- path => 'Admin/RTFM/Classes/index.html',
- },
- Global => { title => loc('Global'),
- path => 'Admin/RTFM/Global/index.html',
- },
- CFs => { title => loc('Custom Fields'),
- path => 'Admin/CustomFields/index.html?'
- .$m->comp('/Elements/QueryString', type => 'RT::FM::Class-RT::FM::Article'),
- },
- };
- if (defined $current_tab) {
- foreach my $tab (sort keys %{$tabs}) {
- if ($tabs->{$tab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
- }
- }
- }
-
-</%INIT>
-
-
-<%ARGS>
-$subtabs => undef
-$current_tab => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/html/Admin/RTFM/Global/GroupRights.html b/html/Admin/RTFM/Global/GroupRights.html
index cd56048..92fab15 100644
--- a/html/Admin/RTFM/Global/GroupRights.html
+++ b/html/Admin/RTFM/Global/GroupRights.html
@@ -44,9 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/GlobalTabs,
- current_tab => 'Admin/RTFM/Global/GroupRights.html',
- Title => loc('Modify global group rights') &>
+<& /Elements/Header, Title => loc('Modify global group rights') &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="GroupRights.html">
diff --git a/html/Admin/RTFM/Global/Topics.html b/html/Admin/RTFM/Global/Topics.html
index 96cffa3..12b7f50 100644
--- a/html/Admin/RTFM/Global/Topics.html
+++ b/html/Admin/RTFM/Global/Topics.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/GlobalTabs, current_tab => 'Admin/Global/Topics.html', Title => $title &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Admin/RTFM/Elements/Topics, RootObj => $RT::FM::System, title => $title, %ARGS &>
<%INIT>
diff --git a/html/Admin/RTFM/Global/UserRights.html b/html/Admin/RTFM/Global/UserRights.html
index e25f739..eb860c9 100644
--- a/html/Admin/RTFM/Global/UserRights.html
+++ b/html/Admin/RTFM/Global/UserRights.html
@@ -44,9 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/GlobalTabs,
- current_tab => 'Admin/Global/UserRights.html',
- Title => loc('Modify global user rights') &>
+<& /Elements/Header, Title => loc('Modify global user rights') &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="UserRights.html">
<& /Elements/TitleBoxStart, title => loc('Modify global user rights.') &>
diff --git a/html/Admin/RTFM/Global/index.html b/html/Admin/RTFM/Global/index.html
index f365490..330dd43 100644
--- a/html/Admin/RTFM/Global/index.html
+++ b/html/Admin/RTFM/Global/index.html
@@ -44,7 +44,6 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /Admin/RTFM/Elements/GlobalTabs,
- current_tab => 'Admin/Global/UserRights.html',
- Title => '' &>
+<& /Elements/Header, Title => '' &>
+<& /Elements/Tabs &>
diff --git a/html/Admin/RTFM/index.html b/html/Admin/RTFM/index.html
index c131b09..36b87c3 100644
--- a/html/Admin/RTFM/index.html
+++ b/html/Admin/RTFM/index.html
@@ -45,4 +45,4 @@
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
<& /Elements/Header, Title => loc('RTFM Administration') &>
-<& /Admin/RTFM/Elements/Tabs, Title => loc('RTFM Administration') &>
+<& /Elements/Tabs &>
diff --git a/html/Callbacks/RTFM/Admin/Elements/CustomFieldTabs/Default b/html/Callbacks/RTFM/Admin/Elements/CustomFieldTabs/Default
deleted file mode 100644
index 6dfc873..0000000
--- a/html/Callbacks/RTFM/Admin/Elements/CustomFieldTabs/Default
+++ /dev/null
@@ -1,62 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<%args>
-$id => undef
-$tabs => undef
-</%args>
-<%init>
-if ($id) {
- my $cf = RT::CustomField->new( $session{'CurrentUser'} );
- $cf->Load($id);
- if ($cf->LookupType =~ /^RT::FM::Class/io) {
- $tabs->{'this'}->{subtabs}->{RTFM_CLASS} = {
- title => loc('Applies to'),
- path => "Admin/CustomFields/Objects.html?id=" . $id,
- };
- }
-}
-</%init>
diff --git a/html/Callbacks/RTFM/Admin/Elements/Tabs/Default b/html/Callbacks/RTFM/Admin/Elements/Tabs/Default
deleted file mode 100644
index f723fc1..0000000
--- a/html/Callbacks/RTFM/Admin/Elements/Tabs/Default
+++ /dev/null
@@ -1,57 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<%args>
-$id => undef
-$tabs => undef
-</%args>
-<%init>
- $tabs->{RTFM} = {
- title => loc('RTFM'),
- path => "Admin/RTFM/index.html"
- };
-
-</%init>
diff --git a/html/Callbacks/RTFM/Admin/Global/CustomFields/index.html/Default b/html/Callbacks/RTFM/Admin/Global/CustomFields/index.html/Default
deleted file mode 100644
index f8a00e5..0000000
--- a/html/Callbacks/RTFM/Admin/Global/CustomFields/index.html/Default
+++ /dev/null
@@ -1,57 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<%args>
-$tabs => undef
-</%args>
-<%init>
-$tabs->{'RTFM-A'} = { title => loc('RTFM Articles'),
- text => loc('Select custom fields for RTFM articles in all classes'),
- path => 'RTFM-Class-RTFM-Article.html'
-
- };
-
-</%init>
diff --git a/html/Callbacks/RTFM/Admin/index.html/Default b/html/Callbacks/RTFM/Admin/index.html/Default
deleted file mode 100644
index f22be8d..0000000
--- a/html/Callbacks/RTFM/Admin/index.html/Default
+++ /dev/null
@@ -1,58 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<%args>
-$id => undef
-$tabs => undef
-</%args>
-<%init>
- $tabs->{RTFM} = {
- title => loc('RTFM'),
- path => "/Admin/RTFM/index.html",
- description => loc('Manage RTFM classes and permissions')
- };
-
-</%init>
diff --git a/html/Callbacks/RTFM/Elements/Tabs/Default b/html/Callbacks/RTFM/Elements/Tabs/Default
deleted file mode 100644
index f7ee7db..0000000
--- a/html/Callbacks/RTFM/Elements/Tabs/Default
+++ /dev/null
@@ -1,53 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<%init>
-$toptabs->{'BB-RTFM'} = { title =>loc("RTFM"),
- path => "RTFM/index.html" };
-</%init>
-<%args>
-$toptabs =>undef
-</%args>
diff --git a/html/Callbacks/RTFM/Elements/Tabs/Privileged b/html/Callbacks/RTFM/Elements/Tabs/Privileged
new file mode 100644
index 0000000..9202e7b
--- /dev/null
+++ b/html/Callbacks/RTFM/Elements/Tabs/Privileged
@@ -0,0 +1,92 @@
+<%init>
+my $path = $r->path_info;
+my $rtfm = Menu->child(rtfm => title => loc("RTFM"), path => "/RTFM/index.html");
+my $articles = $rtfm->child(articles => title => loc("Articles"), path => "/RTFM/Article/Search.html");
+$articles->child(search => title => loc("Search"), path => "/RTFM/Article/Search.html");
+$articles->child(new => title => loc("New Article"), path => "/RTFM/Article/PreCreate.html");
+if ($path =~ m{^/RTFM/Article/}) {
+ if (my $id = $m->request_args->{'id'}) {
+ PageMenu->child(display => title => loc("Display"), path => "/RTFM/Article/Display.html?id=$id");
+ PageMenu->child(history => title => loc("History"), path => "/RTFM/Article/History.html?id=$id");
+ my $obj = RT::FM::Article->new( $session{'CurrentUser'} );
+ $obj->Load($id);
+ PageMenu->child(modify => title => loc("Modify"), path => "/RTFM/Article/Edit.html?id=$id")
+ if $obj->CurrentUserHasRight("ModifyArticle");
+ PageMenu->child(delete => title => loc("Delete"), path => "/RTFM/Article/Delete.html?id=$id")
+ if $obj->CurrentUserHasRight("DeleteArticle");
+ }
+}
+
+$rtfm->child(topics => title => loc("Topics"), path => "/RTFM/Topics.html");
+if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => $RT::System ) ) {
+ my $config = Menu->child("tools")->child("config");
+ my $rtfmadmin = $config->child( rtfm => title => loc("RTFM"), path => "/Admin/RTFM/index.html" );
+ my $classadmin = $rtfmadmin->child( classes => title => loc("Classes"), path => "/Admin/RTFM/Classes/index.html" );
+ $classadmin->child( select => title => loc("Select class"), path => "/Admin/RTFM/Classes/index.html");
+ $classadmin->child( new => title => loc("New class"), path => "/Admin/RTFM/Classes/Modify.html?Create=1");
+ if ($path =~ m{^/Admin/RTFM/Classes/}) {
+ if (my $id = $m->request_args->{'id'}) {
+ PageMenu->child( basics =>
+ title => loc("Basics"),
+ path => "/Admin/RTFM/Classes/Modify.html?id=".$id,
+ );
+ PageMenu->child( topics =>
+ title => loc("Topics"),
+ path => "/Admin/RTFM/Classes/Topics.html?id=".$id,
+ );
+ PageMenu->child( 'custom-fields' =>
+ title => loc("Custom Fields"),
+ path => "/Admin/RTFM/Classes/CustomFields.html?id=".$id,
+ );
+ PageMenu->child( 'group-rights' =>
+ title => loc("Group Rights"),
+ path => "/Admin/RTFM/Classes/GroupRights.html?id=".$id,
+ );
+ PageMenu->child( 'user-rights' =>
+ title => loc("User Rights"),
+ path => "/Admin/RTFM/Classes/UserRights.html?id=".$id,
+ );
+ PageMenu->child( 'applies-to' =>
+ title => loc("Applies to"),
+ path => "/Admin/RTFM/Classes/Objects.html?id=".$id,
+ );
+ }
+ }
+ my $global = $rtfmadmin->child( global =>
+ title => loc("Global"),
+ path => "/Admin/RTFM/Global/index.html",
+ );
+ $global->child( 'group-rights' => title => loc("Group Rights"), path => "/Admin/RTFM/Global/GroupRights.html" );
+ $global->child( 'user-rights' => title => loc("User Rights"), path => "/Admin/RTFM/Global/UserRights.html" );
+ $global->child( 'topics' => title => loc("Topics"), path => "/Admin/RTFM/Global/Topics.html" );
+
+ $rtfmadmin->child( 'custom-fields' =>
+ title => loc("Custom Fields"),
+ path => "/Admin/CustomFields/index.html?"
+ . $m->comp('/Elements/QueryString', type => 'RT::FM::Class-RT::FM::Article'),
+ );
+
+ if ( $path =~ m{^/Admin/CustomFields/} ) {
+ if ( my $id = $m->request_args->{'id'} ) {
+ my $obj = RT::CustomField->new( $session{'CurrentUser'} );
+ $obj->Load($id);
+ if ( $obj->LookupType =~ /^RT::FM::Class/io ) {
+ PageMenu->child( 'applies-to' => title => loc('Applies to'), path => "/Admin/CustomFields/Objects.html?id=" . $id );
+ }
+ }
+ }
+ $config->child("global")->child("custom-fields")->child(rtfm =>
+ title => loc("RTFM Articles"),
+ path => "/Admin/Global/CustomFields/RTFM-Class-RTFM-Article.html"
+ );
+}
+
+if ( $path =~ m{^/Ticket/} and PageMenu->child("actions")) {
+ PageMenu->child("actions")->child("rtfm-extract" =>
+ title => loc("Extract Article"),
+ path => "/RTFM/Article/ExtractIntoClass.html?Ticket=".$m->request_args->{'id'},
+ );
+}
+
+
+</%init>
diff --git a/html/Callbacks/RTFM/Ticket/Elements/Tabs/Default b/html/Callbacks/RTFM/Ticket/Elements/Tabs/Default
deleted file mode 100644
index 8bbf6a6..0000000
--- a/html/Callbacks/RTFM/Ticket/Elements/Tabs/Default
+++ /dev/null
@@ -1,57 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<%init>
-if ($Ticket) {
-$actions->{'rtfm-extract-article'} = { title => loc('Extract Article'),
- path => 'RTFM/Article/ExtractIntoClass.html?Ticket='.$Ticket->id };
-}
-</%init>
-<%args>
-$Ticket =>undef
-$tabs => undef
-$actions => undef
-</%args>
diff --git a/html/RTFM/Article/Delete.html b/html/RTFM/Article/Delete.html
index dac7cb4..7bbcb6e 100644
--- a/html/RTFM/Article/Delete.html
+++ b/html/RTFM/Article/Delete.html
@@ -44,16 +44,12 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
% if ($ARGS{'Delete'}) {
-<& /RTFM/Article/Elements/Tabs, Title => $title &>
-
<%$title%>
<& /Elements/ListActions, actions => \@results &>
-
% } else {
-<& /RTFM/Article/Elements/Tabs, Article => $ArticleObj, current_subtab =>
-"RTFM/Article/Delete.html?id=".$ArticleObj->Id , id => $id, Title => $title &>
-
<b><&|/l&>Are you sure you want to delete this article?</&></b>
<table>
<tr>
diff --git a/html/RTFM/Article/Display.html b/html/RTFM/Article/Display.html
index 268ba57..74b200c 100644
--- a/html/RTFM/Article/Display.html
+++ b/html/RTFM/Article/Display.html
@@ -44,10 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Article/Elements/Tabs,
- id => $id,
- Title => $title,
- current_subtab => 'RTFM/Article/Display.html?id='.$id &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<h2><&|/l&>Basics</&></h2>
<span class="label"><&|/l&>Class</&></span>: <span class="value"><%$article->ClassObj->Name%></span><br />
<em><span class="value"><%$article->Summary%></span></em>
diff --git a/html/RTFM/Article/Edit.html b/html/RTFM/Article/Edit.html
index 531c849..0f9411c 100644
--- a/html/RTFM/Article/Edit.html
+++ b/html/RTFM/Article/Edit.html
@@ -44,17 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-% if ($id && $id ne 'new') {
-<& /RTFM/Article/Elements/Tabs,
- Article => $ArticleObj,
- current_subtab => "RTFM/Article/Edit.html?id=".$ArticleObj->Id ,
- id => $id,
- Title => $title &>
-% } else {
-<& /RTFM/Article/Elements/Tabs,
- current_tab => "RTFM/Article/PreCreate.html",
- Title => loc('Create a new article') &>
-% }
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="Edit.html" name="EditArticle" id="EditArticle" enctype="multipart/form-data">
diff --git a/html/RTFM/Article/Elements/Tabs b/html/RTFM/Article/Elements/Tabs
deleted file mode 100644
index 9ac600c..0000000
--- a/html/RTFM/Article/Elements/Tabs
+++ /dev/null
@@ -1,114 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs, tabs => $tabs, subtabs => $subtabs, current_toptab => 'RTFM/Article/Search.html', current_tab => $current_tab, current_subtab => $current_subtab, Title => $Title&>
-
-<%INIT>
-
-my $tabs;
-$tabs->{'a_search'} = { class => "currentnav",
- path => "RTFM/Article/Search.html",
- title => loc("Search"), };
-$tabs->{'aa_new'} = { class => "currentnav",
- path => "RTFM/Article/PreCreate.html",
- title => loc("New Article"),
- separator => 1 };
-if ($id) {
- $tabs->{"this"} = { class => "currentnav",
- path => "RTFM/Article/Display.html?id=" . $id,
- title => "#" . $id,
- current_subtab => $current_subtab };
-
- $tabs->{"this"}->{subtabs} = {
- Classes => {
- title => loc('Display'),
- path => 'RTFM/Article/Display.html?id=' . $id,
- },
- History => {
- title => loc('History'),
- path => 'RTFM/Article/History.html?id=' . $id,
- },
-
-
- };
-
- use RT::FM::Article;
- my $art = RT::FM::Article->new( $session{'CurrentUser'} );
- $art->Load($id);
- if ( $art->CurrentUserHasRight('ModifyArticle') ) {
-
- $tabs->{"this"}->{subtabs}->{'Modify'} = {
- title => loc('Modify'),
- path => 'RTFM/Article/Edit.html?id=' . $id,
- };
- }
- if ( $art->CurrentUserHasRight('DeleteArticle') ) {
-
- $tabs->{"this"}->{subtabs}->{'ZDelete'} = {
- title => loc('Delete'),
- path => 'RTFM/Article/Delete.html?id=' . $id,
- };
- }
-}
-
-foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {
- if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_subtab ) {
- $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_tab;
- }
-
-}
-
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$Title => undef
-$subtabs => undef
-$current_tab => 'RTFM/Article/Display.html?id='.$id
-$current_subtab => undef
-</%ARGS>
diff --git a/html/RTFM/Article/ExtractFromTicket.html b/html/RTFM/Article/ExtractFromTicket.html
index a959f32..9b72e7d 100644
--- a/html/RTFM/Article/ExtractFromTicket.html
+++ b/html/RTFM/Article/ExtractFromTicket.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs, Title => loc('Extract article from ticket #[_1] into class [_2]',$Ticket, $ClassObj->Name) &>
+<& /Elements/Header, Title => loc('Extract article from ticket #[_1] into class [_2]',$Ticket, $ClassObj->Name) &>
+<& /Elements/Tabs &>
<form action="Edit.html" method="post">
<input type="hidden" name="Class" value="<%$ARGS{'Class'}%>" />
<input type="hidden" name="Summary" value="<%$ticket->Subject%>" />
diff --git a/html/RTFM/Article/ExtractIntoClass.html b/html/RTFM/Article/ExtractIntoClass.html
index af23024..f7bd8aa 100644
--- a/html/RTFM/Article/ExtractIntoClass.html
+++ b/html/RTFM/Article/ExtractIntoClass.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs, Title => loc('Extract a new article from ticket #[_1]',$Ticket) &>
+<& /Elements/Header, Title => loc('Extract a new article from ticket #[_1]',$Ticket) &>
+<& /Elements/Tabs &>
<h2><&|/l&>Create a new article in</&>:</h2>
diff --git a/html/RTFM/Article/ExtractIntoTopic.html b/html/RTFM/Article/ExtractIntoTopic.html
index 0f3e1b2..130dad6 100644
--- a/html/RTFM/Article/ExtractIntoTopic.html
+++ b/html/RTFM/Article/ExtractIntoTopic.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs, Title => loc('Extract a new article from ticket #[_1]',$Ticket) &>
+<& /Elements/Header, Title => loc('Extract a new article from ticket #[_1]',$Ticket) &>
+<& /Elements/Tabs &>
<&|/l&>Select topics for this article</&>:<br />
diff --git a/html/RTFM/Article/History.html b/html/RTFM/Article/History.html
index ee95417..daa025a 100644
--- a/html/RTFM/Article/History.html
+++ b/html/RTFM/Article/History.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Article/Elements/Tabs, id => $id, Title => $title, current_subtab => 'RTFM/Article/History.html?id='.$id &>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& Elements/ShowHistory, id => $id &>
<%init>
my $title =loc('History for article #[_1]',$id);
diff --git a/html/RTFM/Article/PreCreate.html b/html/RTFM/Article/PreCreate.html
index 3391eeb..88536f7 100644
--- a/html/RTFM/Article/PreCreate.html
+++ b/html/RTFM/Article/PreCreate.html
@@ -44,10 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Article/Elements/Tabs,
- current_tab => "RTFM/Article/PreCreate.html",
- Title => loc('Create an article in class...'),
-&>
+<& /Elements/Header, Title => loc('Create an article in class...') &>
+<& /Elements/Tabs &>
<ul>
% my $Classes = RT::FM::ClassCollection->new($session{'CurrentUser'});
% $Classes->LimitToEnabled();
diff --git a/html/RTFM/Article/Search.html b/html/RTFM/Article/Search.html
index 5626200..75c63b5 100644
--- a/html/RTFM/Article/Search.html
+++ b/html/RTFM/Article/Search.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Article/Elements/Tabs, current_tab => "RTFM/Article/Search.html", Title => loc("Search for articles") &>
+<& /Elements/Header, Title => loc("Search for articles") &>
+<& /Elements/Tabs &>
% unless ( keys %ARGS ) {
% my $Classes=new RT::FM::ClassCollection($session{'CurrentUser'});
diff --git a/html/RTFM/Elements/Error b/html/RTFM/Elements/Error
index 6df3960..a88e673 100644
--- a/html/RTFM/Elements/Error
+++ b/html/RTFM/Elements/Error
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs &>
+<& /Elements/Header &>
+<& /Elements/Tabs &>
<& /Elements/TitleBoxStart, class=> "error", title => $Title &>
<%$Why%>
<br />
diff --git a/html/RTFM/Elements/Tabs b/html/RTFM/Elements/Tabs
deleted file mode 100644
index a5e0d46..0000000
--- a/html/RTFM/Elements/Tabs
+++ /dev/null
@@ -1,108 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work 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.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Header, Title => $Title &>
-<& /Elements/PageLayout,
- current_toptab => 'RTFM/index.html',
- current_tab => $current_toptab,
- current_subtab => $current_tab,
- toptabs => $toptabs,
- tabs => $second_tabs,
- topactions => $topactions,
- actions => $actions,
- subactions => $subactions,
- title => $Title
-&>
-<& /Elements/Callback, %ARGS, _CallbackName => "Header" &>
-<%INIT>
-my $action;
-
-
-my $toptabs = { a => { title => loc('RT'),
- path => '', },
- aab => { title => loc('RTFM'),
- path => 'RTFM/index.html'}
- };
-
-my $second_tabs = { 'aab' => { title => loc('Overview'),
- path => 'RTFM/index.html' },
- 'articles' => { title => loc('Articles'),
- path => 'RTFM/Article/Search.html' },
- 'atopics' => { title => loc('Topics'),
- path => 'RTFM/Topics.html'},
- };
-
-if ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab',
- Object => $RT::System )) {
- $second_tabs->{config} = { title => loc('Configuration'),
- path => 'Admin/RTFM/index.html',
- };
-}
-
-my $topactions = {
- B => { html => $m->scomp('/RTFM/Elements/GotoArticle', %ARGS) }
- };
-
-
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', topactions => $topactions, toptabs => $toptabs, %ARGS);
-
- foreach my $tab (sort keys %{$second_tabs}) {
- if ($current_toptab && $second_tabs->{$tab}->{'path'} eq $current_toptab) {
- $second_tabs->{$tab}->{"subtabs"} = $tabs;
- $second_tabs->{$tab}->{"current_subtab"} = $current_tab;
- }
-
- }
-</%INIT>
-<%ARGS>
-$current_toptab => undef
-$current_tab => undef
-$tabs => undef
-$actions => undef
-$subactions => undef
-$Title => undef
-</%ARGS>
diff --git a/html/RTFM/Topics.html b/html/RTFM/Topics.html
index 43caf22..998e808 100644
--- a/html/RTFM/Topics.html
+++ b/html/RTFM/Topics.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs, current_toptab => "RTFM/Topics.html", Title => loc('Browse by topic'), class => $class, topic => $id &>
+<& /Elements/Header, Title => loc('Browse by topic') &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@Actions &>
<a href="Topics.html"><&|/l&>All topics</&></a>
diff --git a/html/RTFM/index.html b/html/RTFM/index.html
index 8558e4d..b05b263 100644
--- a/html/RTFM/index.html
+++ b/html/RTFM/index.html
@@ -44,7 +44,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#%# END BPS TAGGED BLOCK }}}
-<& /RTFM/Elements/Tabs, current_toptab => "RTFM/index.html", Title => loc('Overview') &>
+<& /Elements/Header, Title => loc('Overview') &>
+<& /Elements/Tabs &>
<table width="100%">
<tr>
<td valign="top" width="70%">
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list