Files
PyRIGS/training/templates/trainee_list.html

44 lines
1.8 KiB
HTML

{% extends 'base_training.html' %}
{% load url_replace from filters %}
{% load orderby from filters %}
{% load paginator from filters %}
{% load linkornone from filters %}
{% load button from filters %}
{% block content %}
<div class="row">
<div class="col">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Name</th>
<th>Supervisor?</th>
<th>Qualification Count</th>
<th></th>
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr id="row_item">
<th scope="row" class="align-middle" id="cell_name">{{ object.name }} {% if request.user.pk == object.pk %}<span class="fas fa-user text-success"></span>{%endif%}</th>
<td {% if object.is_supervisor %}class="table-success"{%endif%}>{{ object.is_supervisor|yesno|title }}</td>
<td>{{ object.qualifications_obtained.all|length }}</td>
<td>
<a class="btn btn-info" href="{% url 'trainee_detail' pk=object.pk %}"><span class="fas fa-eye"></span> View Training Record</a>
<a href="{% url 'trainee_item_detail' pk=object.pk %}" class="btn btn-info"><span class="fas fa-info-circle"></span> View Detailed Record</a>
</td>
</tr>
{% empty %}
<tr class="table-warning">
<td colspan="6" class="text-center">Nothing found</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}