mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-07 08:54:36 +02:00
Show the count of the sub categories in the entity admin treeview.
This commit is contained in:
parent
650b388a1d
commit
d04a8626cb
5 changed files with 34 additions and 0 deletions
|
@ -84,6 +84,10 @@ class TreeBuilder
|
|||
|
||||
$tree_node = new TreeViewNode($element->getName(), $href, $children_nodes);
|
||||
|
||||
if($children_nodes != null) {
|
||||
$tree_node->addTag((string) count($children_nodes));
|
||||
}
|
||||
|
||||
//Check if we need to select the current part
|
||||
if ($selectedElement !== null && $element->getID() === $selectedElement->getID()) {
|
||||
$tree_node->setSelected(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue