interfesse

This commit is contained in:
bourgoino 2024-12-05 15:55:33 +01:00
parent 9e49da7775
commit ae335524db
8 changed files with 160 additions and 106 deletions

7
public/js/map.js Normal file
View File

@ -0,0 +1,7 @@
<script src="{{ asset('js/map.js') }}"></script>
// initialize the map on the "map" div with a given center and zoom
var map = L.map('map', {
center: [51.505, -0.09],
zoom: 13
});

View File

@ -13,7 +13,6 @@ class UserAppType extends AbstractType
{
$builder
->add('nickname')
->add('roles')
->add('password')
->add('firstName')
->add('lastName')

View File

@ -17,7 +17,6 @@
</div>
</div>
<!-- Bouton de soumission -->
<div class="mt-6">
<button type="submit" class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full w-full">
Mettre à jour
@ -27,13 +26,11 @@
<div class="mt-6 flex justify-between">
<!-- Retour à la liste -->
<a href="{{ path('app_degree_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
<i class="fas fa-arrow-left"></i> Retour à la liste des diplômes
</a>
<!-- Option de suppression du diplôme -->
{{ include('degree/_delete_form.html.twig') }}
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -22,18 +22,21 @@
</div>
<div class="mt-6 flex justify-between">
<!-- Retour à la liste -->
<a href="{{ path('app_degree_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
<a href="{{ path('app_degree_index') }}"
class="text-teal-500 hover:text-teal-700 text-lg">
<i class="fas fa-arrow-left"></i> Retour à la liste des diplômes
</a>
<!-- Modifier le diplôme -->
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}" class="text-yellow-500 hover:text-yellow-700 text-lg">
<i class="fas fa-edit"></i> Modifier ce diplôme
</a>
<div class="flex items-center space-x-4">
<a href="{{ path('app_degree_edit', {'id': degree.id}) }}"
class="text-yellow-500 hover:text-yellow-700 text-lg">
<i class="fas fa-edit"></i> Modifier ce diplôme
</a>
<a href="{{ path('app_degree_delete', {'id': degree.id}) }}"
class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg">
<i class="fas fa-trash-alt"></i> Supprimer
</a>
</div>
</div>
<!-- Option de suppression du diplôme -->
{{ include('degree/_delete_form.html.twig') }}
</div>
{% endblock %}

View File

@ -2,3 +2,4 @@
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ user_app.id) }}">
<button class="btn">Delete</button>
</form>
a

View File

