[Rt-commit] r2090 - in rt/branches/PLATANO-EXPERIMENTAL: .
html/Admin/CustomFields html/Admin/Elements
jesse at bestpractical.com
jesse at bestpractical.com
Fri Jan 14 03:47:55 EST 2005
Author: jesse
Date: Fri Jan 14 03:47:54 2005
New Revision: 2090
Modified:
rt/branches/PLATANO-EXPERIMENTAL/ (props changed)
rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/GroupRights.html
rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Modify.html
rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Objects.html
rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/UserRights.html
rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/index.html
rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/CustomFieldTabs
Log:
r2521 at hualien (orig r2034): jesse | 2004-12-29T20:41:21.569271Z
r2520 at hualien: jesse | 2004-12-29T20:39:43.707258Z
Custom field tab hilighting fixes.
Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/GroupRights.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/GroupRights.html (original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/GroupRights.html Fri Jan 14 03:47:54 2005
@@ -44,8 +44,11 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs, id => $id, current_subtab =>
-"Admin/CustomFields/UserRights.html?id=".$id, Title => $title &>
+<& /Admin/Elements/CustomFieldTabs,
+ id => $id,
+ current_tab => "Admin/CustomFields/GroupRights.html?id=".$id,
+ Title => $title
+&>
<& /Elements/ListActions, actions => \@results &>
<FORM METHOD=POST ACTION="GroupRights.html">
Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Modify.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Modify.html (original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Modify.html Fri Jan 14 03:47:54 2005
@@ -44,9 +44,10 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs, id => $CustomFieldObj->Id ,
-current_subtab => $current_subtab,
-Title => $title &>
+<& /Admin/Elements/CustomFieldTabs,
+ id => $CustomFieldObj->Id ,
+ current_tab => $current_tab,
+ Title => $title &>
<& /Elements/ListActions, actions => \@results &>
@@ -189,11 +190,11 @@
push (@results, $msg);
}
-my $current_subtab;
+my $current_tab;
if ($ARGS{'Create'}){
- $current_subtab = "Admin/CustomFields/Modify.html?Create=1";
+ $current_tab = "Admin/CustomFields/Modify.html?Create=1";
} else {
- $current_subtab = "Admin/CustomFields/Modify.html?id=".$id;
+ $current_tab = "Admin/CustomFields/Modify.html?id=".$id;
}
Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Objects.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Objects.html (original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/Objects.html Fri Jan 14 03:47:54 2005
@@ -46,7 +46,7 @@
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/CustomFieldTabs,
id => $id,
- current_subtab => "Admin/CustomFields/Modify.html?id=".$id,
+ current_tab => "Admin/CustomFields/Objects.html?id=".$id,
Title => $title
&>
Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/UserRights.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/UserRights.html (original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/UserRights.html Fri Jan 14 03:47:54 2005
@@ -45,7 +45,7 @@
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/CustomFieldTabs, id => $id,
-current_subtab => "Admin/CustomFields/UserRights.html?id=".$id,
+current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
Title => $title, &>
<& /Elements/ListActions, actions => \@results &>
Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/index.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/index.html (original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/CustomFields/index.html Fri Jan 14 03:47:54 2005
@@ -44,8 +44,8 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Header, Title => loc('Select a Custom Field') &>
-<& /Admin/Elements/CustomFieldTabs, current_tab => 'Admin/CustomFields/',
- current_subtab => 'Admin/CustomFields/',
+<& /Admin/Elements/CustomFieldTabs,
+ current_tab => 'Admin/CustomFields/',
Title => loc('Select a Custom Field') &>
% my $prev_lookup = '';
Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/CustomFieldTabs
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/CustomFieldTabs (original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/CustomFieldTabs Fri Jan 14 03:47:54 2005
@@ -44,9 +44,9 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Admin/Elements/Tabs,
+ current_tab => 'Admin/CustomFields/',
subtabs => $tabs,
- current_tab => 'Admin/CustomFields/',
- current_subtab => $current_subtab,
+ current_subtab => $current_tab,
Title => $Title &>
<%INIT>
my $tabs;
@@ -55,9 +55,10 @@
my $cf = RT::CustomField->new( $session{'CurrentUser'} );
$cf->Load($id);
$tabs = {
- C => {
+ this => {
title => $cf->Name,
path => "Admin/CustomFields/Modify.html?id=" . $id,
+ current_subtab => $current_tab,
subtabs => {
@@ -77,16 +78,14 @@
};
-if ($cf->LookupType =~ /^RT::Queue/io) {
- $tabs->{'C'}->{subtabs}->{D} =
-
- { title => loc('Applies to'),
- path => "Admin/CustomFields/Objects.html?id=" . $id,
- },
-
-};
-
+ if ($cf->LookupType =~ /^RT::Queue/io) {
+ $tabs->{'this'}->{subtabs}->{D} = {
+ title => loc('Applies to'),
+ path => "Admin/CustomFields/Objects.html?id=" . $id,
+ };
+ }
}
+
if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField')) {
$tabs->{"A"} = { title => loc('Select custom field'),
path => "Admin/CustomFields/",
@@ -100,21 +99,18 @@
# Now let callbacks add their extra tabs
$m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-foreach my $tab ( sort keys %{$tabs} ) {
- if ( $tabs->{$tab}->{'path'} eq $current_subtab ) {
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
- }
- foreach my $subtab (sort keys %{$tabs->{'subtabs'}}) {
- if ($tabs->{$tab}->{subtabs}->{$subtab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{subtabs}->{$subtab}->{"current_subtab"} = $current_subtab;
+foreach my $tab (sort keys %{$tabs->{'this'}->{'subtabs'}}) {
+ if ($tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab) {
+ $tabs->{'this'}->{'subtabs'}->{$tab}->{'subtabs'} = $subtabs;
+ $tabs->{'this'}->{'subtabs'}->{$tab}->{'current_subtab'} = $current_subtab;
}
- }
-}
-
+}
+if( $id ) { $current_tab = "Admin/CustomFields/Modify.html?id=" . $id }
</%INIT>
<%ARGS>
+$Title => undef
$id => undef
-$current_subtab => undef
$current_tab => undef
-$Title => undef
+$subtabs => undef
+$current_subtab => undef
</%ARGS>
More information about the Rt-commit
mailing list