From 771e5569aa63c61a29d8ffc00b636c86bcbbfa85 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Tue, 12 Feb 2019 22:30:47 +0000
Subject: [PATCH] Selected Navigation Item

This addresses an issue where main queues were not marked as active
resulting in "New Ticket" link getting auto-set as active (bold).
---
 scp/tickets.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scp/tickets.php b/scp/tickets.php
index 27179c0be..bb7543908 100644
--- a/scp/tickets.php
+++ b/scp/tickets.php
@@ -445,12 +445,13 @@ foreach ($queues as $_) {
     $nav->addSubMenu(function() use ($q, $queue, $children) {
         // A queue is selected if it is the one being displayed. It is
         // "child" selected if its ID is in the path of the one selected
+        $_selected = ($queue && $queue->getId() == $q->getId());
         $child_selected = $queue
             && ($queue->parent_id == $q->getId()
                 || false !== strpos($queue->getPath(), "/{$q->getId()}/"));
         include STAFFINC_DIR . 'templates/queue-navigation.tmpl.php';
 
-        return $child_selected;
+        return ($child_selected || $_selected);
     });
 }
 
-- 
GitLab