{% extends "base.html" %}
{% block content %}
<div class="section-title"><span class="eyebrow">PRE-KALOTSAVAM</span><h2>Participant Items</h2></div>
{% if user.is_superuser %}<form class="toolbar"><select name="school" onchange="this.form.submit()"><option value="">All Schools</option>{% for s in schools %}<option value="{{s.id}}" {% if selected_school and selected_school.id == s.id %}selected{% endif %}>{{s.code}} - {{s.name}}</option>{% endfor %}</select></form>{% endif %}
<table><tr><th>Chest</th><th>Admission</th><th>Participant</th><th>Section</th><th>Item 1</th><th>Item 2</th><th>Item 3</th><th>Item 4</th><th>Item 5</th><th>Action</th></tr>
{% for p in participants %}<tr><td>{{p.chest_no|default:"-"}}</td><td>{{p.admission_no}}</td><td>{{p.name}}</td><td>{{p.section}}</td>{% for l in p.item_links.all|slice:":5" %}<td>{{l.item.name}}</td>{% empty %}<td colspan="5">No items assigned</td>{% endfor %}<td><a href="{% url 'participant_item_edit' p.id %}">Edit</a></td></tr>{% endfor %}
</table>
<a class="btn secondary" href="{% url 'participants_pdf' %}">Print PDF</a>
{% endblock %}