@ -1,13 +1,49 @@
{% extends 'base.html.twig' %}
{% block title %}Edit UserApp{% endblock %}
{% block title %}Modifier l'utilisateur{% endblock %}
{% block body %}
<h1>Edit UserApp</h1>
<div class="container mx-auto p-6">
<h1 class="text-4xl font-semibold text-gray-800 mb-6">Modifier l'utilisateur</h1>
{{ include('user_app/_form.html.twig', {'button_label': 'Update'}) }}
<div class="bg-white shadow-md rounded-lg p-6">
{{ form_start(form) }}
<a href="{{ path('app_user_app_index') }}">back to list</a>
<div class="space-y-6">
{{ form_row(form.nickname, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
{{ form_row(form.firstName, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
{{ form_row(form.lastName, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
{{ form_row(form.tel, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
{{ form_row(form.address, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
{{ form_row(form.mail, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
{{ form_row(form.password, {'attr': {'class': 'w-full p-3 border rounded-md'}}) }}
</div>
{{ include('user_app/_delete_form.html.twig') }}
<div class="mt-6">
{{ form_widget(form) }}
</div>
<button type="submit" class="bg-teal-500 hover:bg-teal-600 text-white px-6 py-3 rounded-lg mt-4">
Mettre à jour
</button>
{{ form_end(form) }}
</div>
<div class="mt-6 flex justify-between items-center">
<a href="{{ path('app_user_app_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
<i class="fas fa-arrow-left"></i> Retour à la liste des utilisateurs
</a>
<div class="flex items-center space-x-4">
<a href="{{ path('app_user_app_show', {'id': user_app.id}) }}" class="bg-yellow-500 hover:bg-yellow-600 text-white px-4 py-2 rounded-lg">
Voir l'utilisateur
</a>
<a href="{{ path('app_user_app_delete', {'id': user_app.id}) }}" class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg">
Supprimer
</a>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,49 +1,56 @@
{% extends 'base.html.twig' %}
{% block title %}UserApp index{% endblock %}
{% block title %}Liste des utilisateurs{% endblock %}
{% block body %}
<h1>UserApp index</h1>
<div class="container mx-auto p-6">
<h1 class="text-3xl font-bold mb-4">Liste des Utilisateurs</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Nickname</th>
<th>Roles</th>
<th>Password</th>
<th>FirstName</th>
<th>LastName</th>
<th>Tel</th>
<th>Address</th>
<th>Mail</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for user_app in user_apps %}
<tr>
<td>{{ user_app.id }}</td>
<td>{{ user_app.nickname }}</td>
<td>{{ user_app.roles ? user_app.roles|json_encode : '' }}</td>
<td>{{ user_app.password }}</td>
<td>{{ user_app.firstName }}</td>
<td>{{ user_app.lastName }}</td>
<td>{{ user_app.tel }}</td>
<td>{{ user_app.address }}</td>
<td>{{ user_app.mail }}</td>
<td>
<a href="{{ path('app_user_app_show', {'id': user_app.id}) }}">show</a>
<a href="{{ path('app_user_app_edit', {'id': user_app.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="10">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="overflow-x-auto bg-white shadow-lg rounded-lg">
<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">Nickname</th>
<th class="px-4 py-2 text-left">FirstName</th>
<th class="px-4 py-2 text-left">LastName</th>
<th class="px-4 py-2 text-left">Mail</th>
<th class="px-4 py-2 text-left">Actions</th>
</tr>
</thead>
<tbody>
{% for user_app in user_apps %}
<tr class="border-b">
<td class="px-4 py-2">{{ user_app.id }}</td>
<td class="px-4 py-2">{{ user_app.nickname }}</td>
<td class="px-4 py-2">{{ user_app.firstName }}</td>
<td class="px-4 py-2">{{ user_app.lastName }}</td>
<td class="px-4 py-2">{{ user_app.mail }}</td>
<td class="px-4 py-2">
<a href="{{ path('app_user_app_show', {'id': user_app.id}) }}" class="text-teal-500 hover:text-teal-700 mr-3">
<i class="fas fa-eye"></i> Voir
</a>
<a href="{{ path('app_user_app_new') }}">Create new</a>
<a href="{{ path('app_user_app_edit', {'id': user_app.id}) }}" class="text-yellow-500 hover:text-yellow-700 mr-3">
<i class="fas fa-edit"></i> Modifier
</a>
<form method="post" action="{{ path('app_user_app_delete', {'id': user_app.id}) }}" style="display:inline;">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ user_app.id) }}">
<button type="submit" class="text-red-500 hover:text-red-700">
<i class="fas fa-trash-alt"></i> Supprimer
</button>
</form>
</td>
</tr>
{% else %}
<tr>
<td colspan="6" class="text-center py-4">Aucun utilisateur trouvé</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View File

@ -1,54 +1,58 @@
{% extends 'base.html.twig' %}
{% block title %}UserApp{% endblock %}
{% block title %}Détail de l'utilisateur{% endblock %}
{% block body %}
<h1>UserApp</h1>
<div class="container mx-auto p-6">
<h1 class="text-4xl font-semibold text-gray-800 mb-6">Détail de l'utilisateur</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ user_app.id }}</td>
</tr>
<tr>
<th>Nickname</th>
<td>{{ user_app.nickname }}</td>
</tr>
<tr>
<th>Roles</th>
<td>{{ user_app.roles ? user_app.roles|json_encode : '' }}</td>
</tr>
<tr>
<th>Password</th>
<td>{{ user_app.password }}</td>
</tr>
<tr>
<th>FirstName</th>
<td>{{ user_app.firstName }}</td>
</tr>
<tr>
<th>LastName</th>
<td>{{ user_app.lastName }}</td>
</tr>
<tr>
<th>Tel</th>
<td>{{ user_app.tel }}</td>
</tr>
<tr>
<th>Address</th>
<td>{{ user_app.address }}</td>
</tr>
<tr>
<th>Mail</th>
<td>{{ user_app.mail }}</td>
</tr>
</tbody>
</table>
<div class="bg-white shadow-md rounded-lg p-6">
<table class="min-w-full">
<tbody>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">ID</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ user_app.id }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">Nom</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ user_app.lastName }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">Prénom</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ user_app.firstName }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">Téléphone</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ user_app.tel }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">Adresse</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ user_app.address }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">E-mail</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ user_app.mail }}</td>
</tr>
</tbody>
</table>
</div>
<a href="{{ path('app_user_app_index') }}">back to list</a>
<div class="mt-6 flex justify-between">
<a href="{{ path('app_user_app_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
<i class="fas fa-arrow-left"></i> Retour à la liste des utilisateurs
</a>
<a href="{{ path('app_user_app_edit', {'id': user_app.id}) }}">edit</a>
<div class="flex items-center space-x-4">
<a href="{{ path('app_user_app_edit', {'id': user_app.id}) }}"
class="text-yellow-500 hover:text-yellow-700 text-lg">
<i class="fas fa-edit"></i> Modifier cet utilisateur
</a>
{{ include('user_app/_delete_form.html.twig') }}
<a href="{{ path('app_user_app_delete', {'id': user_app.id}) }}"
class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg">
<i class="fas fa-trash-alt"></i> Supprimer
</a>
</div>
</div>
</div>
{% endblock %}