112 lines
6.8 KiB
Twig
112 lines
6.8 KiB
Twig
{% extends 'main/base.html.twig' %}
|
|
|
|
{% block content %}
|
|
<div class="relative mx-auto md:max-w-xl pt-24 pb-8 min-w-0 break-words">
|
|
<div class="flex flex-wrap justify-center mb-16">
|
|
<div class="w-full flex justify-center">
|
|
<div class="relative">
|
|
<img src="{{ profile.fileName ? asset('upload/image/profile/' ~ profile.fileName) : asset('upload/image/profile/default.png') }}" class="shadow-xl rounded-full align-middle border-none absolute -m-16 -ml-20 lg:-ml-16 max-w-[150px]"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="px-2 bg-white shadow-lg rounded-lg py-2">
|
|
<div class="text-center mt-2">
|
|
<h3 class="text-2xl text-slate-700 font-bold leading-normal mb-1">{{ profile.prenom }} {{ profile.nom }}</h3>
|
|
<div class="text-sm mt-0 mb-2 text-slate-400 font-bold uppercase">
|
|
<i class="fas fa-map-marker-alt mr-2 text-slate-400 opacity-75"></i>{{ profile.pseudo }}
|
|
</div>
|
|
{% if isActiveUser %}
|
|
<div class="text-xs mt-0 mb-2 text-slate-400 font-bold uppercase">
|
|
<i class="fas fa-map-marker-alt mr-2 text-slate-400 opacity-75"></i>{{ profile.telephone }} - {{ profile.email }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if isActiveUser %}
|
|
<div class="mt-6 py-6 border-t border-slate-200 text-center">
|
|
<div class="flex flex-wrap justify-center">
|
|
<div class="w-full px-4">
|
|
<a href="{{ path('profile_edit', {'uuid': app.user.idParticipant}) }}" class="text-slate-700 hover:text-slate-400">
|
|
<button class="bg-green-500 px-4 py-2 rounded hover:bg-green-700">
|
|
Modifier
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex flex-col lg:flex-row mx-8 gap-6">
|
|
{# Tableau des sorties dont je suis participant #}
|
|
<div class="w-full lg:w-1/2 p-4 shadow-lg rounded-lg overflow-x-auto">
|
|
<h4 class="text-start bg-gray-50 items-start justify-start text-base p-2 font-bold uppercase">Mes participations</h4>
|
|
<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">Nom</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Adresse</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date début</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Durée</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200">
|
|
{% for sortie in sortiesParticipation %}
|
|
<tr>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.nom }}</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
|
{{ sortie.lieu ? (sortie.lieu.ville ?: '') ~ ' ' ~ (sortie.lieu.codePostal ?: '') ~ ', ' ~ (sortie.lieu.rue ?: '') : '' }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.dateHeureDebut|date('d/m/Y H:i') }}</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.duree }}</td>
|
|
<td class="flex flex-row px-6 py-4 whitespace-nowrap text-base text-gray-900">
|
|
<a href="{{ path('sortie_view', { id: sortie.idSortie }) }}" class="text-green-500">👁️</a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="8" class="px-6 py-4 text-center text-gray-500">Vous ne participez à aucune sortie</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{# Tableau des sorties dont je suis organisateur #}
|
|
<div class="w-full lg:w-1/2 p-4 shadow-lg rounded-lg overflow-x-auto">
|
|
<h4 class="text-start bg-gray-50 items-start justify-start text-base p-2 font-bold uppercase">Mes organisations</h4>
|
|
<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">Nom</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Adresse</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date début</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Durée</th>
|
|
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200">
|
|
{% for sortie in sortiesOrganisation %}
|
|
<tr>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.nom }}</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
|
{{ sortie.lieu ? (sortie.lieu.ville ?: '') ~ ' ' ~ (sortie.lieu.codePostal ?: '') ~ ', ' ~ (sortie.lieu.rue ?: '') : '' }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.dateHeureDebut|date('d/m/Y H:i') }}</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.duree }}</td>
|
|
<td class="flex flex-row px-6 py-4 whitespace-nowrap text-base text-gray-900">
|
|
<a href="{{ path('sortie_view', { id: sortie.idSortie }) }}" class="text-green-500">👁️</a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="8" class="px-6 py-4 text-center text-gray-500">Vous n'organisez aucune sortie</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|