-% my $has_name = UNIVERSAL::can($member, 'Name') || (UNIVERSAL::can($member, '_Accessible') && $member->_Accessible('Name', 'read'));
-% if (UNIVERSAL::isa($member, "RT::Ticket")) {
-% my $inactive = $member->QueueObj->IsInactiveStatus($member->Status);
+% if (blessed($member) and $member->isa("RT::Ticket") and $member->CurrentUserHasRight('ShowTicket')) {
+% my $class = $member->QueueObj->IsInactiveStatus($member->Status)
+% ? 'ticket-inactive'
+% : 'ticket-active';
+% $class .= ' '.CSSClass($member->Status);