[rt-devel] [PATCH] Set default queue in 'New ticket in' dropdown

Tammy Dugan tdugan at progeny.com
Fri Feb 27 15:23:34 EST 2004


This patch makes the "New ticket in" pull-down queue list default to the
current queue if "current queue" has any meaning in a particular context

-------------- next part --------------
Index: html/Ticket/ModifyPeople.html
===================================================================
--- html/Ticket/ModifyPeople.html	(revision 14856)
+++ html/Ticket/ModifyPeople.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $Ticket->Queue,
     Ticket => $Ticket, 
     current_tab => "Ticket/ModifyPeople.html?id=".$Ticket->Id, 
     Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
Index: html/Ticket/ModifyAll.html
===================================================================
--- html/Ticket/ModifyAll.html	(revision 14856)
+++ html/Ticket/ModifyAll.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $Ticket->Queue,
     Ticket => $Ticket, 
     current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id, 
     Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
Index: html/Ticket/History.html
===================================================================
--- html/Ticket/History.html	(revision 14856)
+++ html/Ticket/History.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $Ticket->Queue,
     Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id, 
     Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
 
Index: html/Ticket/Update.html
===================================================================
--- html/Ticket/Update.html	(revision 14856)
+++ html/Ticket/Update.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => $title &>
 <& /Ticket/Elements/Tabs, 
+    Default => $TicketObj->Queue,
     Ticket => $TicketObj, 
     Title=> $title &>
 
Index: html/Ticket/Create.html
===================================================================
--- html/Ticket/Create.html	(revision 14856)
+++ html/Ticket/Create.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc("Create a new ticket") &>
 <& /Elements/Tabs, 
+    Default => $Queue,
     current_toptab => "Ticket/Create.html", 
     Title => loc("Create a new ticket") &>
 <FORM ACTION="<%$RT::WebPath%>/Ticket/Create.html" METHOD="POST" ENCTYPE="multipart/form-data">
Index: html/Ticket/Display.html
===================================================================
--- html/Ticket/Display.html	(revision 14856)
+++ html/Ticket/Display.html	(revision 14857)
@@ -24,6 +24,7 @@
 <& /Elements/Header, 
     Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $TicketObj->Queue,
     Ticket => $TicketObj, 
     current_tab => 'Ticket/Display.html?id='.$TicketObj->id,
     Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
Index: html/Ticket/Modify.html
===================================================================
--- html/Ticket/Modify.html	(revision 14856)
+++ html/Ticket/Modify.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $TicketObj->Queue,
     Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id, 
     Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
 
Index: html/Ticket/ModifyLinks.html
===================================================================
--- html/Ticket/ModifyLinks.html	(revision 14856)
+++ html/Ticket/ModifyLinks.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $Ticket->Queue,
     Ticket => $Ticket, 
     current_tab => "Ticket/ModifyLinks.html?id=".$Ticket->Id, 
     Title => loc("Link ticket #[_1]", $Ticket->Id) &>
Index: html/Ticket/ModifyDates.html
===================================================================
--- html/Ticket/ModifyDates.html	(revision 14856)
+++ html/Ticket/ModifyDates.html	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &>
 <& /Ticket/Elements/Tabs, 
+    Default => $TicketObj->Queue,
     Ticket => $TicketObj, 
     current_tab => "Ticket/ModifyDates.html?id=".$TicketObj->Id, 
     Title => loc('Modify dates for #[_1]', $TicketObj->Id) &> 
Index: html/Ticket/Elements/Tabs
===================================================================
--- html/Ticket/Elements/Tabs	(revision 14856)
+++ html/Ticket/Elements/Tabs	(revision 14857)
@@ -23,6 +23,7 @@
 %# END LICENSE BLOCK
 <& /Elements/Callback, Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS &>
 <& /Elements/Tabs, 
+    Default => $Default,
     tabs => $tabs, 
     actions => $actions, 
     current_tab => $current_tab, 
@@ -173,4 +174,5 @@
 $current_tab => undef
 $current_subtab => undef
 $Title => undef
+$Default => undef
 </%ARGS>
Index: html/Elements/Tabs
===================================================================
--- html/Elements/Tabs	(revision 14856)
+++ html/Elements/Tabs	(revision 14857)
@@ -35,7 +35,7 @@
 <%INIT>
 my $action;
 my $basetopactions = {
-	A => { html => $m->scomp('/Elements/CreateTicket')	
+	A => { html => $m->scomp('/Elements/CreateTicket', Default => $Default)	
 		},
 	B => { html => $m->scomp('/Elements/SimpleSearch') 
 		}
@@ -79,4 +79,5 @@
 $actions => undef
 $subactions => undef
 $Title => undef
+$Default => undef
 </%ARGS>
Index: html/Elements/CreateTicket
===================================================================
--- html/Elements/CreateTicket	(revision 14856)
+++ html/Elements/CreateTicket	(revision 14857)
@@ -22,5 +22,10 @@
 %# 
 %# END LICENSE BLOCK
 <FORM ACTION="<% $RT::WebPath%>/Ticket/Create.html">
-<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in">&nbsp;[_1]</&>
+<&|/l, $m->scomp('/Elements/SelectNewTicketQueue', Default => $Default)&><input type="submit" value="New ticket in">&nbsp;[_1]</&>
 </FORM>
+
+<%ARGS>
+$Default => undef
+</%ARGS>
+


More information about the Rt-devel mailing list