| {% extends "experimentpage.html" %} |
| |
| {% block content %} |
| |
| <h1>Registered Participants</h1> |
| |
| <form id="add_participant_form" method="get" action="{% url 'exp_portal:add_user' %}"> |
| {% csrf_token %} |
| <button class="btn btn-default btn-lg" type="submit">Add Participant</button> |
| </form> |
| |
| <div class="col-md-15"> |
| <table class="table table-hover"> |
| <thead> |
| <tr> |
| <th>Item</th> |
| <th>Email</th> |
| <th>Experiment</th> |
| <th>Progress</th> |
| <th>Last Login</th> |
| <th>Delete</th> |
| </tr> |
| </thead> |
| <tbody> |
| {% for userprofile in userprofiles %} |
| <tr> |
| <td>{{ forloop.counter }}</td> |
| <td> |
| <a href="{% url 'exp_portal:view_user_tasks' profile=userprofile.user_hash %}"> |
| {{ userprofile.user.email }} |
| </a> |
| </td> |
| <td>{{ userprofile.experiment }}</td> |
| <td> |
| <div class="progress"> |
| <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{ userprofile.progress }}%;"> |
| {{ userprofile.progress }}% |
| </div> |
| </div> |
| </td> |
| <td>{{ userprofile.user.last_login }}</td> |
| <td> |
| <form id="delete_participant_form" method="POST" |
| action="{% url 'exp_portal:delete_user' userprofilepk=userprofile.pk %}"> |
| {% csrf_token %} |
| <button class="btn btn-danger" type="submit">Delete</button> |
| </form> |
| </td> |
| </tr> |
| {% endfor %} |
| </tbody> |
| </table> |
| </div> |
| {% endblock %} |