mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 12:18:54 +02:00
Show a treeview in the admin menus, to select between the different elements.
This commit is contained in:
parent
928b574d8c
commit
650b388a1d
16 changed files with 269 additions and 25 deletions
|
@ -29,6 +29,7 @@
|
|||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Entity\AttachmentType;
|
||||
use App\Entity\Category;
|
||||
use App\Entity\NamedDBElement;
|
||||
use App\Entity\Part;
|
||||
|
@ -107,6 +108,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('part_edit', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
if($entity instanceof AttachmentType) {
|
||||
return $this->urlGenerator->generate('attachment_type_edit', ['id' => $entity->getID()]);
|
||||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
@ -124,6 +129,10 @@ class EntityURLGenerator
|
|||
return $this->urlGenerator->generate('part_new');
|
||||
}
|
||||
|
||||
if($entity instanceof AttachmentType) {
|
||||
return $this->urlGenerator->generate('attachment_type_new');
|
||||
}
|
||||
|
||||
throw new EntityNotSupported('The given entity is not supported yet!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue