mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Added a page to quickly add many parts to a project from parts lists.
This commit is contained in:
parent
345fb0a3c1
commit
25494c9ddf
7 changed files with 157 additions and 3 deletions
|
@ -77,7 +77,7 @@ class PartListsController extends AbstractController
|
|||
$this->addFlash('error', 'part.table.actions.no_params_given');
|
||||
} else {
|
||||
$parts = $actionHandler->idStringToArray($ids);
|
||||
$actionHandler->handleAction($action, $parts, $target ? (int) $target : null);
|
||||
$redirectResponse = $actionHandler->handleAction($action, $parts, $target ? (int) $target : null, $redirect);
|
||||
|
||||
//Save changes
|
||||
$this->entityManager->flush();
|
||||
|
@ -85,6 +85,11 @@ class PartListsController extends AbstractController
|
|||
$this->addFlash('success', 'part.table.actions.success');
|
||||
}
|
||||
|
||||
//If the action handler returned a response, we use it, otherwise we redirect back to the previous page.
|
||||
if ($redirectResponse){
|
||||
return $redirectResponse;
|
||||
}
|
||||
|
||||
return $this->redirect($redirect);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue