[Rt-commit] rt branch, watching-tool, updated. rt-3.8.8-486-gf6fa229

Shawn Moore sartak at bestpractical.com
Thu Aug 19 17:46:11 EDT 2010


The branch, watching-tool has been updated
       via  f6fa229efa59f48f8f8f12215eab90d81375613f (commit)
      from  33933ef846716fbf4f88e1ca68467ace311e1ff2 (commit)

Summary of changes:
 share/html/Tools/Watching.html |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit f6fa229efa59f48f8f8f12215eab90d81375613f
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Aug 19 17:47:54 2010 -0400

    Be smarter when you're watching no queues

diff --git a/share/html/Tools/Watching.html b/share/html/Tools/Watching.html
index 971890a..99ebee9 100644
--- a/share/html/Tools/Watching.html
+++ b/share/html/Tools/Watching.html
@@ -50,9 +50,8 @@
     current_tab => "Tools/Watching.html", 
     Title => loc("Watching Queues") &>
 
-<ul class="queue-list">
-
 <%perl>
+my $count = 0;
 my $Queues = RT::Queues->new($session{CurrentUser});
 $Queues->UnLimit;
 while (my $Queue = $Queues->Next) {
@@ -66,6 +65,15 @@ while (my $Queue = $Queues->Next) {
     }
 
     next if !@types;
+
+    my $first = ($count == 0);
+    if ($first) {
+</%perl>
+        <ul class="queue-list">
+<%perl>
+    }
+
+    $count += @types;
 </%perl>
 
     <li class="queue"><& /Ticket/Elements/ShowQueue, QueueObj => $Queue &>
@@ -77,4 +85,9 @@ while (my $Queue = $Queues->Next) {
     </li>
 % }
 
-</ul>
+% if ($count) {
+    </ul>
+% } else {
+    <p><&|/l&>You are not watching any queues.</&></p>
+% }
+

-----------------------------------------------------------------------


More information about the Rt-commit mailing list