mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
separate create page
This commit is contained in:
@@ -133,6 +133,19 @@ final class PersonResourceController extends AbstractController
|
||||
$personResources = [];
|
||||
$personResources = $this->personResourceRepository->findBy(['personOwner' => $personOwner->getId()]);
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:list.html.twig',
|
||||
[
|
||||
'person' => $personOwner,
|
||||
'personResources' => $personResources,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function newAction(Request $request, $person_id)
|
||||
{
|
||||
$personOwner = $this->personRepository->find($person_id);
|
||||
|
||||
$form = $this->createForm(PersonResourceType::class);
|
||||
|
||||
$form->handleRequest($request);
|
||||
@@ -165,11 +178,10 @@ final class PersonResourceController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:list.html.twig',
|
||||
'ChillPersonBundle:PersonResource:create.html.twig',
|
||||
[
|
||||
'person' => $personOwner,
|
||||
'personResources' => $personResources,
|
||||
'form' => $form->createView(),
|
||||
'person' => $personOwner,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user