Skip to content

Commit

Permalink
Reportes de bono
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermodoghel committed Dec 11, 2024
1 parent 9871e8a commit 3b662a5
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions events/templates/admin/tickets_report.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_urls %}

{% block content %}
<div id="content-main">
<h1>Reporte de Usuarios por Evento</h1>

<form method="get" class="form-inline">
<div style="margin-bottom: 20px;">
<label for="event_id">Evento:</label>
<select name="event_id" id="event_id">
<option value="">Seleccionar evento</option>
{% for event in events %}
<option value="{{ event.id }}" {% if event.id|stringformat:"s" == selected_event %}selected{% endif %}>
{{ event.name }}
</option>
{% endfor %}
</select>

<input type="text" name="search" placeholder="Buscar..." value="{{ search_term }}">
<button type="submit" class="button">Buscar</button>

{% if selected_event %}
<a href="{% url 'admin:export_csv' %}?event_id={{ selected_event }}" class="button">Exportar a CSV</a>
{% endif %}
</div>
</form>

{% if results %}
<div class="results">
<table>
<thead>
<tr>
{% for column in columns %}
<th>{{ column }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in results %}
<tr>
{% for value in row %}
<td>{{ value }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>

<div class="paginator">
{% if has_prev %}
<a href="?event_id={{ selected_event }}&page={{ page|add:"-1" }}&search={{ search_term }}">&laquo; Anterior</a>
{% endif %}

<span class="current">
Página {{ page }} de {{ total_pages }}
</span>

{% if has_next %}
<a href="?event_id={{ selected_event }}&page={{ page|add:"1" }}&search={{ search_term }}">Siguiente &raquo;</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock %}

0 comments on commit 3b662a5

Please sign in to comment.