Skip to content

Commit

Permalink
ADD tabs to switch between active/inactive participants
Browse files Browse the repository at this point in the history
  • Loading branch information
superryeti committed Mar 8, 2023
1 parent 4302f21 commit 7500f33
Showing 1 changed file with 41 additions and 30 deletions.
71 changes: 41 additions & 30 deletions physionet-django/events/templates/events/event_entries.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Username</th>
<th>Full name</th>
<th>Email</th>
<th>Credentialed</th>
<th>Cohost</th>
</tr>
</thead>
<tbody>
{% for participant in event.participants.all %}
<tr>
<td>{{ participant.user.username }}</td>
<td>{{ participant.user.get_full_name }}</td>
<td>{{ participant.user.email }}</td>
<td>{{ participant.user.is_credentialed }}</td>
<td>
{% if participant.is_cohost %}
<input type="checkbox" name="toggle-cohost-status" event-slug="{{ event.slug }}" value="{{ participant.id }}" disabled checked>
{% else %}
<input type="checkbox" name="toggle-cohost-status" event-slug="{{ event.slug }}" value="{{ participant.id }}" disabled>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="active-participant-tab" data-toggle="tab" data-target="#active-participant" type="button" role="tab" aria-controls="active-participant" aria-selected="true">Active Participant</button>
<button class="nav-link" id="inactive-participant-tab" data-toggle="tab" data-target="#inactive-participant" type="button" role="tab" aria-controls="inactive-participant" aria-selected="false">InActive Participant</button>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="active-participant" role="tabpanel" aria-labelledby="active-participant-tab">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Username</th>
<th>Full name</th>
<th>Email</th>
<th>Credentialed</th>
<th>Cohost</th>
</tr>
</thead>
<tbody>
{% for participant in event.participants.all %}
<tr>
<td>{{ participant.user.username }}</td>
<td>{{ participant.user.get_full_name }}</td>
<td>{{ participant.user.email }}</td>
<td>{{ participant.user.is_credentialed }}</td>
<td>
{% if participant.is_cohost %}
<input type="checkbox" name="toggle-cohost-status" event-slug="{{ event.slug }}" value="{{ participant.id }}" disabled checked>
{% else %}
<input type="checkbox" name="toggle-cohost-status" event-slug="{{ event.slug }}" value="{{ participant.id }}" disabled>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="inactive-participant" role="tabpanel" aria-labelledby="inactive-participant-tab"></div>
</div>

0 comments on commit 7500f33

Please sign in to comment.