From 61adedb824f3a796cf0c270961b1e5955518e01b Mon Sep 17 00:00:00 2001 From: leroyv Date: Thu, 21 Nov 2024 14:28:29 +0100 Subject: [PATCH] Controller pour Reservations StatutCommandes,StatutTables et Tables avec le form et templates. --- src/Controller/PlatController.php | 78 ++++++++++++++++++ src/Controller/ReservationsController.php | 81 +++++++++++++++++++ src/Controller/StatutCommandesController.php | 81 +++++++++++++++++++ src/Controller/StatutTablesController.php | 81 +++++++++++++++++++ src/Controller/TablesController.php | 81 +++++++++++++++++++ src/Form/PlatType.php | 24 ++++++ src/Form/ReservationsType.php | 40 +++++++++ src/Form/StatutCommandesType.php | 25 ++++++ src/Form/StatutTablesType.php | 31 +++++++ src/Form/TablesType.php | 37 +++++++++ templates/plat/index.html.twig | 20 +++++ templates/reservations/_delete_form.html.twig | 4 + templates/reservations/_form.html.twig | 4 + templates/reservations/edit.html.twig | 13 +++ templates/reservations/index.html.twig | 37 +++++++++ templates/reservations/new.html.twig | 11 +++ templates/reservations/show.html.twig | 30 +++++++ .../statut_commandes/_delete_form.html.twig | 4 + templates/statut_commandes/_form.html.twig | 4 + templates/statut_commandes/edit.html.twig | 13 +++ templates/statut_commandes/index.html.twig | 35 ++++++++ templates/statut_commandes/new.html.twig | 11 +++ templates/statut_commandes/show.html.twig | 26 ++++++ .../statut_tables/_delete_form.html.twig | 4 + templates/statut_tables/_form.html.twig | 4 + templates/statut_tables/edit.html.twig | 13 +++ templates/statut_tables/index.html.twig | 35 ++++++++ templates/statut_tables/new.html.twig | 11 +++ templates/statut_tables/show.html.twig | 26 ++++++ templates/tables/_delete_form.html.twig | 4 + templates/tables/_form.html.twig | 4 + templates/tables/edit.html.twig | 13 +++ templates/tables/index.html.twig | 33 ++++++++ templates/tables/new.html.twig | 11 +++ templates/tables/show.html.twig | 22 +++++ 35 files changed, 951 insertions(+) create mode 100644 src/Controller/PlatController.php create mode 100644 src/Controller/ReservationsController.php create mode 100644 src/Controller/StatutCommandesController.php create mode 100644 src/Controller/StatutTablesController.php create mode 100644 src/Controller/TablesController.php create mode 100644 src/Form/PlatType.php create mode 100644 src/Form/ReservationsType.php create mode 100644 src/Form/StatutCommandesType.php create mode 100644 src/Form/StatutTablesType.php create mode 100644 src/Form/TablesType.php create mode 100644 templates/plat/index.html.twig create mode 100644 templates/reservations/_delete_form.html.twig create mode 100644 templates/reservations/_form.html.twig create mode 100644 templates/reservations/edit.html.twig create mode 100644 templates/reservations/index.html.twig create mode 100644 templates/reservations/new.html.twig create mode 100644 templates/reservations/show.html.twig create mode 100644 templates/statut_commandes/_delete_form.html.twig create mode 100644 templates/statut_commandes/_form.html.twig create mode 100644 templates/statut_commandes/edit.html.twig create mode 100644 templates/statut_commandes/index.html.twig create mode 100644 templates/statut_commandes/new.html.twig create mode 100644 templates/statut_commandes/show.html.twig create mode 100644 templates/statut_tables/_delete_form.html.twig create mode 100644 templates/statut_tables/_form.html.twig create mode 100644 templates/statut_tables/edit.html.twig create mode 100644 templates/statut_tables/index.html.twig create mode 100644 templates/statut_tables/new.html.twig create mode 100644 templates/statut_tables/show.html.twig create mode 100644 templates/tables/_delete_form.html.twig create mode 100644 templates/tables/_form.html.twig create mode 100644 templates/tables/edit.html.twig create mode 100644 templates/tables/index.html.twig create mode 100644 templates/tables/new.html.twig create mode 100644 templates/tables/show.html.twig diff --git a/src/Controller/PlatController.php b/src/Controller/PlatController.php new file mode 100644 index 0000000..d139b88 --- /dev/null +++ b/src/Controller/PlatController.php @@ -0,0 +1,78 @@ +createForm(PlatType::class, $plat); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $this->entityManager->persist($plat); + $this->entityManager->flush(); + } + + return $this->render('plat/add.html.twig', [ + 'formAdd' => $form, + ]); + } + + #[Route('/list', name: '_list')] + public function list(): Response + { + $plat = $this->platsRepository->findAll(); + return $this->render('plat/list.html.twig', [ + 'plat' => $plat, + ]); + } + + #[Route('/update/{id}', name: '_update')] + public function update(int $id, Request $request): Response + { + $plat = $this->platsRepository->find($id); + $form = $this->createForm(PlatType::class, $plat); + $form->handleRequest($request); + + if($form->isSubmitted() && $form->isValid()) + { + $this->entityManager->persist($plat); + $this->entityManager->flush(); + } + + return $this->render('plat/add.html.twig', [ + 'formAdd' => $form, + ]); + } + + #[Route('/delete/{id}', name: '_delete')] + public function delete(int $id): Response + { + $statutCommandes = $this->platsRepository->find($id); + $this->entityManager->remove($statutCommandes); + $this->entityManager->flush(); + + return $this->redirectToRoute('app_plat_list'); + } +} diff --git a/src/Controller/ReservationsController.php b/src/Controller/ReservationsController.php new file mode 100644 index 0000000..3098b4c --- /dev/null +++ b/src/Controller/ReservationsController.php @@ -0,0 +1,81 @@ +render('reservations/index.html.twig', [ + 'reservations' => $reservationsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_reservations_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $reservation = new Reservations(); + $form = $this->createForm(ReservationsType::class, $reservation); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($reservation); + $entityManager->flush(); + + return $this->redirectToRoute('app_reservations_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reservations/new.html.twig', [ + 'reservation' => $reservation, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reservations_show', methods: ['GET'])] + public function show(Reservations $reservation): Response + { + return $this->render('reservations/show.html.twig', [ + 'reservation' => $reservation, + ]); + } + + #[Route('/{id}/edit', name: 'app_reservations_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Reservations $reservation, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ReservationsType::class, $reservation); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_reservations_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reservations/edit.html.twig', [ + 'reservation' => $reservation, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reservations_delete', methods: ['POST'])] + public function delete(Request $request, Reservations $reservation, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$reservation->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($reservation); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_reservations_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/StatutCommandesController.php b/src/Controller/StatutCommandesController.php new file mode 100644 index 0000000..347914c --- /dev/null +++ b/src/Controller/StatutCommandesController.php @@ -0,0 +1,81 @@ +render('statut_commandes/index.html.twig', [ + 'statut_commandes' => $statutCommandesRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_statut_commandes_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $statutCommande = new StatutCommandes(); + $form = $this->createForm(StatutCommandesType::class, $statutCommande); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($statutCommande); + $entityManager->flush(); + + return $this->redirectToRoute('app_statut_commandes_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('statut_commandes/new.html.twig', [ + 'statut_commande' => $statutCommande, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_statut_commandes_show', methods: ['GET'])] + public function show(StatutCommandes $statutCommande): Response + { + return $this->render('statut_commandes/show.html.twig', [ + 'statut_commande' => $statutCommande, + ]); + } + + #[Route('/{id}/edit', name: 'app_statut_commandes_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, StatutCommandes $statutCommande, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(StatutCommandesType::class, $statutCommande); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_statut_commandes_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('statut_commandes/edit.html.twig', [ + 'statut_commande' => $statutCommande, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_statut_commandes_delete', methods: ['POST'])] + public function delete(Request $request, StatutCommandes $statutCommande, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$statutCommande->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($statutCommande); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_statut_commandes_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/StatutTablesController.php b/src/Controller/StatutTablesController.php new file mode 100644 index 0000000..ab9f2a6 --- /dev/null +++ b/src/Controller/StatutTablesController.php @@ -0,0 +1,81 @@ +render('statut_tables/index.html.twig', [ + 'statut_tables' => $statutTablesRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_statut_tables_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $statutTable = new StatutTables(); + $form = $this->createForm(StatutTablesType::class, $statutTable); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($statutTable); + $entityManager->flush(); + + return $this->redirectToRoute('app_statut_tables_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('statut_tables/new.html.twig', [ + 'statut_table' => $statutTable, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_statut_tables_show', methods: ['GET'])] + public function show(StatutTables $statutTable): Response + { + return $this->render('statut_tables/show.html.twig', [ + 'statut_table' => $statutTable, + ]); + } + + #[Route('/{id}/edit', name: 'app_statut_tables_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, StatutTables $statutTable, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(StatutTablesType::class, $statutTable); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_statut_tables_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('statut_tables/edit.html.twig', [ + 'statut_table' => $statutTable, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_statut_tables_delete', methods: ['POST'])] + public function delete(Request $request, StatutTables $statutTable, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$statutTable->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($statutTable); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_statut_tables_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/TablesController.php b/src/Controller/TablesController.php new file mode 100644 index 0000000..cb2e641 --- /dev/null +++ b/src/Controller/TablesController.php @@ -0,0 +1,81 @@ +render('tables/index.html.twig', [ + 'tables' => $tablesRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_tables_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $table = new Tables(); + $form = $this->createForm(TablesType::class, $table); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($table); + $entityManager->flush(); + + return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('tables/new.html.twig', [ + 'table' => $table, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_tables_show', methods: ['GET'])] + public function show(Tables $table): Response + { + return $this->render('tables/show.html.twig', [ + 'table' => $table, + ]); + } + + #[Route('/{id}/edit', name: 'app_tables_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Tables $table, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(TablesType::class, $table); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('tables/edit.html.twig', [ + 'table' => $table, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_tables_delete', methods: ['POST'])] + public function delete(Request $request, Tables $table, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$table->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($table); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_tables_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Form/PlatType.php b/src/Form/PlatType.php new file mode 100644 index 0000000..3e3981c --- /dev/null +++ b/src/Form/PlatType.php @@ -0,0 +1,24 @@ +add('field_name') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + // Configure your form options here + ]); + } +} diff --git a/src/Form/ReservationsType.php b/src/Form/ReservationsType.php new file mode 100644 index 0000000..8a59b2b --- /dev/null +++ b/src/Form/ReservationsType.php @@ -0,0 +1,40 @@ +add('DateHeure', null, [ + 'widget' => 'single_text', + ]) + ->add('Nb_de_prsn') + ->add('tables', EntityType::class, [ + 'class' => Tables::class, + 'choice_label' => 'id', + ]) + ->add('utilisateurs', EntityType::class, [ + 'class' => Utilisateurs::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Reservations::class, + ]); + } +} diff --git a/src/Form/StatutCommandesType.php b/src/Form/StatutCommandesType.php new file mode 100644 index 0000000..695fee2 --- /dev/null +++ b/src/Form/StatutCommandesType.php @@ -0,0 +1,25 @@ +add('Libelle') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => StatutCommandes::class, + ]); + } +} diff --git a/src/Form/StatutTablesType.php b/src/Form/StatutTablesType.php new file mode 100644 index 0000000..ff6c013 --- /dev/null +++ b/src/Form/StatutTablesType.php @@ -0,0 +1,31 @@ +add('Libellé') + ->add('tables', EntityType::class, [ + 'class' => Tables::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => StatutTables::class, + ]); + } +} diff --git a/src/Form/TablesType.php b/src/Form/TablesType.php new file mode 100644 index 0000000..ff62602 --- /dev/null +++ b/src/Form/TablesType.php @@ -0,0 +1,37 @@ +add('Clients', EntityType::class, [ + 'class' => Clients::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ->add('utilisateurs', EntityType::class, [ + 'class' => Utilisateurs::class, + 'choice_label' => 'id', + 'multiple' => true, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Tables::class, + ]); + } +} diff --git a/templates/plat/index.html.twig b/templates/plat/index.html.twig new file mode 100644 index 0000000..e2d1ec7 --- /dev/null +++ b/templates/plat/index.html.twig @@ -0,0 +1,20 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello PlatController!{% endblock %} + +{% block body %} + + +
+

