<& /Admin/Elements/Header, Title => 'Admin queues' &>
<& /Admin/Elements/Tabs, current_tab => 'Admin/Queues/' &>


<& /Elements/TitleBoxStart, title => 'Select a queue' &>

<TABLE>
<TR>
<TD VALIGN=TOP>

<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/">

<input type="checkbox" name="FindDisabledQueues"> Include disabled queues in listing.
<BR>
<div align=right><input type=submit value="Go!"></div> 
</FORM>
</TD>
<TD VALIGN=TOP>
<UL>
% if ($session{'CurrentUser'}->HasSystemRight('AdminQueues')) {
<LI><A HREF="<%$RT::WebPath%>/Admin/Queues/Modify.html?Create=1">Create a new queue</A><BR><BR></LI>
</UL>
% }

<%$caption%><BR>
<UL>
%if ($queues->Count == 0) {
<LI> <i>No queues matching search criteria found.</i>
% }
%while ( $queue = $queues->Next) {
<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI>
%}

</UL>
</TD>
</TR>
</TABLE>
<& /Elements/TitleBoxEnd &>

<%INIT>
my ($queue, $caption);
my $queues = new RT::Queues($session{'CurrentUser'});
$queues->UnLimit();

if ($FindDisabledQueues) {
	$queues->{'find_disabled_rows'} = 1;
}

</%INIT>
<%ARGS>
$FindDisabledQueues => 0
</%ARGS>
