[Bps-public-commit] r20196 - RT-BugTracker-Public/html/Public/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Thu Dec 10 10:36:13 EST 2009
Author: ruz
Date: Thu Dec 10 10:36:08 2009
New Revision: 20196
Modified:
RT-BugTracker-Public/html/Public/Elements/Tabs
Log:
* support ticket argument in tabs
Modified: RT-BugTracker-Public/html/Public/Elements/Tabs
==============================================================================
--- RT-BugTracker-Public/html/Public/Elements/Tabs (original)
+++ RT-BugTracker-Public/html/Public/Elements/Tabs Thu Dec 10 10:36:08 2009
@@ -46,13 +46,16 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Public/Elements/PageLayout,
+ toptabs => $toptabs,
current_toptab => $current_toptab,
+
+ tabs => $tabs,
current_tab => $current_tab,
- toptabs => $toptabs,
+
topactions => $topactions,
- tabs => $tabs,
actions => $actions,
subactions => $subactions,
+
title => $Title
&>
<a name="skipnav" id="skipnav" accesskey="8"></a>
@@ -83,12 +86,14 @@
},
};
-$toptabs ||= $basetabs;
+$toptabs ||= $basetabs;
$topactions ||= $basetopactions;
-if ($queue) {
+$queue ||= $ticket->QueueObj->Name if $ticket;
+if ( $queue ) {
my $escaped = $m->interp->apply_escapes($queue, 'u');
- $actions = {
+ $current_toptab = 'Public/Dist/Browse.html';
+ $tabs = {
A => {
title => loc("Active bugs"),
path => "Public/Dist/Display.html?Status=Active&Name=". $escaped,
@@ -106,6 +111,17 @@
path => 'Public/Bug/Report.html?Queue='. $escaped,
},
};
+ if ( $ticket && !$current_tab ) {
+ my $status = $ticket->Status;
+ if ( $ticket->QueueObj->IsActiveStatus( $status ) ) {
+ $current_tab = "Public/Dist/Display.html?Status=Active&Name=". $escaped;
+ } elsif ( $status eq 'rejected' || $status eq 'deleted' ) {
+ $current_tab = "Public/Dist/Display.html?Status=Rejected&Name=". $escaped;
+ } else {
+ $current_tab = "Public/Dist/Display.html?Status=Resolved&Name=". $escaped;
+
+ }
+ }
}
$m->callback(
@@ -116,13 +132,17 @@
</%INIT>
<%ARGS>
+$toptabs => undef
$current_toptab => undef
+
+$tabs => undef
$current_tab => undef
-$toptabs => undef
+
$topactions => undef
-$tabs => undef
$actions => undef
$subactions => undef
+
$Title => undef
+$ticket => undef
$queue => undef
</%ARGS>
More information about the Bps-public-commit
mailing list