Some reversion fiddling

This commit is contained in:
2021-12-31 18:23:38 +00:00
parent f0b3a6daf3
commit 0727a23236
7 changed files with 42 additions and 42 deletions

View File

@@ -14,7 +14,7 @@
My Record
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMy">
<a class="dropdown-item" href="{% url 'trainee_detail' %}"><span class="fas fa-eye"></span>
<a class="dropdown-item" href="{% url 'trainee_detail' request.user.pk %}"><span class="fas fa-eye"></span>
Overview</a>
<a class="dropdown-item" href="{% url 'trainee_item_detail' request.user.pk %}"><span class="fas fa-list"></span>
Item Detail</a>

View File

@@ -34,7 +34,7 @@
}
}
});
});
});
});
</script>
{% endblock %}
@@ -43,7 +43,8 @@
<div class="row">
<div class="col-sm-12 text-right">
{% include 'partials/add_qualification.html' %}
<a href="{% url 'trainee_item_detail' object.pk %}" class="btn btn-info"><span class="fas fa-info-circle"></span> View Detailed Record</a><br/>
<a href="{% url 'trainee_item_detail' object.pk %}" class="btn btn-info"><span class="fas fa-info-circle"></span> View Detailed Record</a>
<a href="{% url 'profile_detail' object.pk %}" class="btn btn-primary"><span class="fas fa-eye"></span> View User Profile</a>
</div>
</div>
<div class="row mb-3">
@@ -51,6 +52,7 @@
<ul class="list-group col-12">
{% for qual in completed_levels %}
<li class="list-group-item">
{{ qual.level.get_icon }}
<a href="{% url 'level_detail' qual.level.pk %}">{{ qual.level }}</a>
{% if qual.confirmed_on is None %}
{% if request.user.pk != object.pk and request.user.is_supervisor %}
@@ -59,7 +61,7 @@
<button class="btn btn-warning" disabled>Awaiting Confirmation</button>
{% endif %}
{% else %}
<button class="btn btn-success active">Confirmed <small>by {{ qual.confirmed_by|default:'System' }}</small></button>
Confirmed by <a href="{{ qual.confirmed_by.get_absolute_url }}">{{ qual.confirmed_by|default:'System' }}</a> on {{ qual.confirmed_on|date }}
{% endif %}
</li>
{% empty %}

View File

@@ -36,8 +36,8 @@
<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>{% for level in object|get_levels_of_depth:1 %}{{ level.get_icon }}{%empty%}No{%endfor%}</td>
<td {% if object.is_supervisor %}class="table-success"{%endif%}>{{ object.is_supervisor|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>{{ object.num_qualifications }}</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>