set V1
This commit is contained in:
@@ -44,7 +44,7 @@ class AdminController extends AbstractController
|
||||
$userConnect = $token?->getUser();
|
||||
return $this->render('admin/user.html.twig', [
|
||||
'profile' => $userConnect,
|
||||
'participants' => $participantRepository->findAll(),
|
||||
'participants' => $participantRepository->getAll(),
|
||||
'controller_name' => 'AdminController',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Repository;
|
||||
|
||||
use App\Entity\Participant;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\Tools\Pagination\Paginator;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
|
||||
@@ -33,6 +34,16 @@ class ParticipantRepository extends ServiceEntityRepository
|
||||
return $newProfile;
|
||||
}
|
||||
|
||||
public function getAll(): Paginator
|
||||
{
|
||||
$qb = $this->createQueryBuilder('p')
|
||||
->addSelect('s')
|
||||
->leftJoin('p.site', 's')
|
||||
->getQuery();
|
||||
return new Paginator($qb);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * @return Participant[] Returns an array of Participant objects
|
||||
// */
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nom</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Prénom</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Pseudo</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Site</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Téléphone</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Administrateur</th>
|
||||
@@ -64,6 +65,7 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.nom }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.prenom }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.pseudo }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.site.nom }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.telephone }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ participant.email }}</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<strong>Inscriptions max :</strong> {{ sortie.nbInscriptionsMax }}<br>
|
||||
<strong>Infos :</strong> {{ sortie.infosSortie }}
|
||||
</p>
|
||||
<a href="{{ path('sortie_show', { id: sortie.idSortie }) }}" class="btn btn-primary btn-sm">Voir plus</a>
|
||||
<a href="#" class="btn btn-primary btn-sm">Voir plus</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user