mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Added an menu to show some simple statistics.
This commit is contained in:
parent
15957203af
commit
f79975832a
7 changed files with 454 additions and 4 deletions
|
@ -58,8 +58,8 @@ class ToolsTreeBuilder
|
|||
protected $security;
|
||||
|
||||
public function __construct(TranslatorInterface $translator, UrlGeneratorInterface $urlGenerator,
|
||||
TagAwareCacheInterface $treeCache, UserCacheKeyGenerator $keyGenerator,
|
||||
Security $security)
|
||||
TagAwareCacheInterface $treeCache, UserCacheKeyGenerator $keyGenerator,
|
||||
Security $security)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
|
@ -187,6 +187,13 @@ class ToolsTreeBuilder
|
|||
);
|
||||
}
|
||||
|
||||
if ($this->security->isGranted('@tools.statistics')) {
|
||||
$show_nodes[] = new TreeViewNode(
|
||||
$this->translator->trans('tree.tools.show.statistics'),
|
||||
$this->urlGenerator->generate('statistics_view')
|
||||
);
|
||||
}
|
||||
|
||||
return $show_nodes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue