ff
This commit is contained in:
parent
f3a44047c4
commit
9a75d46972
@ -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);
|
||||
|
@ -35,4 +35,4 @@ class AnnouncementType extends AbstractType
|
||||
'data_class' => Announcement::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -10,18 +10,18 @@
|
||||
<table class="min-w-full table-auto">
|
||||
<thead>
|
||||
<tr class="bg-gray-800 text-white">
|
||||
<th class="px-4 py-2 text-left">ID</th>
|
||||
<th class="px-4 py-2 text-left">Question</th>
|
||||
<th class="px-4 py-2 text-left">Réponse</th>
|
||||
<th class="px-4 py-2 text-left">Denrnière modif</th>
|
||||
<th class="px-4 py-2 text-left">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for faq in faqs %}
|
||||
<tr class="border-b">
|
||||
<td class="px-4 py-2">{{ faq.id }}</td>
|
||||
<td class="px-4 py-2">{{ faq.question }}</td>
|
||||
<td class="px-4 py-2">{{ faq.answer }}</td>
|
||||
<td class="px-4 py-2">{{ faq.updateDate|date("d-m-y") }}</td>
|
||||
<td class="px-4 py-2">
|
||||
<a href="{{ path('app_faq_show', {'id': faq.id}) }}" class="text-teal-500 hover:text-teal-700 mr-3">
|
||||
<i class="fas fa-eye"></i> Voir
|
||||
|
@ -24,7 +24,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex justify-between">
|
||||
<!-- Bouton Retour à la liste -->
|
||||
<a href="{{ path('app_faq_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
|
||||
@ -46,4 +45,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
@ -15,5 +15,11 @@
|
||||
{% if 'ROLE_EMPLOYEE' in app.user.roles %}
|
||||
{% include 'profile/employee.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'ROLE_ADMIN' in app.user.roles%}
|
||||
<div>
|
||||
<h1 class="text-9xl font-bold ml-kdn "> Vous etes admin</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -19,6 +19,10 @@
|
||||
Aucun pour le moment
|
||||
{% endif %}
|
||||
</ul>
|
||||
<br>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_user_edit',{id: app.user.id}) }}"> Selectionner vos diplômes
|
||||
</a>
|
||||
|
||||
<h3 class="text-lg font-semibold mt-6">Vos compétences :</h3>
|
||||
<ul class="list-disc list-inside text-gray-800">
|
||||
@ -31,6 +35,10 @@
|
||||
Aucune pour le moment
|
||||
{% endif %}
|
||||
</ul>
|
||||
<br>
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
href="{{ path('app_user_edit',{id: app.user.id}) }}"> Selectionner vos compétences
|
||||
</a>
|
||||
|
||||
<div class="flex justify-center mt-6">
|
||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
||||
|
Loading…
Reference in New Issue
Block a user