diff --git a/src/Controller/FAQController.php b/src/Controller/FAQController.php index fbba2aa..2a3aa50 100644 --- a/src/Controller/FAQController.php +++ b/src/Controller/FAQController.php @@ -30,6 +30,7 @@ final class FAQController extends AbstractController $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { + $fAQ->setUpdateDate(new \DateTime()); $entityManager->persist($fAQ); $entityManager->flush(); @@ -57,6 +58,7 @@ final class FAQController extends AbstractController $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { + $fAQ->setUpdateDate(new \DateTime()); $entityManager->flush(); return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER); diff --git a/src/Form/AnnouncementType.php b/src/Form/AnnouncementType.php index cc5b5ba..c6c87ed 100644 --- a/src/Form/AnnouncementType.php +++ b/src/Form/AnnouncementType.php @@ -35,4 +35,4 @@ class AnnouncementType extends AbstractType 'data_class' => Announcement::class, ]); } -} +} \ No newline at end of file diff --git a/src/Form/FAQType.php b/src/Form/FAQType.php index c420a1c..0038157 100644 --- a/src/Form/FAQType.php +++ b/src/Form/FAQType.php @@ -13,11 +13,7 @@ class FAQType extends AbstractType { $builder ->add('question') - ->add('answer') - ->add('updateDate', null, [ - 'widget' => 'single_text', - ]) - ; + ->add('answer'); } public function configureOptions(OptionsResolver $resolver): void diff --git a/templates/faq/index.html.twig b/templates/faq/index.html.twig index 46efd88..be69921 100644 --- a/templates/faq/index.html.twig +++ b/templates/faq/index.html.twig @@ -10,18 +10,18 @@ - + {% for faq in faqs %} - +
ID Question RéponseDenrnière modif Actions
{{ faq.id }} {{ faq.question }} {{ faq.answer }}{{ faq.updateDate|date("d-m-y") }} Voir diff --git a/templates/faq/show.html.twig b/templates/faq/show.html.twig index b635ecc..1b986f3 100644 --- a/templates/faq/show.html.twig +++ b/templates/faq/show.html.twig @@ -24,7 +24,6 @@
-
@@ -46,4 +45,4 @@
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/templates/profile/index.html.twig b/templates/profile/index.html.twig index 251ddc1..0c4742a 100644 --- a/templates/profile/index.html.twig +++ b/templates/profile/index.html.twig @@ -15,5 +15,11 @@ {% if 'ROLE_EMPLOYEE' in app.user.roles %} {% include 'profile/employee.html.twig' %} {% endif %} + + {% if 'ROLE_ADMIN' in app.user.roles%} +
+

Vous etes admin

+
+ {% endif %} {% endblock %} diff --git a/templates/profile/intern.html.twig b/templates/profile/intern.html.twig index 1482561..5d6e0b3 100644 --- a/templates/profile/intern.html.twig +++ b/templates/profile/intern.html.twig @@ -19,6 +19,10 @@ Aucun pour le moment {% endif %} +
+
Selectionner vos diplômes +

Vos compétences :

+
+ Selectionner vos compétences +