diff --git a/src/Controller/BibliographyController.php b/src/Controller/BibliographyController.php
index 93d5b05..dd5cf80 100644
--- a/src/Controller/BibliographyController.php
+++ b/src/Controller/BibliographyController.php
@@ -13,7 +13,7 @@ use Symfony\Component\Routing\Attribute\Route;
class BibliographyController extends AbstractController
{
- #[Route('/bibliography/{id}', name: 'app_bibliography')]
+ #[Route('/bibliography/{id<\d+>}', name: 'app_bibliography')]
public function index(Bibliography $bibliography, EntityManagerInterface $em): Response
{
return $this->render('bibliography/index.html.twig', [
@@ -21,5 +21,28 @@ class BibliographyController extends AbstractController
'record' => $bibliography,
]);
}
-}
+ #[Route('/bibliography', name: 'app_bibliography_landing')]
+ public function landing(): Response
+ {
+ return $this->render('bibliography/landing.html.twig', [
+ 'controller_name' => 'BibliographyController',
+ ]);
+ }
+
+ #[Route('/bibliography/search', name: 'app_bibliography_search')]
+ public function search(): Response
+ {
+ return $this->render('bibliography/search.html.twig', [
+ 'controller_name' => 'BibliographyController',
+ ]);
+ }
+
+ #[Route('/bibliography/add', name: 'app_bibliography_add')]
+ public function add(): Response
+ {
+ return $this->render('bibliography/add.html.twig', [
+ 'controller_name' => 'BibliographyController',
+ ]);
+ }
+}
diff --git a/src/Entity/Bibliography.php b/src/Entity/Bibliography.php
index f03ec70..261ae0d 100644
--- a/src/Entity/Bibliography.php
+++ b/src/Entity/Bibliography.php
@@ -36,10 +36,10 @@ class Bibliography
#[ORM\Column(name: 'note_bib', type: Types::TEXT)]
private ?string $notes = null;
- #[ORM\Column(length: 100)]
+ #[ORM\Column(length: 100, name: 'editor')]
private ?string $editor = null;
- #[ORM\Column(length: 100)]
+ #[ORM\Column(length: 100, name: 'creator')]
private ?string $creator = null;
public function getId(): ?int
@@ -96,6 +96,18 @@ class Bibliography
return $this;
}
+ public function getCreator(): ?string
+ {
+ return $this->creator;
+ }
+
+ public function setCreator(string $creator): static
+ {
+ $this->creator = $creator;
+
+ return $this;
+ }
+
public function getCitation(): ?string
{
return $this->citation;
diff --git a/templates/bibliography/index.html.twig b/templates/bibliography/index.html.twig
index 7c6b89f..724cad8 100644
--- a/templates/bibliography/index.html.twig
+++ b/templates/bibliography/index.html.twig
@@ -7,25 +7,26 @@
Bibliography
{{ record.citation }}
-
-
-
- Last modified: {{ record.modifiedAt.format('Y-m-d') }}
- at {{ record.modifiedAt.format('H:i:s') }}
-
-
Editor: {{ record.editor }}
-
-
-
+
+
+
+ Last modified: {{ record.modifiedAt.format('Y-m-d') }}
+ at {{ record.modifiedAt.format('H:i:s') }}
+
+
Editor: {{ record.editor }}
+
+
+
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_REVISOR') %}
-
-
+
+