{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h2>Eventos en los que participa o ha participado {{ usuario.get_full_name|default:usuario.nombre }}</h2>
|
|
|
|
{% if reservas %}
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Evento</th>
|
|
<th>Fecha</th>
|
|
|
|
{% if user.is_staff %}
|
|
<th>Acciones</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for reserva in reservas %}
|
|
<tr>
|
|
<td><a href="{% url 'eventos:detalle_evento' reserva.evento.id %}">{{ reserva.evento.nombre }}</a></td>
|
|
<td>{{ reserva.evento.fecha }}</td>
|
|
{% if user.is_staff %}
|
|
<td>
|
|
<form action="{% url 'eventos:cancelar_reserva_admin' reserva.id %}" method="post" style="display:inline;">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('¿Eliminar esta inscripción?')">
|
|
Eliminar
|
|
</button>
|
|
</form>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% else %}
|
|
<p>No está inscrito en ningún evento.</p>
|
|
{% endif %}
|
|
|
|
<a href="{% url 'eventos:estadisticas_por_usuario' %}">← Volver a estadísticas</a>
|
|
{% endblock %}
|
|
|