import rt 2.0.14
[freeside.git] / rt / webrt / Elements / SelectQueue
1 %# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectQueue,v 1.1 2002-08-12 06:17:08 ivan Exp $
2
3 % if ($Lite) {
4 <INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>">
5 % } else {
6 <SELECT NAME ="<%$Name%>">
7 % if ($ShowNullOption) {
8 <OPTION VALUE="">-</OPTION>
9 % }
10 % while (my $queue=$q->Next) {
11 % if ($ShowAllQueues || $queue->CurrentUserHasRight('CreateTicket')) {
12 <OPTION VALUE="<%$queue->Id%>" <%($queue->Id == $Default) && 'SELECTED'%>><%$queue->Name%>
13 %   if (($Verbose) and ($queue->Description) ){
14 (<%$queue->Description%>)
15 %  }
16 </OPTION>
17 % }
18 % }
19 </SELECT>
20 % }
21 <%ARGS>
22 $ShowNullOption => 1
23 $ShowAllQueues => 1
24 $Name => undef
25 $Verbose => undef
26 $Default => undef
27 $Lite => 0
28 </%ARGS>
29
30 <%INIT>
31
32 my $q=new RT::Queues($session{'CurrentUser'});
33 $q->UnLimit;
34
35 my $d = new RT::Queue($session{'CurrentUser'});
36 $d->Load($Default);
37
38 </%INIT>