diff --git a/src/Controller/DimensionController.php b/src/Controller/DimensionController.php new file mode 100644 index 0000000000000000000000000000000000000000..ee092191b7fd65132b697342a57426587d526c0a --- /dev/null +++ b/src/Controller/DimensionController.php @@ -0,0 +1,81 @@ +<?php + +namespace App\Controller; + +use App\Entity\Dimension; +use App\Form\DimensionType; +use App\Repository\DimensionRepository; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Attribute\Route; + +#[Route('/dimension')] +final class DimensionController extends AbstractController +{ + #[Route(name: 'app_dimension_index', methods: ['GET'])] + public function index(DimensionRepository $dimensionRepository): Response + { + return $this->render('dimension/index.html.twig', [ + 'dimensions' => $dimensionRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_dimension_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $dimension = new Dimension(); + $form = $this->createForm(DimensionType::class, $dimension); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($dimension); + $entityManager->flush(); + + return $this->redirectToRoute('app_dimension_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('dimension/new.html.twig', [ + 'dimension' => $dimension, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_dimension_show', methods: ['GET'])] + public function show(Dimension $dimension): Response + { + return $this->render('dimension/show.html.twig', [ + 'dimension' => $dimension, + ]); + } + + #[Route('/{id}/edit', name: 'app_dimension_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Dimension $dimension, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(DimensionType::class, $dimension); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_dimension_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('dimension/edit.html.twig', [ + 'dimension' => $dimension, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_dimension_delete', methods: ['POST'])] + public function delete(Request $request, Dimension $dimension, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$dimension->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($dimension); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_dimension_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/QuestionController.php b/src/Controller/QuestionController.php new file mode 100644 index 0000000000000000000000000000000000000000..0a8827162b2f387f601862d8d87283dc71cc3d41 --- /dev/null +++ b/src/Controller/QuestionController.php @@ -0,0 +1,81 @@ +<?php + +namespace App\Controller; + +use App\Entity\Question; +use App\Form\QuestionType; +use App\Repository\QuestionRepository; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Attribute\Route; + +#[Route('/question')] +final class QuestionController extends AbstractController +{ + #[Route(name: 'app_question_index', methods: ['GET'])] + public function index(QuestionRepository $questionRepository): Response + { + return $this->render('question/index.html.twig', [ + 'questions' => $questionRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_question_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $question = new Question(); + $form = $this->createForm(QuestionType::class, $question); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($question); + $entityManager->flush(); + + return $this->redirectToRoute('app_question_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('question/new.html.twig', [ + 'question' => $question, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_question_show', methods: ['GET'])] + public function show(Question $question): Response + { + return $this->render('question/show.html.twig', [ + 'question' => $question, + ]); + } + + #[Route('/{id}/edit', name: 'app_question_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Question $question, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(QuestionType::class, $question); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_question_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('question/edit.html.twig', [ + 'question' => $question, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_question_delete', methods: ['POST'])] + public function delete(Request $request, Question $question, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$question->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($question); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_question_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/ReponsePossibleController.php b/src/Controller/ReponsePossibleController.php new file mode 100644 index 0000000000000000000000000000000000000000..ec9f6242955686d04b65e08742cff0ba61f7d7de --- /dev/null +++ b/src/Controller/ReponsePossibleController.php @@ -0,0 +1,81 @@ +<?php + +namespace App\Controller; + +use App\Entity\ReponsePossible; +use App\Form\ReponsePossibleType; +use App\Repository\ReponsePossibleRepository; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Attribute\Route; + +#[Route('/reponse/possible')] +final class ReponsePossibleController extends AbstractController +{ + #[Route(name: 'app_reponse_possible_index', methods: ['GET'])] + public function index(ReponsePossibleRepository $reponsePossibleRepository): Response + { + return $this->render('reponse_possible/index.html.twig', [ + 'reponse_possibles' => $reponsePossibleRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_reponse_possible_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $reponsePossible = new ReponsePossible(); + $form = $this->createForm(ReponsePossibleType::class, $reponsePossible); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($reponsePossible); + $entityManager->flush(); + + return $this->redirectToRoute('app_reponse_possible_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reponse_possible/new.html.twig', [ + 'reponse_possible' => $reponsePossible, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reponse_possible_show', methods: ['GET'])] + public function show(ReponsePossible $reponsePossible): Response + { + return $this->render('reponse_possible/show.html.twig', [ + 'reponse_possible' => $reponsePossible, + ]); + } + + #[Route('/{id}/edit', name: 'app_reponse_possible_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, ReponsePossible $reponsePossible, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ReponsePossibleType::class, $reponsePossible); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_reponse_possible_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reponse_possible/edit.html.twig', [ + 'reponse_possible' => $reponsePossible, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reponse_possible_delete', methods: ['POST'])] + public function delete(Request $request, ReponsePossible $reponsePossible, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$reponsePossible->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($reponsePossible); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_reponse_possible_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/ReponseUtilisateurController.php b/src/Controller/ReponseUtilisateurController.php new file mode 100644 index 0000000000000000000000000000000000000000..1f436306dfcad036d395282b3408b8f73b34eb43 --- /dev/null +++ b/src/Controller/ReponseUtilisateurController.php @@ -0,0 +1,81 @@ +<?php + +namespace App\Controller; + +use App\Entity\ReponseUtilisateur; +use App\Form\ReponseUtilisateurType; +use App\Repository\ReponseUtilisateurRepository; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Attribute\Route; + +#[Route('/reponse/utilisateur')] +final class ReponseUtilisateurController extends AbstractController +{ + #[Route(name: 'app_reponse_utilisateur_index', methods: ['GET'])] + public function index(ReponseUtilisateurRepository $reponseUtilisateurRepository): Response + { + return $this->render('reponse_utilisateur/index.html.twig', [ + 'reponse_utilisateurs' => $reponseUtilisateurRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_reponse_utilisateur_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $reponseUtilisateur = new ReponseUtilisateur(); + $form = $this->createForm(ReponseUtilisateurType::class, $reponseUtilisateur); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($reponseUtilisateur); + $entityManager->flush(); + + return $this->redirectToRoute('app_reponse_utilisateur_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reponse_utilisateur/new.html.twig', [ + 'reponse_utilisateur' => $reponseUtilisateur, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reponse_utilisateur_show', methods: ['GET'])] + public function show(ReponseUtilisateur $reponseUtilisateur): Response + { + return $this->render('reponse_utilisateur/show.html.twig', [ + 'reponse_utilisateur' => $reponseUtilisateur, + ]); + } + + #[Route('/{id}/edit', name: 'app_reponse_utilisateur_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, ReponseUtilisateur $reponseUtilisateur, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(ReponseUtilisateurType::class, $reponseUtilisateur); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_reponse_utilisateur_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('reponse_utilisateur/edit.html.twig', [ + 'reponse_utilisateur' => $reponseUtilisateur, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_reponse_utilisateur_delete', methods: ['POST'])] + public function delete(Request $request, ReponseUtilisateur $reponseUtilisateur, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$reponseUtilisateur->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($reponseUtilisateur); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_reponse_utilisateur_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Controller/TestController.php b/src/Controller/TestController.php new file mode 100644 index 0000000000000000000000000000000000000000..36ed072c39eb058b6daa8033df09d3d7cf91cbf4 --- /dev/null +++ b/src/Controller/TestController.php @@ -0,0 +1,81 @@ +<?php + +namespace App\Controller; + +use App\Entity\Test; +use App\Form\TestType; +use App\Repository\TestRepository; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Attribute\Route; + +#[Route('/test')] +final class TestController extends AbstractController +{ + #[Route(name: 'app_test_index', methods: ['GET'])] + public function index(TestRepository $testRepository): Response + { + return $this->render('test/index.html.twig', [ + 'tests' => $testRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_test_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $test = new Test(); + $form = $this->createForm(TestType::class, $test); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($test); + $entityManager->flush(); + + return $this->redirectToRoute('app_test_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('test/new.html.twig', [ + 'test' => $test, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_test_show', methods: ['GET'])] + public function show(Test $test): Response + { + return $this->render('test/show.html.twig', [ + 'test' => $test, + ]); + } + + #[Route('/{id}/edit', name: 'app_test_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, Test $test, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(TestType::class, $test); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_test_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('test/edit.html.twig', [ + 'test' => $test, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_test_delete', methods: ['POST'])] + public function delete(Request $request, Test $test, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$test->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($test); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_test_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Form/DimensionType.php b/src/Form/DimensionType.php new file mode 100644 index 0000000000000000000000000000000000000000..788dc9d1c101f27a06baca49570b1542f1885bf9 --- /dev/null +++ b/src/Form/DimensionType.php @@ -0,0 +1,25 @@ +<?php + +namespace App\Form; + +use App\Entity\Dimension; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class DimensionType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder + ->add('nomDimension') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Dimension::class, + ]); + } +} diff --git a/src/Form/QuestionType.php b/src/Form/QuestionType.php new file mode 100644 index 0000000000000000000000000000000000000000..17279321761997cbc8334385314ee946f4787e2e --- /dev/null +++ b/src/Form/QuestionType.php @@ -0,0 +1,32 @@ +<?php + +namespace App\Form; + +use App\Entity\dimension; +use App\Entity\Question; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class QuestionType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder + ->add('libelle') + ->add('typeQuestion') + ->add('dimension', EntityType::class, [ + 'class' => dimension::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Question::class, + ]); + } +} diff --git a/src/Form/ReponsePossibleType.php b/src/Form/ReponsePossibleType.php new file mode 100644 index 0000000000000000000000000000000000000000..5a6265465e9f933f635841e9200feea9f2f72a20 --- /dev/null +++ b/src/Form/ReponsePossibleType.php @@ -0,0 +1,32 @@ +<?php + +namespace App\Form; + +use App\Entity\question; +use App\Entity\ReponsePossible; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class ReponsePossibleType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder + ->add('libelle') + ->add('valeur') + ->add('question', EntityType::class, [ + 'class' => question::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => ReponsePossible::class, + ]); + } +} diff --git a/src/Form/ReponseUtilisateurType.php b/src/Form/ReponseUtilisateurType.php new file mode 100644 index 0000000000000000000000000000000000000000..7bc630e4471bd152fbc3cf668f93c1f2c1b270d1 --- /dev/null +++ b/src/Form/ReponseUtilisateurType.php @@ -0,0 +1,41 @@ +<?php + +namespace App\Form; + +use App\Entity\question; +use App\Entity\ReponsePossible; +use App\Entity\ReponseUtilisateur; +use App\Entity\test; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class ReponseUtilisateurType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder + ->add('valeurLibre') + ->add('test', EntityType::class, [ + 'class' => test::class, + 'choice_label' => 'id', + ]) + ->add('question', EntityType::class, [ + 'class' => question::class, + 'choice_label' => 'id', + ]) + ->add('reponse', EntityType::class, [ + 'class' => ReponsePossible::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => ReponseUtilisateur::class, + ]); + } +} diff --git a/src/Form/TestType.php b/src/Form/TestType.php new file mode 100644 index 0000000000000000000000000000000000000000..2aa5222c96ea0d3a73848e2ad8bcd84167946892 --- /dev/null +++ b/src/Form/TestType.php @@ -0,0 +1,34 @@ +<?php + +namespace App\Form; + +use App\Entity\Test; +use App\Entity\usager; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; + +class TestType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options): void + { + $builder + ->add('datePassage', null, [ + 'widget' => 'single_text', + ]) + ->add('scoreTotal') + ->add('usager', EntityType::class, [ + 'class' => usager::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Test::class, + ]); + } +} diff --git a/templates/dimension/_delete_form.html.twig b/templates/dimension/_delete_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..3a015e6e64a6336dee1558bcd83202481ec39bd5 --- /dev/null +++ b/templates/dimension/_delete_form.html.twig @@ -0,0 +1,4 @@ +<form method="post" action="{{ path('app_dimension_delete', {'id': dimension.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> + <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ dimension.id) }}"> + <button class="btn">Delete</button> +</form> diff --git a/templates/dimension/_form.html.twig b/templates/dimension/_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bf20b98fb01ed38c82b670ff3fe5d7e207e80f16 --- /dev/null +++ b/templates/dimension/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + <button class="btn">{{ button_label|default('Save') }}</button> +{{ form_end(form) }} diff --git a/templates/dimension/edit.html.twig b/templates/dimension/edit.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..6772dfa59d737595d6580c281cb2045c9ba3c1aa --- /dev/null +++ b/templates/dimension/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Dimension{% endblock %} + +{% block body %} + <h1>Edit Dimension</h1> + + {{ include('dimension/_form.html.twig', {'button_label': 'Update'}) }} + + <a href="{{ path('app_dimension_index') }}">back to list</a> + + {{ include('dimension/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/dimension/index.html.twig b/templates/dimension/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..6df482566c998cef5c7ffd12e9defc1912c775cf --- /dev/null +++ b/templates/dimension/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}Dimension index{% endblock %} + +{% block body %} + <h1>Dimension index</h1> + + <table class="table"> + <thead> + <tr> + <th>Id</th> + <th>NomDimension</th> + <th>actions</th> + </tr> + </thead> + <tbody> + {% for dimension in dimensions %} + <tr> + <td>{{ dimension.id }}</td> + <td>{{ dimension.nomDimension }}</td> + <td> + <a href="{{ path('app_dimension_show', {'id': dimension.id}) }}">show</a> + <a href="{{ path('app_dimension_edit', {'id': dimension.id}) }}">edit</a> + </td> + </tr> + {% else %} + <tr> + <td colspan="3">no records found</td> + </tr> + {% endfor %} + </tbody> + </table> + + <a href="{{ path('app_dimension_new') }}">Create new</a> +{% endblock %} diff --git a/templates/dimension/new.html.twig b/templates/dimension/new.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..2c309aa6643f1beb60ccf632679864b8c2ead199 --- /dev/null +++ b/templates/dimension/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Dimension{% endblock %} + +{% block body %} + <h1>Create new Dimension</h1> + + {{ include('dimension/_form.html.twig') }} + + <a href="{{ path('app_dimension_index') }}">back to list</a> +{% endblock %} diff --git a/templates/dimension/show.html.twig b/templates/dimension/show.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..5fa24461fefced89c64fb067136c0f8bf4d54490 --- /dev/null +++ b/templates/dimension/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}Dimension{% endblock %} + +{% block body %} + <h1>Dimension</h1> + + <table class="table"> + <tbody> + <tr> + <th>Id</th> + <td>{{ dimension.id }}</td> + </tr> + <tr> + <th>NomDimension</th> + <td>{{ dimension.nomDimension }}</td> + </tr> + </tbody> + </table> + + <a href="{{ path('app_dimension_index') }}">back to list</a> + + <a href="{{ path('app_dimension_edit', {'id': dimension.id}) }}">edit</a> + + {{ include('dimension/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/question/_delete_form.html.twig b/templates/question/_delete_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..1cac67ab823dae85696b1bbf6a11979f66044394 --- /dev/null +++ b/templates/question/_delete_form.html.twig @@ -0,0 +1,4 @@ +<form method="post" action="{{ path('app_question_delete', {'id': question.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> + <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ question.id) }}"> + <button class="btn">Delete</button> +</form> diff --git a/templates/question/_form.html.twig b/templates/question/_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bf20b98fb01ed38c82b670ff3fe5d7e207e80f16 --- /dev/null +++ b/templates/question/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + <button class="btn">{{ button_label|default('Save') }}</button> +{{ form_end(form) }} diff --git a/templates/question/edit.html.twig b/templates/question/edit.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..69c6651d69cf153da7f987b9b9d63bd48d15b220 --- /dev/null +++ b/templates/question/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Question{% endblock %} + +{% block body %} + <h1>Edit Question</h1> + + {{ include('question/_form.html.twig', {'button_label': 'Update'}) }} + + <a href="{{ path('app_question_index') }}">back to list</a> + + {{ include('question/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/question/index.html.twig b/templates/question/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..b33b70f03d60832ade165a2400d5bc6ee08861e2 --- /dev/null +++ b/templates/question/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}Question index{% endblock %} + +{% block body %} + <h1>Question index</h1> + + <table class="table"> + <thead> + <tr> + <th>Id</th> + <th>Libelle</th> + <th>TypeQuestion</th> + <th>actions</th> + </tr> + </thead> + <tbody> + {% for question in questions %} + <tr> + <td>{{ question.id }}</td> + <td>{{ question.libelle }}</td> + <td>{{ question.typeQuestion }}</td> + <td> + <a href="{{ path('app_question_show', {'id': question.id}) }}">show</a> + <a href="{{ path('app_question_edit', {'id': question.id}) }}">edit</a> + </td> + </tr> + {% else %} + <tr> + <td colspan="4">no records found</td> + </tr> + {% endfor %} + </tbody> + </table> + + <a href="{{ path('app_question_new') }}">Create new</a> +{% endblock %} diff --git a/templates/question/new.html.twig b/templates/question/new.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..834bca43eaf6c430ad8c2d253e2a18f9d2038c30 --- /dev/null +++ b/templates/question/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Question{% endblock %} + +{% block body %} + <h1>Create new Question</h1> + + {{ include('question/_form.html.twig') }} + + <a href="{{ path('app_question_index') }}">back to list</a> +{% endblock %} diff --git a/templates/question/show.html.twig b/templates/question/show.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..10c99eaabca1a947e0bc6c670e811e04a04a7052 --- /dev/null +++ b/templates/question/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Question{% endblock %} + +{% block body %} + <h1>Question</h1> + + <table class="table"> + <tbody> + <tr> + <th>Id</th> + <td>{{ question.id }}</td> + </tr> + <tr> + <th>Libelle</th> + <td>{{ question.libelle }}</td> + </tr> + <tr> + <th>TypeQuestion</th> + <td>{{ question.typeQuestion }}</td> + </tr> + </tbody> + </table> + + <a href="{{ path('app_question_index') }}">back to list</a> + + <a href="{{ path('app_question_edit', {'id': question.id}) }}">edit</a> + + {{ include('question/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reponse_possible/_delete_form.html.twig b/templates/reponse_possible/_delete_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..67aa21f525741010c5f5973d66ac57be2a1a3825 --- /dev/null +++ b/templates/reponse_possible/_delete_form.html.twig @@ -0,0 +1,4 @@ +<form method="post" action="{{ path('app_reponse_possible_delete', {'id': reponse_possible.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> + <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ reponse_possible.id) }}"> + <button class="btn">Delete</button> +</form> diff --git a/templates/reponse_possible/_form.html.twig b/templates/reponse_possible/_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bf20b98fb01ed38c82b670ff3fe5d7e207e80f16 --- /dev/null +++ b/templates/reponse_possible/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + <button class="btn">{{ button_label|default('Save') }}</button> +{{ form_end(form) }} diff --git a/templates/reponse_possible/edit.html.twig b/templates/reponse_possible/edit.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d39d255bfa5971c2ef918ec1378eb03c15c2a752 --- /dev/null +++ b/templates/reponse_possible/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit ReponsePossible{% endblock %} + +{% block body %} + <h1>Edit ReponsePossible</h1> + + {{ include('reponse_possible/_form.html.twig', {'button_label': 'Update'}) }} + + <a href="{{ path('app_reponse_possible_index') }}">back to list</a> + + {{ include('reponse_possible/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reponse_possible/index.html.twig b/templates/reponse_possible/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..25be5f74cb64996588c03c6b215aab63db6a42c9 --- /dev/null +++ b/templates/reponse_possible/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}ReponsePossible index{% endblock %} + +{% block body %} + <h1>ReponsePossible index</h1> + + <table class="table"> + <thead> + <tr> + <th>Id</th> + <th>Libelle</th> + <th>Valeur</th> + <th>actions</th> + </tr> + </thead> + <tbody> + {% for reponse_possible in reponse_possibles %} + <tr> + <td>{{ reponse_possible.id }}</td> + <td>{{ reponse_possible.libelle }}</td> + <td>{{ reponse_possible.valeur }}</td> + <td> + <a href="{{ path('app_reponse_possible_show', {'id': reponse_possible.id}) }}">show</a> + <a href="{{ path('app_reponse_possible_edit', {'id': reponse_possible.id}) }}">edit</a> + </td> + </tr> + {% else %} + <tr> + <td colspan="4">no records found</td> + </tr> + {% endfor %} + </tbody> + </table> + + <a href="{{ path('app_reponse_possible_new') }}">Create new</a> +{% endblock %} diff --git a/templates/reponse_possible/new.html.twig b/templates/reponse_possible/new.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..ece9f7c759e0a40c530266cca9baa1bb088a76f7 --- /dev/null +++ b/templates/reponse_possible/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New ReponsePossible{% endblock %} + +{% block body %} + <h1>Create new ReponsePossible</h1> + + {{ include('reponse_possible/_form.html.twig') }} + + <a href="{{ path('app_reponse_possible_index') }}">back to list</a> +{% endblock %} diff --git a/templates/reponse_possible/show.html.twig b/templates/reponse_possible/show.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..4555641bba372b81adb28aeefa038f45e07c1dea --- /dev/null +++ b/templates/reponse_possible/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}ReponsePossible{% endblock %} + +{% block body %} + <h1>ReponsePossible</h1> + + <table class="table"> + <tbody> + <tr> + <th>Id</th> + <td>{{ reponse_possible.id }}</td> + </tr> + <tr> + <th>Libelle</th> + <td>{{ reponse_possible.libelle }}</td> + </tr> + <tr> + <th>Valeur</th> + <td>{{ reponse_possible.valeur }}</td> + </tr> + </tbody> + </table> + + <a href="{{ path('app_reponse_possible_index') }}">back to list</a> + + <a href="{{ path('app_reponse_possible_edit', {'id': reponse_possible.id}) }}">edit</a> + + {{ include('reponse_possible/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reponse_utilisateur/_delete_form.html.twig b/templates/reponse_utilisateur/_delete_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..dcca670d848a69a3f638c10a1421307b569e979c --- /dev/null +++ b/templates/reponse_utilisateur/_delete_form.html.twig @@ -0,0 +1,4 @@ +<form method="post" action="{{ path('app_reponse_utilisateur_delete', {'id': reponse_utilisateur.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> + <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ reponse_utilisateur.id) }}"> + <button class="btn">Delete</button> +</form> diff --git a/templates/reponse_utilisateur/_form.html.twig b/templates/reponse_utilisateur/_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bf20b98fb01ed38c82b670ff3fe5d7e207e80f16 --- /dev/null +++ b/templates/reponse_utilisateur/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + <button class="btn">{{ button_label|default('Save') }}</button> +{{ form_end(form) }} diff --git a/templates/reponse_utilisateur/edit.html.twig b/templates/reponse_utilisateur/edit.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d92f276b6b1bc74d326217eecf04f35483d0377c --- /dev/null +++ b/templates/reponse_utilisateur/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit ReponseUtilisateur{% endblock %} + +{% block body %} + <h1>Edit ReponseUtilisateur</h1> + + {{ include('reponse_utilisateur/_form.html.twig', {'button_label': 'Update'}) }} + + <a href="{{ path('app_reponse_utilisateur_index') }}">back to list</a> + + {{ include('reponse_utilisateur/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/reponse_utilisateur/index.html.twig b/templates/reponse_utilisateur/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..37f643f66fa05cbc553580b0f0abdf84bf16766c --- /dev/null +++ b/templates/reponse_utilisateur/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}ReponseUtilisateur index{% endblock %} + +{% block body %} + <h1>ReponseUtilisateur index</h1> + + <table class="table"> + <thead> + <tr> + <th>Id</th> + <th>ValeurLibre</th> + <th>actions</th> + </tr> + </thead> + <tbody> + {% for reponse_utilisateur in reponse_utilisateurs %} + <tr> + <td>{{ reponse_utilisateur.id }}</td> + <td>{{ reponse_utilisateur.valeurLibre }}</td> + <td> + <a href="{{ path('app_reponse_utilisateur_show', {'id': reponse_utilisateur.id}) }}">show</a> + <a href="{{ path('app_reponse_utilisateur_edit', {'id': reponse_utilisateur.id}) }}">edit</a> + </td> + </tr> + {% else %} + <tr> + <td colspan="3">no records found</td> + </tr> + {% endfor %} + </tbody> + </table> + + <a href="{{ path('app_reponse_utilisateur_new') }}">Create new</a> +{% endblock %} diff --git a/templates/reponse_utilisateur/new.html.twig b/templates/reponse_utilisateur/new.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..2990e9f0f9b0ed3952e69b7fea5f9318d3cead40 --- /dev/null +++ b/templates/reponse_utilisateur/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New ReponseUtilisateur{% endblock %} + +{% block body %} + <h1>Create new ReponseUtilisateur</h1> + + {{ include('reponse_utilisateur/_form.html.twig') }} + + <a href="{{ path('app_reponse_utilisateur_index') }}">back to list</a> +{% endblock %} diff --git a/templates/reponse_utilisateur/show.html.twig b/templates/reponse_utilisateur/show.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..2c39c4fdfbe37e2296ade7850bbdf8fcde4661e0 --- /dev/null +++ b/templates/reponse_utilisateur/show.html.twig @@ -0,0 +1,26 @@ +{% extends 'base.html.twig' %} + +{% block title %}ReponseUtilisateur{% endblock %} + +{% block body %} + <h1>ReponseUtilisateur</h1> + + <table class="table"> + <tbody> + <tr> + <th>Id</th> + <td>{{ reponse_utilisateur.id }}</td> + </tr> + <tr> + <th>ValeurLibre</th> + <td>{{ reponse_utilisateur.valeurLibre }}</td> + </tr> + </tbody> + </table> + + <a href="{{ path('app_reponse_utilisateur_index') }}">back to list</a> + + <a href="{{ path('app_reponse_utilisateur_edit', {'id': reponse_utilisateur.id}) }}">edit</a> + + {{ include('reponse_utilisateur/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/test/_delete_form.html.twig b/templates/test/_delete_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..b72d533f698613d7d9201406cea6a55af9318b4f --- /dev/null +++ b/templates/test/_delete_form.html.twig @@ -0,0 +1,4 @@ +<form method="post" action="{{ path('app_test_delete', {'id': test.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> + <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ test.id) }}"> + <button class="btn">Delete</button> +</form> diff --git a/templates/test/_form.html.twig b/templates/test/_form.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bf20b98fb01ed38c82b670ff3fe5d7e207e80f16 --- /dev/null +++ b/templates/test/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + <button class="btn">{{ button_label|default('Save') }}</button> +{{ form_end(form) }} diff --git a/templates/test/edit.html.twig b/templates/test/edit.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..9d0db50197430a8d2ab79dee3bb12bf3b3e76d40 --- /dev/null +++ b/templates/test/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit Test{% endblock %} + +{% block body %} + <h1>Edit Test</h1> + + {{ include('test/_form.html.twig', {'button_label': 'Update'}) }} + + <a href="{{ path('app_test_index') }}">back to list</a> + + {{ include('test/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/test/index.html.twig b/templates/test/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..bbedc53c7229f7a030117a86bcb4e9301297a478 --- /dev/null +++ b/templates/test/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}Test index{% endblock %} + +{% block body %} + <h1>Test index</h1> + + <table class="table"> + <thead> + <tr> + <th>Id</th> + <th>DatePassage</th> + <th>ScoreTotal</th> + <th>actions</th> + </tr> + </thead> + <tbody> + {% for test in tests %} + <tr> + <td>{{ test.id }}</td> + <td>{{ test.datePassage ? test.datePassage|date('Y-m-d H:i:s') : '' }}</td> + <td>{{ test.scoreTotal }}</td> + <td> + <a href="{{ path('app_test_show', {'id': test.id}) }}">show</a> + <a href="{{ path('app_test_edit', {'id': test.id}) }}">edit</a> + </td> + </tr> + {% else %} + <tr> + <td colspan="4">no records found</td> + </tr> + {% endfor %} + </tbody> + </table> + + <a href="{{ path('app_test_new') }}">Create new</a> +{% endblock %} diff --git a/templates/test/new.html.twig b/templates/test/new.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..0f460f54423e45ea98ed50fca3c569c320bcef66 --- /dev/null +++ b/templates/test/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New Test{% endblock %} + +{% block body %} + <h1>Create new Test</h1> + + {{ include('test/_form.html.twig') }} + + <a href="{{ path('app_test_index') }}">back to list</a> +{% endblock %} diff --git a/templates/test/show.html.twig b/templates/test/show.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..5cc9e14a6129285fee47ffcdba95703980331bf6 --- /dev/null +++ b/templates/test/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Test{% endblock %} + +{% block body %} + <h1>Test</h1> + + <table class="table"> + <tbody> + <tr> + <th>Id</th> + <td>{{ test.id }}</td> + </tr> + <tr> + <th>DatePassage</th> + <td>{{ test.datePassage ? test.datePassage|date('Y-m-d H:i:s') : '' }}</td> + </tr> + <tr> + <th>ScoreTotal</th> + <td>{{ test.scoreTotal }}</td> + </tr> + </tbody> + </table> + + <a href="{{ path('app_test_index') }}">back to list</a> + + <a href="{{ path('app_test_edit', {'id': test.id}) }}">edit</a> + + {{ include('test/_delete_form.html.twig') }} +{% endblock %}