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

Merge branch 'main' of git.unistra.fr:eric.wagner/sae401

parents bb8b382d 2c8cfcb1
Branches
No related merge requests found
......@@ -38,13 +38,11 @@
<section class="flex flex-col">
<h4 class="bg-[#326273] py-4 text-[#FFFFFF] rounded-r-lg my-8 w-96 pl-8 pr-4 text-3xl">Commentaires</h4>
{% if app.user %}
<div class="flex justify-center mb-[120px]">
<a href="{{ path('app_commentaire_new', {'id': app.user.id }) }}" class=" w-52 text-center text-dark rounded-2xl bg-[#EEEEEE] hover:bg-[#5C9EAD] hover:text-[#EEEEEE] transition-colors duration-500 p-3 font-semibold">Ajouter un Commentaire</a>
</div>
<div class="flex justify-center mb-[120px]">
<a href="{{ path('app_commentaire_new', {'id': app.user.id, 'salle': salle.id }) }}" class=" w-52 text-center text-dark rounded-2xl bg-[#EEEEEE] hover:bg-[#5C9EAD] hover:text-[#EEEEEE] transition-colors duration-500 p-3 font-semibold">Ajouter un Commentaire</a>
</div>
{% endif %}
{% 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>
......@@ -58,8 +56,6 @@
{{ commentaire.contenu }}
{% endfor %} #}
<a href="{{ path('app_salles_index') }}">back to list</a>
<a href="{{ path('app_salles_edit', {'id': salle.id}) }}">edit</a>
......@@ -68,33 +64,6 @@
</main>
<script src="{{ asset('js/salle.js') }}"></script>
<script src="{{ asset('js/slider.js') }}"></script>
<script>
const swiper = new Swiper('.swiper', {
autoplay: {
delay: 0,
disableOnInteraction: false,
reverseDirection: true,
},
loop: true,
spaceBetween: 10,
slidesPerView: 7,
speed: 1700,
allowTouchMove: false,
});
swiper.el.addEventListener("mouseenter", () => {
swiper.autoplay.stop();
swiper.allowTouchMove = true;
});
swiper.el.addEventListener("mouseleave", () => {
swiper.autoplay.start();
swiper.allowTouchMove = false;
});
swiper.on("click", () => {
console.log(swiper.clickedIndex);
});
</script>
{% endblock %}
\ No newline at end of file
{% endblock %}
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}
<div class="bg-[#326273] flex justify-between">
{{ form_start(form) }}
<div class="flex flex-col gap-6 mt-2 ml-72">
<div class="">
{{ form_label(form.nom, 'Nom de la ville :', {'label_attr': {'class': 'block text-[#EEEEEE] font-bold mb-2'}}) }}
{{ form_widget(form.nom, {'attr': {'class': 'form-input mt-1 block w-full rounded-3xl'}}) }}
</div>
<div class="mb-4">
{{ form_label(form.positionGPS, 'Position GPS de la salle:', {'label_attr': {'class': 'block text-[#EEEEEE] font-bold mb-2'}}) }}
{{ form_widget(form.positionGPS, {'attr': {'class': 'form-input mt-1 block w-full rounded-3xl p-2'}}) }}
</div>
<div class="mb-4">
{{ form_label(form.img, 'URL Image:', {'label_attr': {'class': 'block text-[#EEEEEE] font-bold mb-2'}}) }}
{{ form_widget(form.img, {'attr': {'class': 'form-input mt-1 block w-full rounded-3xl'}}) }}
</div>
<div class="mb-4">
{{ form_label(form.alt, 'Alt Text:', {'label_attr': {'class': 'block text-[#EEEEEE] font-bold mb-2'}}) }}
{{ form_widget(form.alt, {'attr': {'class': 'form-input mt-1 block w-full rounded-3xl'}}) }}
</div>
<div class="flex items-center justify-end mt-4">
<button class="bg-[#EEEEEE] hover:bg-[#5C9EAD] hover:text-[#EEEEEE] text-[#5C9EAD] font-bold py-2 px-4 rounded">
{{ button_label|default('Save') }}
</button>
</div>
</div>
{{ form_end(form) }}
</div>
<script defer src="{{ asset('js/form_update.js') }}"></script>
......@@ -7,5 +7,5 @@
{{ include('villes/_form.html.twig') }}
<a href="{{ path('app_villes_index') }}">back to list</a>
{# <a href="{{ path('app_villes_index') }}">back to list</a> #}
{% endblock %}
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