Skip to content

Commit 0907e17

Browse files
author
prestonmhorne
authored
Collapsible Volunteer Card
1 parent fe26237 commit 0907e17

File tree

1 file changed

+42
-38
lines changed

1 file changed

+42
-38
lines changed

src/contestadmin/templates/contestadmin/dashboard.html

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -206,46 +206,50 @@ <h1 class="text-center">Contest Dashboard</h1>
206206
<!-- Discord Control deck end -->
207207

208208
<!-- Volunteer Summary card -->
209-
<div class="card mt-4 mb-3 border-secondary">
210-
<div class="card-header font-weight-bold bg-secondary text-white">
211-
<i class="fa-solid fa-handshake-simple fa-fw"></i> Volunteers
212-
</div>
213-
<div class="card-body overflow-auto">
214-
<div class="row justify-content-center">
215-
<div class="col-12">
216-
<div class="table-responsive">
217-
<table class="table table-sm">
218-
<thead class="thead-light">
219-
<tr>
220-
<th scope="col">Role</th>
221-
<th scope="col">Name</th>
222-
<th scope="col" class="text-center">Checked-in</th>
223-
<th scope="col" class="text-center">Added Courses</th>
224-
225-
</tr>
226-
</thead>
227-
<tbody>
228-
{% for volunteer in volunteers %}
229-
<tr>
230-
<td>{{ volunteer.get_role }}</td>
231-
232-
<td>{{ volunteer.user.get_full_name }}</td>
209+
<div id="accordionVolunteer">
210+
<div class="card mt-4 mb-3 border-secondary">
211+
<div class="card-header font-weight-bold bg-secondary text-white" data-toggle="collapse" data-target="#collapseVolunteer" aria-expanded="true" aria-controls="collapseVolunteer" style="cursor: pointer;">
212+
<i class="fa-solid fa-handshake-simple fa-fw"></i> Volunteers
213+
</div>
214+
<div id="collapseVolunteer" class="collapse show" data-parent="#accordionVolunteer">
215+
<div class="card-body overflow-auto">
216+
<div class="row justify-content-center">
217+
<div class="col-12">
218+
<div class="table-responsive">
219+
<table class="table table-sm">
220+
<thead class="thead-light">
221+
<tr>
222+
<th scope="col">Role</th>
223+
<th scope="col">Name</th>
224+
<th scope="col" class="text-center">Checked-in</th>
225+
<th scope="col" class="text-center">Added Courses</th>
226+
227+
</tr>
228+
</thead>
229+
<tbody>
230+
{% for volunteer in volunteers %}
231+
<tr>
232+
<td>{{ volunteer.get_role }}</td>
233+
234+
<td>{{ volunteer.user.get_full_name }}</td>
233235

234-
{% if volunteer.checked_in %}
235-
<td class="text-center">Yes</td>
236-
{% else %}
237-
<td class="text-center">No</td>
238-
{% endif %}
236+
{% if volunteer.checked_in %}
237+
<td class="text-center">Yes</td>
238+
{% else %}
239+
<td class="text-center">No</td>
240+
{% endif %}
239241

240-
{% if volunteer.has_courses %}
241-
<td class="text-center">Yes</td>
242-
{% else %}
243-
<td class="text-center">No</td>
244-
{% endif %}
245-
</tr>
246-
{% endfor %}
247-
</tbody>
248-
</table>
242+
{% if volunteer.has_courses %}
243+
<td class="text-center">Yes</td>
244+
{% else %}
245+
<td class="text-center">No</td>
246+
{% endif %}
247+
</tr>
248+
{% endfor %}
249+
</tbody>
250+
</table>
251+
</div>
252+
</div>
249253
</div>
250254
</div>
251255
</div>

0 commit comments

Comments
 (0)