Skip to content
Snippets Groups Projects
Unverified Commit 4e5de6dc authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4724 from protich/issue/active-subnav

Selected Navigation Item
parents 55fc20b2 771e5569
Branches
Tags
No related merge requests found
...@@ -445,12 +445,13 @@ foreach ($queues as $_) { ...@@ -445,12 +445,13 @@ foreach ($queues as $_) {
$nav->addSubMenu(function() use ($q, $queue, $children) { $nav->addSubMenu(function() use ($q, $queue, $children) {
// A queue is selected if it is the one being displayed. It is // 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 // "child" selected if its ID is in the path of the one selected
$_selected = ($queue && $queue->getId() == $q->getId());
$child_selected = $queue $child_selected = $queue
&& ($queue->parent_id == $q->getId() && ($queue->parent_id == $q->getId()
|| false !== strpos($queue->getPath(), "/{$q->getId()}/")); || false !== strpos($queue->getPath(), "/{$q->getId()}/"));
include STAFFINC_DIR . 'templates/queue-navigation.tmpl.php'; include STAFFINC_DIR . 'templates/queue-navigation.tmpl.php';
return $child_selected; return ($child_selected || $_selected);
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment