[Rt-commit] r16026 - rt/3.8/trunk/share/html/Elements

ruz at bestpractical.com ruz at bestpractical.com
Thu Sep 18 22:33:39 EDT 2008


Author: ruz
Date: Thu Sep 18 22:33:31 2008
New Revision: 16026

Modified:
   rt/3.8/trunk/share/html/Elements/MySupportQueues
   rt/3.8/trunk/share/html/Elements/Quicksearch

Log:
* use active statuses in MySupportQueues and Quicksearch

Modified: rt/3.8/trunk/share/html/Elements/MySupportQueues
==============================================================================
--- rt/3.8/trunk/share/html/Elements/MySupportQueues	(original)
+++ rt/3.8/trunk/share/html/Elements/MySupportQueues	Thu Sep 18 22:33:31 2008
@@ -49,6 +49,12 @@
 <& /Elements/QueueSummary,
    cache => 'my_support_queues',
    queue_filter => sub { $_->IsAdminCc($session{'CurrentUser'}->Id) },
-   conditions => [ {cond => "Status = 'new'",  name => loc ('new')  },
-		   {cond => "Status = 'open'", name => loc ('open') }] &>
+   conditions => \@conditions,
+&>
 </&>
+<%INIT>
+my @conditions = ();
+foreach ( RT::Queue->ActiveStatusArray ) {
+    push @conditions, { cond => "Status = '$_'", name => loc($_) };
+}
+</%INIT>

Modified: rt/3.8/trunk/share/html/Elements/Quicksearch
==============================================================================
--- rt/3.8/trunk/share/html/Elements/Quicksearch	(original)
+++ rt/3.8/trunk/share/html/Elements/Quicksearch	Thu Sep 18 22:33:31 2008
@@ -51,11 +51,15 @@
 <& /Elements/QueueSummary,
    cache => 'quick_search_queues',
    queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} },
-   conditions => [ {cond => "Status = 'new'",  name => loc ('new')  },
-		   {cond => "Status = 'open'", name => loc ('open') },
-		   {cond => "Status = 'stalled'", name => loc ('stalled') }] &>
+   conditions => \@conditions,
+&>
 </&>
 </div>
 <%INIT>
 my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {});
+
+my @conditions = ();
+foreach ( RT::Queue->ActiveStatusArray ) {
+    push @conditions, { cond => "Status = '$_'", name => loc($_) };
+}
 </%INIT>


More information about the Rt-commit mailing list