Hello {{ controller_name }}! ✅

+ + This friendly message is coming from: + +
+{% endblock %} diff --git a/templates/reservations/_delete_form.html.twig b/templates/reservations/_delete_form.html.twig new file mode 100644 index 0000000..47202e3 --- /dev/null +++ b/templates/reservations/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/reservations/_form.html.twig b/templates/reservations/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/reservations/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/reservations/edit.html.twig b/templates/reservations/edit.html.twig new file mode 100644 index 0000000..6d6ca47 --- /dev/null +++ b/templates/reservations/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Reservations{% endblock %} + +{% block body %} +

Edit Reservations

+ + {{ include('reservations/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('reservations/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reservations/index.html.twig b/templates/reservations/index.html.twig new file mode 100644 index 0000000..573e019 --- /dev/null +++ b/templates/reservations/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reservations index{% endblock %} + +{% block body %} +

Reservations index

+ + + + + + + + + + + + {% for reservation in reservations %} + + + + + + + {% else %} + + + + {% endfor %} + +
IdDateHeureNb_de_prsnactions
{{ reservation.id }}{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}{{ reservation.NbDePrsn }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/reservations/new.html.twig b/templates/reservations/new.html.twig new file mode 100644 index 0000000..c7c1981 --- /dev/null +++ b/templates/reservations/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Reservations{% endblock %} + +{% block body %} +

Create new Reservations

+ + {{ include('reservations/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/reservations/show.html.twig b/templates/reservations/show.html.twig new file mode 100644 index 0000000..1e99f32 --- /dev/null +++ b/templates/reservations/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Reservations{% endblock %} + +{% block body %} +

Reservations

+ + + + + + + + + + + + + + + + +
Id{{ reservation.id }}
DateHeure{{ reservation.DateHeure ? reservation.DateHeure|date('Y-m-d H:i:s') : '' }}
Nb_de_prsn{{ reservation.NbDePrsn }}
+ + back to list + + edit + + {{ include('reservations/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_commandes/_delete_form.html.twig b/templates/statut_commandes/_delete_form.html.twig new file mode 100644 index 0000000..454d917 --- /dev/null +++ b/templates/statut_commandes/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/statut_commandes/_form.html.twig b/templates/statut_commandes/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/statut_commandes/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/statut_commandes/edit.html.twig b/templates/statut_commandes/edit.html.twig new file mode 100644 index 0000000..d9c145b --- /dev/null +++ b/templates/statut_commandes/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit StatutCommandes{% endblock %} + +{% block body %} +

Edit StatutCommandes

+ + {{ include('statut_commandes/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('statut_commandes/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_commandes/index.html.twig b/templates/statut_commandes/index.html.twig new file mode 100644 index 0000000..31d2a17 --- /dev/null +++ b/templates/statut_commandes/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutCommandes index{% endblock %} + +{% block body %} +

StatutCommandes index

+ + + + + + + + + + + {% for statut_commande in statut_commandes %} + + + + + + {% else %} + + + + {% endfor %} + +
IdLibelleactions
{{ statut_commande.id }}{{ statut_commande.Libelle }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/statut_commandes/new.html.twig b/templates/statut_commandes/new.html.twig new file mode 100644 index 0000000..ff46e9a --- /dev/null +++ b/templates/statut_commandes/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New StatutCommandes{% endblock %} + +{% block body %} +

Create new StatutCommandes

+ + {{ include('statut_commandes/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/statut_commandes/show.html.twig b/templates/statut_commandes/show.html.twig new file mode 100644 index 0000000..e42d6a3 --- /dev/null +++ b/templates/statut_commandes/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutCommandes{% endblock %} + +{% block body %} +

StatutCommandes

+ + + + + + + + + + + + +
Id{{ statut_commande.id }}
Libelle{{ statut_commande.Libelle }}
+ + back to list + + edit + + {{ include('statut_commandes/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_tables/_delete_form.html.twig b/templates/statut_tables/_delete_form.html.twig new file mode 100644 index 0000000..b87f5e4 --- /dev/null +++ b/templates/statut_tables/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/statut_tables/_form.html.twig b/templates/statut_tables/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/statut_tables/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/statut_tables/edit.html.twig b/templates/statut_tables/edit.html.twig new file mode 100644 index 0000000..b478d3a --- /dev/null +++ b/templates/statut_tables/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit StatutTables{% endblock %} + +{% block body %} +

Edit StatutTables

+ + {{ include('statut_tables/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('statut_tables/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/statut_tables/index.html.twig b/templates/statut_tables/index.html.twig new file mode 100644 index 0000000..b721a5a --- /dev/null +++ b/templates/statut_tables/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutTables index{% endblock %} + +{% block body %} +

StatutTables index

+ + + + + + + + + + + {% for statut_table in statut_tables %} + + + + + + {% else %} + + + + {% endfor %} + +
IdLibelléactions
{{ statut_table.id }}{{ statut_table.Libellé }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/statut_tables/new.html.twig b/templates/statut_tables/new.html.twig new file mode 100644 index 0000000..c2a3a60 --- /dev/null +++ b/templates/statut_tables/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New StatutTables{% endblock %} + +{% block body %} +

Create new StatutTables

+ + {{ include('statut_tables/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/statut_tables/show.html.twig b/templates/statut_tables/show.html.twig new file mode 100644 index 0000000..2b395af --- /dev/null +++ b/templates/statut_tables/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}StatutTables{% endblock %} + +{% block body %} +

StatutTables

+ + + + + + + + + + + + +
Id{{ statut_table.id }}
Libellé{{ statut_table.Libellé }}
+ + back to list + + edit + + {{ include('statut_tables/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/tables/_delete_form.html.twig b/templates/tables/_delete_form.html.twig new file mode 100644 index 0000000..dad5b99 --- /dev/null +++ b/templates/tables/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/tables/_form.html.twig b/templates/tables/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/tables/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/tables/edit.html.twig b/templates/tables/edit.html.twig new file mode 100644 index 0000000..a0a1a92 --- /dev/null +++ b/templates/tables/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Tables{% endblock %} + +{% block body %} +

Edit Tables

+ + {{ include('tables/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('tables/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/tables/index.html.twig b/templates/tables/index.html.twig new file mode 100644 index 0000000..979d669 --- /dev/null +++ b/templates/tables/index.html.twig @@ -0,0 +1,33 @@ +{% extends 'base.html.twig' %} + +{% block title %}Tables index{% endblock %} + +{% block body %} +

Tables index

+ + + + + + + + + + {% for table in tables %} + + + + + {% else %} + + + + {% endfor %} + +
Idactions
{{ table.id }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/tables/new.html.twig b/templates/tables/new.html.twig new file mode 100644 index 0000000..f25965a --- /dev/null +++ b/templates/tables/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Tables{% endblock %} + +{% block body %} +

Create new Tables

+ + {{ include('tables/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/tables/show.html.twig b/templates/tables/show.html.twig new file mode 100644 index 0000000..dfe40f5 --- /dev/null +++ b/templates/tables/show.html.twig @@ -0,0 +1,22 @@ +{% extends 'base.html.twig' %} + +{% block title %}Tables{% endblock %} + +{% block body %} +

Tables

+ + + + + + + + +
Id{{ table.id }}
+ + back to list + + edit + + {{ include('tables/_delete_form.html.twig') }} +{% endblock %}