X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FElements%2FShowQueue;h=1e4b4447c661fa27fa4f8cf99910ebfba8423cfd;hb=9ce482da3960ee43decee41fba53b78c12c3e52c;hp=d6b298a7637d886516bd9d430429db47ad41532f;hpb=6894828ab5a66e53ad6945cc14e6cd9f9c3b67f7;p=freeside.git diff --git a/rt/share/html/Ticket/Elements/ShowQueue b/rt/share/html/Ticket/Elements/ShowQueue index d6b298a76..1e4b4447c 100644 --- a/rt/share/html/Ticket/Elements/ShowQueue +++ b/rt/share/html/Ticket/Elements/ShowQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,18 +45,28 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +% if ( $query ) { +<% $value %> +% } else { <% $value %> +% } <%ARGS> $Ticket => undef $QueueObj <%INIT> my $value = $QueueObj->Name; +my $query; if ( $Ticket and $Ticket->CurrentUserHasRight('SeeQueue') ) { # Grab the queue name anyway if the current user can # see the queue based on his role for this ticket $value = $QueueObj->__Value('Name'); + if ( $session{CurrentUser}->Privileged ) { + my @statuses = $QueueObj->ActiveStatusArray(); + s{(['\\])}{\\$1}g for @statuses; + $query = "Queue = " . $QueueObj->id . " AND ( ". join(" OR ", map {"Status = '$_'"} @statuses) . " )"; + } } $value = '#'. $QueueObj->id