Skip to content
Snippets Groups Projects
Commit 937b8e50 authored by WAGNER ERIC's avatar WAGNER ERIC
Browse files

Ajout des modifications

parent 992fbe97
Branches home_nico
No related merge requests found
......@@ -17,6 +17,13 @@ function initMap() {
],
travelMode: google.maps.TravelMode.DRIVING
};
const point_A = document.getElementById('point_A');
const point_B = document.getElementById('point_B');
const point_C = document.getElementById('point_C');
point_A.innerText = "Point A : " + parcour_salle_json[0].nom;
point_B.innerText = "Point B : " + parcour_salle_json[1].nom;
point_C.innerText = "Point C : " + parcour_salle_json[2].nom;
});
......
......@@ -59,7 +59,7 @@ class CommentaireController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$commentaireRepository->save($commentaire, true);
return $this->redirectToRoute('app_commentaire_index', [], Response::HTTP_SEE_OTHER);
return $this->redirectToRoute('home', [], Response::HTTP_SEE_OTHER);
}
return $this->renderForm('commentaire/edit.html.twig', [
......@@ -75,6 +75,6 @@ class CommentaireController extends AbstractController
$commentaireRepository->remove($commentaire, true);
}
return $this->redirectToRoute('app_commentaire_index', [], Response::HTTP_SEE_OTHER);
return $this->redirectToRoute('home', [], Response::HTTP_SEE_OTHER);
}
}
......@@ -7,7 +7,15 @@
<main class="bg-[#FFFF]">
<h3 class="flex justify-center my-7 text-4xl">{{salle.nom}}</h3>
<section class="flex flex-col md:flex-row justify-center md:gap-6 gap-6 m-2">
<img class="h-48 mr-4 md:mr-0 md:mb-4" src="{{ salle.img }}" alt="{{ salle.alt }}">
<div>
<img class="mr-4 sm:mr-8 lg:h-48 sm:h-64" src="{{ salle.img }}" alt="{{ salle.alt }}">
<h4>Légende :</h4>
<ul>
<li><p id="point_A">Point A :</p></li>
<li><p id="point_B">Point B :</p></li>
<li><p id="point_C">Point C :</p></li>
</ul>
</div>
<div class="w-full md:w-1/2 h-[400px] rounded-3xl border-8 border-[#5C9EAD] flex items-center justify-center" id="carte">Carte</div>
<p class="hidden position">{{ salle.positionGPS }}</p>
<p class="hidden parcours">{{ salle.parcours }}</p>
......@@ -40,9 +48,17 @@
<h4 class="bg-[#326273] text-right py-4 text-[#FFFFFF] rounded-r-lg my-8 w-96 pl-8 pr-4 text-3xl">Commentaires</h4>
{% for commentaires in salle.commentaires %}
<article class="self-center flex flex-col text-center rounded-lg w-96 bg-[#EEEEEE] p-2 my-3">
<p class=" border-solid border-b border-[#326273] w-full pb-2">{{ commentaires.user.username }}</p>
<p>{{commentaires.contenu}}</p>
<article class="self-center flex flex-col text-center items-end rounded-lg w-96 bg-[#EEEEEE] p-2 my-3">
<div class="flex flex-row justify-between border-solid border-b border-[#326273] w-full pb-2">
<span></span>
<p class="">{{ commentaires.user.username }}</p>
<form method="post" action="{{ path('app_commentaire_delete', {'id': commentaires.id}) }}" onsubmit="return confirm('Êtes-vous sûr de vouloir supprimer ce Commentaire ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ commentaires.id) }}">
<button class="btn w-fit text-[#AA0000] "><i class="bi bi-trash-fill text-sm"></i></button>
</form>
{# <a href="{{ path('app_commentaire_delete', {'id': commentaires.id}) }}" class="></a> #}
</div>
<p class="w-full">{{commentaires.contenu}}</p>
</article>
{% endfor %}
{% if app.user %}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment