ff
This commit is contained in:
parent
f3a44047c4
commit
9a75d46972
@ -30,6 +30,7 @@ final class FAQController extends AbstractController
|
|||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
$fAQ->setUpdateDate(new \DateTime());
|
||||||
$entityManager->persist($fAQ);
|
$entityManager->persist($fAQ);
|
||||||
$entityManager->flush();
|
$entityManager->flush();
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ final class FAQController extends AbstractController
|
|||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
$fAQ->setUpdateDate(new \DateTime());
|
||||||
$entityManager->flush();
|
$entityManager->flush();
|
||||||
|
|
||||||
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
|
return $this->redirectToRoute('app_faq_index', [], Response::HTTP_SEE_OTHER);
|
||||||
|
@ -13,11 +13,7 @@ class FAQType extends AbstractType
|
|||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('question')
|
->add('question')
|
||||||
->add('answer')
|
->add('answer');
|
||||||
->add('updateDate', null, [
|
|
||||||
'widget' => 'single_text',
|
|
||||||
])
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver): void
|
public function configureOptions(OptionsResolver $resolver): void
|
||||||
|
@ -10,18 +10,18 @@
|
|||||||
<table class="min-w-full table-auto">
|
<table class="min-w-full table-auto">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-gray-800 text-white">
|
<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">Question</th>
|
||||||
<th class="px-4 py-2 text-left">Réponse</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>
|
<th class="px-4 py-2 text-left">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for faq in faqs %}
|
{% for faq in faqs %}
|
||||||
<tr class="border-b">
|
<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.question }}</td>
|
||||||
<td class="px-4 py-2">{{ faq.answer }}</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">
|
<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">
|
<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
|
<i class="fas fa-eye"></i> Voir
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-6 flex justify-between">
|
<div class="mt-6 flex justify-between">
|
||||||
<!-- Bouton Retour à la liste -->
|
<!-- Bouton Retour à la liste -->
|
||||||
<a href="{{ path('app_faq_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
|
<a href="{{ path('app_faq_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
|
||||||
|
@ -15,5 +15,11 @@
|
|||||||
{% if 'ROLE_EMPLOYEE' in app.user.roles %}
|
{% if 'ROLE_EMPLOYEE' in app.user.roles %}
|
||||||
{% include 'profile/employee.html.twig' %}
|
{% include 'profile/employee.html.twig' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if 'ROLE_ADMIN' in app.user.roles%}
|
||||||
|
<div>
|
||||||
|
<h1 class="text-9xl font-bold ml-kdn "> Vous etes admin</h1>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
Aucun pour le moment
|
Aucun pour le moment
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</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>
|
<h3 class="text-lg font-semibold mt-6">Vos compétences :</h3>
|
||||||
<ul class="list-disc list-inside text-gray-800">
|
<ul class="list-disc list-inside text-gray-800">
|
||||||
@ -31,6 +35,10 @@
|
|||||||
Aucune pour le moment
|
Aucune pour le moment
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</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">
|
<div class="flex justify-center mt-6">
|
||||||
<a class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full"
|
<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