Merge branch 'Johan'
This commit is contained in:
BIN
public/upload/image/profile/Stephen-Hawking-674494865bf40.png
Normal file
BIN
public/upload/image/profile/Stephen-Hawking-674494865bf40.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Repository\ParticipantRepository;
|
||||||
use App\Repository\SiteRepository;
|
use App\Repository\SiteRepository;
|
||||||
use App\Repository\SortieRepository;
|
use App\Repository\SortieRepository;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
@@ -40,11 +41,20 @@ class MainController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[Route('/inscription', name: 'inscription')]
|
#[Route('/inscription', name: 'inscription')]
|
||||||
public function inscription(TokenStorageInterface $tokenStorage): Response
|
public function inscription(TokenStorageInterface $tokenStorage): Response
|
||||||
{
|
{
|
||||||
return $this->render('main/inscription.html.twig');
|
return $this->render('main/inscription.html.twig');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/participants', name: 'participants')]
|
||||||
|
public function participants(TokenStorageInterface $tokenStorage, ParticipantRepository $participantRepository): Response
|
||||||
|
{
|
||||||
|
$token = $tokenStorage->getToken();
|
||||||
|
$userConnect = $token?->getUser();
|
||||||
|
return $this->render('main/participants.html.twig', [
|
||||||
|
'profile' => $userConnect,
|
||||||
|
'participants' => $participantRepository->findAll(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<ul id="navbar" class="hidden absolute top-20 right-0 w-max bg-white shadow-md p-4 pl-2 flex-col space-y-4">
|
<ul id="navbar" class="hidden absolute top-20 right-0 w-max bg-white shadow-md p-4 pl-2 flex-col space-y-4">
|
||||||
<li><a href="{{ path('home') }}" class="text-gray-700 font-bold hover:text-blue-500">Accueil</a></li>
|
<li><a href="{{ path('home') }}" class="text-gray-700 font-bold hover:text-blue-500">Accueil</a></li>
|
||||||
|
<li><a href="{{ path('participants') }}" class="text-gray-700 font-bold hover:text-blue-500">Participants</a></li>
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<li><a href="{{ path('profile_view', {'uuid': app.user.idParticipant}) }}" class="text-gray-700 font-bold hover:text-blue-500">Mon profile</a></li>
|
<li><a href="{{ path('profile_view', {'uuid': app.user.idParticipant}) }}" class="text-gray-700 font-bold hover:text-blue-500">Mon profile</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
45
templates/main/participants.html.twig
Normal file
45
templates/main/participants.html.twig
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{% extends 'main/base.html.twig' %}
|
||||||
|
{% block head %}
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Liste des participants</title>
|
||||||
|
{% block stylesheets %}
|
||||||
|
{{ encore_entry_link_tags('app') }}
|
||||||
|
{% endblock %}
|
||||||
|
</head>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container mx-auto p-6 bg-gray-50 rounded-lg shadow-lg mt-6">
|
||||||
|
<h1 class="text-3xl font-bold text-center text-gray-800 mb-8">Liste des participants inscrit sur le site</h1>
|
||||||
|
|
||||||
|
<div class="overflow-x-auto bg-white rounded shadow">
|
||||||
|
<table class="min-w-full bg-white divide-y divide-gray-200">
|
||||||
|
<thead class="bg-gray-50">
|
||||||
|
<tr>
|
||||||
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">PP</th>
|
||||||
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Pseudo</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200">
|
||||||
|
{% for participant in participants %}
|
||||||
|
<tr>
|
||||||
|
<div class="relative">
|
||||||
|
<img src="{{ participant.fileName ? asset('upload/image/profile/' ~ participant.fileName) : asset('upload/image/profile/default.png') }}"
|
||||||
|
class="w-16 h-16 rounded-full mr-4" />
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.pseudo }}</td>
|
||||||
|
</tr>
|
||||||
|
{% else %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="8" class="px-6 py-4 text-center text-gray-500">Aucun participant</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<li><strong>🏢 Nom :</strong> {{ sortie.lieu.nom }}</li>
|
<li><strong>🏢 Nom :</strong> {{ sortie.lieu.nom }}</li>
|
||||||
<li><strong>📍 Rue :</strong> {{ sortie.lieu.rue }}</li>
|
<li><strong>📍 Rue :</strong> {{ sortie.lieu.rue }}</li>
|
||||||
<li><strong>🏙️ Ville :</strong> {{ sortie.lieu.ville }}</li>
|
<li><strong>🏙️ Ville :</strong> {{ sortie.lieu.ville }}</li>
|
||||||
<li><strong>✉️ Code postal :</strong> {{ sortie.lieu.ville }}</li>
|
<li><strong>✉️ Code postal :</strong> {{ sortie.lieu.codePostal }}</li>
|
||||||
<li><strong>🌍 Latitude :</strong> {{ sortie.lieu.latitude }}</li>
|
<li><strong>🌍 Latitude :</strong> {{ sortie.lieu.latitude }}</li>
|
||||||
<li><strong>🌍 Longitude :</strong> {{ sortie.lieu.longitude }}</li>
|
<li><strong>🌍 Longitude :</strong> {{ sortie.lieu.longitude }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user