UI
This commit is contained in:
5
public/img/add.svg
Normal file
5
public/img/add.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path opacity="0.5" d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" fill="#1C274C"/>
|
||||
<path d="M12.75 9C12.75 8.58579 12.4142 8.25 12 8.25C11.5858 8.25 11.25 8.58579 11.25 9L11.25 11.25H9C8.58579 11.25 8.25 11.5858 8.25 12C8.25 12.4142 8.58579 12.75 9 12.75H11.25V15C11.25 15.4142 11.5858 15.75 12 15.75C12.4142 15.75 12.75 15.4142 12.75 15L12.75 12.75H15C15.4142 12.75 15.75 12.4142 15.75 12C15.75 11.5858 15.4142 11.25 15 11.25H12.75V9Z" fill="#1C274C"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 753 B |
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Repository\SiteRepository;
|
||||
use App\Repository\SortieRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@@ -11,12 +12,14 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt
|
||||
class MainController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'home')]
|
||||
public function index(TokenStorageInterface $tokenStorage, SortieRepository $sortieRepository): Response
|
||||
public function index(TokenStorageInterface $tokenStorage, SortieRepository $sortieRepository, SiteRepository $siteRepository): Response
|
||||
{
|
||||
$token = $tokenStorage->getToken();
|
||||
$userConnect = $token?->getUser();
|
||||
$sorties = $sortieRepository->findAll();
|
||||
$sites = $siteRepository->findAll();
|
||||
return $this->render('main/index.html.twig', [
|
||||
'sites' => $sites,
|
||||
'profile' => $userConnect,
|
||||
'sorties' => $sorties,
|
||||
]);
|
||||
|
||||
@@ -13,7 +13,74 @@
|
||||
<div class="container mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-6 text-center">Liste des sorties</h1>
|
||||
|
||||
<!-- Filtres -->
|
||||
<form method="GET" action="" class="mb-6 bg-white rounded-lg shadow-md p-4">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-6 gap-4">
|
||||
<!-- Filtre par site -->
|
||||
<div>
|
||||
<label for="site" class="block text-sm font-medium text-gray-700">Site</label>
|
||||
<select id="site" name="site" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm">
|
||||
<option value="">Tous</option>
|
||||
{% for site in sites %}
|
||||
<option value="{{ site.idSite }}">{{ site.nom }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Filtre par nom de sortie -->
|
||||
<div>
|
||||
<label for="nomSortie" class="block text-sm font-medium text-gray-700">Nom de la sortie</label>
|
||||
<input type="text" id="nomSortie" name="nomSortie" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm" placeholder="Rechercher...">
|
||||
</div>
|
||||
|
||||
<!-- Filtre par date de début -->
|
||||
<div>
|
||||
<label for="dateDebut" class="block text-sm font-medium text-gray-700">Date début</label>
|
||||
<input type="date" id="dateDebut" name="dateDebut" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm">
|
||||
</div>
|
||||
|
||||
<!-- Filtre par date de fin -->
|
||||
<div>
|
||||
<label for="dateFin" class="block text-sm font-medium text-gray-700">Date fin</label>
|
||||
<input type="date" id="dateFin" name="dateFin" class="mt-1 block w-full border-gray-300 rounded-md shadow-sm">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Cases à cocher -->
|
||||
<div class="mt-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
<div>
|
||||
<input type="checkbox" id="organisateur" name="organisateur" class="mr-2">
|
||||
<label for="organisateur" class="text-sm font-medium text-gray-700">Sorties où je suis organisateur</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="inscrit" name="inscrit" class="mr-2">
|
||||
<label for="inscrit" class="text-sm font-medium text-gray-700">Sorties où je suis inscrit</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="nonInscrit" name="nonInscrit" class="mr-2">
|
||||
<label for="nonInscrit" class="text-sm font-medium text-gray-700">Sorties où je ne suis pas inscrit</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="passe" name="passe" class="mr-2">
|
||||
<label for="passe" class="text-sm font-medium text-gray-700">Sorties passées</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bouton de soumission -->
|
||||
<div class="mt-4 flex justify-end">
|
||||
<button type="submit" class="px-4 py-2 bg-blue-500 text-white rounded-md shadow-sm hover:bg-blue-700">
|
||||
Rechercher
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-6 gap-6">
|
||||
<a href="/sortie/creates">
|
||||
<div class="bg-white rounded-lg shadow-md p-4 text-center">
|
||||
<img src="/img/add.svg" alt="Créer une sortie" class="w-40 h-40 mx-auto mb-4">
|
||||
<h2 class="text-lg font-semibold">Créer une sortie</h2>
|
||||
</div>
|
||||
</a>
|
||||
{% for sortie in sorties %}
|
||||
<div class="bg-white rounded-lg shadow-md p-4">
|
||||
<h2 class="text-lg font-semibold">{{ sortie.nom }}</h2>
|
||||
|
||||
Reference in New Issue
Block a user