Files
e-cosplay/templates/artemis/esyweb/tuto.twig
Serreau Jovann ee8ba6b2df feat(artemis/esyweb): Ajoute la gestion des tutoriels ESY-WEB
Crée une page pour lister et gérer les tutoriels ESY-WEB dans Artemis.
Ajoute un formulaire pour créer de nouveaux tutoriels.
Gère l'upload de fichiers mp4 pour les tutoriels.
2025-09-30 13:26:57 +02:00

42 lines
2.3 KiB
Twig

{% extends 'artemis/base.twig' %}
{% block title %}Tutoriel(s){% endblock %}
{% block content %}
<div class="flex justify-between items-center mb-6">
<h2 class="text-3xl font-semibold text-gray-800 dark:text-gray-200">Liste des tutoriels</h2>
<div>
<a href="{{ path('artemis_esyweb_tuto_add') }}" class="px-4 py-2 bg-blue-600 text-white font-medium rounded-md shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900">
+ Crée un tutoriel
</a>
<a target="_blank" href="{{ path('app_tuto') }}" class="px-4 py-2 bg-blue-600 text-white font-medium rounded-md shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900">
Voir la page des tutoriels
</a>
</div>
</div>
<div class="mt-2 w-full mx-auto bg-gray-800 rounded-lg shadow-lg overflow-x-auto">
<table class="min-w-full divide-y divide-gray-700">
<thead class="bg-gray-700">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider">Titre</th>
<th scope="col" class="px-6 py-3 text-center text-xs font-medium uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-700">
{% for tuto in tutos %}
<tr class="hover:bg-gray-700 transition relative hover:bg-gray-700 transition">
<td class="px-6 py-4 text-center text-sm w-80">{{ tuto.title }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-center w-20">
<a href="{{ path('artemis_esyweb_tuto',{idView:tuto.id}) }}" target="_blank"
class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded mr-2">Voir</a>
<a data-turbo="false" is="confirm-modal" type="delete-esyweb-tuto"
href="{{ path('artemis_esyweb_tuto',{idDelete:tuto.id}) }}"
class="bg-red-600 hover:bg-red-700 text-white px-3 py-1 rounded">Supprimer</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}