mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Fixed exceptions on part info page
This commit is contained in:
parent
1af7c37ad7
commit
fd6961e2f3
4 changed files with 125 additions and 525 deletions
|
@ -47,16 +47,13 @@ class PartController extends AbstractController
|
|||
* @Route("/part/{id}/info", name="part_info")
|
||||
* @Route("/part/{id}", requirements={"id"="\d+"})
|
||||
*/
|
||||
public function show(Part $part, AttachmentFilenameService $attachmentFilenameService, AttachmentHelper $attachmentHelper)
|
||||
public function show(Part $part, AttachmentHelper $attachmentHelper)
|
||||
{
|
||||
$this->denyAccessUnlessGranted('read', $part);
|
||||
|
||||
$filename = $part->getMasterPictureFilename(true);
|
||||
|
||||
return $this->render('Parts/info/show_part_info.html.twig',
|
||||
[
|
||||
'part' => $part,
|
||||
'main_image' => $attachmentFilenameService->attachmentPathToAbsolutePath($filename),
|
||||
'attachment_helper' => $attachmentHelper
|
||||
]
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue