Various fixes

This commit is contained in:
2022-01-02 19:15:44 +00:00
parent 2767777d0e
commit c6157d3e2b
5 changed files with 26 additions and 14 deletions

View File

@@ -16,7 +16,7 @@
{% if item.active %}
<li class="list-group-item">{{ item }}</li>
{% elif request.user.is_superuser %}
<li class="list-group-item text-warning">{{ item }} (inactive)</li>
<li class="list-group-item text-warning">{{ item }}</li>
{% endif %}
{% endfor %}
</div>

View File

@@ -35,9 +35,9 @@
{% for object in object_list %}
<tr id="row_item">
<th scope="row" class="align-middle" id="cell_name"><a href="{% url 'trainee_detail' object.pk %}">{{ object.name }} {% if request.user.pk == object.pk %}<span class="fas fa-user text-success"></span>{%endif%}</a></th>
<td {% if object.is_driver %}class="table-success"{%endif%}>{{ object.is_driver|yesno|title }}</td>
<td>{{ object.is_driver|yesno|title }}</td>
<td>{% for level in object|get_levels_of_depth:1 %}{% if forloop.first %}Yes {%endif%}{{ level.get_icon }}{%empty%}No{%endfor%}</td>
<td {% if object.is_supervisor %}class="table-success"{%endif%}>{% for level in object|get_levels_of_depth:2 %}{% if forloop.first %}Yes {%endif%}{{ level.get_icon }}{%empty%}No{%endfor%}</td>
<td>{% for level in object|get_levels_of_depth:2 %}{% if forloop.first %}Yes {%endif%}{{ level.get_icon }}{%empty%}No{%endfor%}</td>
<td>{{ object.num_qualifications }} {% if forloop.first %} <span class="fas fa-crown text-warning"></span>{% endif %}</td>
<td style="white-space: nowrap">
<a class="btn btn-info" href="{% url 'trainee_detail' pk=object.pk %}"><span class="fas fa-eye"></span> View Training Record</a>