templates/instructor/show.html.twig line 1
{% extends 'base.html.twig' %}{% block title %}Instructeur{% endblock %}{% block body %}<h1>Détails de l'Instructeur</h1><div class="card"><div class="card-body"><div class="row"><div class="col-md-4 text-center"><div style="position: relative; display: inline-block;">{% if instructor.photo %}<imgstyle="width:250px; height:250px; object-fit:cover; border-radius:50%; border:4px solid #3f4a59; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display:block;"class="mb-3"src="{{asset('image/'~ instructor.photo)}}"alt="Photo de {{ instructor.prenom }} {{ instructor.nom }}"onerror="this.style.display='none'; this.nextElementSibling.style.display='flex';">{% endif %}<div style="width:250px; height:250px; border-radius:50%; background:linear-gradient(135deg, #667eea 0%, #764ba2 100%); display:{% if instructor.photo %}none{% else %}flex{% endif %}; align-items:center; justify-content:center; margin:0 auto 1rem; border:4px solid #3f4a59; box-shadow: 0 4px 12px rgba(0,0,0,0.3);"><i class="fa fa-user fa-4x text-white"></i></div></div></div><div class="col-md-8"><table class="table"><tbody><tr><th>Nom</th><td>{{ instructor.nom }}</td></tr><tr><th>Prénom</th><td>{{ instructor.prenom }}</td></tr><tr><th>Email</th><td>{{ instructor.email ?? '-' }}</td></tr><tr><th>Biographie</th><td>{{ instructor.bio ?? '-' }}</td></tr><tr><th>Date de création</th><td>{{ instructor.createdAt ? instructor.createdAt|date('d/m/Y H:i') : '-' }}</td></tr><tr><th>Playlists</th><td>{% if instructor.playlists|length > 0 %}<ul>{% for playlist in instructor.playlists %}<li><a href="{{ path('app_playlist_show', {'id': playlist.id}) }}">{{ playlist.titre }}</a></li>{% endfor %}</ul>{% else %}<span class="text-muted">Aucune playlist assignée</span>{% endif %}</td></tr></tbody></table></div></div></div></div><div class="mt-4"><h3 class="mb-3">Playlists de {{ instructor.prenom }} {{ instructor.nom }}</h3>{% if instructor.playlists|length > 0 %}<div class="row">{% for playlist in instructor.playlists %}<div class="col-md-4 mb-3"><div class="card h-100">{% if playlist.imageDeCouverture %}<img class="card-img-top" src="{{ asset('image/' ~ playlist.imageDeCouverture) }}" alt="{{ playlist.titre }}" style="height: 180px; object-fit: cover;">{% else %}<div class="card-img-top d-flex align-items-center justify-content-center bg-light" style="height: 180px;"><span class="text-muted">Pas d'image</span></div>{% endif %}<div class="card-body d-flex flex-column"><h5 class="card-title">{{ playlist.titre }}</h5><p class="card-text text-muted" style="flex:1;">{{ playlist.description|u.truncate(120, '...') }}</p><a class="btn btn-primary btn-sm mt-auto" href="{{ path('app_playlist_show', {'id': playlist.id}) }}">Voir la formation</a></div></div></div>{% endfor %}</div>{% else %}<p class="text-muted">Aucune playlist associée pour le moment.</p>{% endif %}</div><div class="mt-3"><a class="btn btn-sm" href="{{ path('app_instructor_index') }}">Retour à la liste</a><a class="btn btn-sm" href="{{ path('app_instructor_edit', {'id': instructor.id}) }}">Modifier</a>{{ include('instructor/_delete_form.html.twig') }}</div>{% endblock %}