mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-07 23:49:42 +00:00
Add 'is van driver' to trainee list, haulage super doesn't count as a supervisor
This commit is contained in:
@@ -10,19 +10,26 @@
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle text-info" href="#" id="navbarDropdownRigboard" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<a class="nav-link dropdown-toggle text-info" href="#" id="navbarDropdownMy" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
My Record
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownRigboard">
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMy">
|
||||
<a class="dropdown-item" href="{% url 'trainee_detail' %}"><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>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'trainee_list' %}"><span class="fas fa-users"></span> Trainee List</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'level_list' %}"><span class="fas fa-layer-group"></span> Level List</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'item_list' %}"><span class="fas fa-sitemap"></span> Item List</a></li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownLists" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Lists
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownLists">
|
||||
<a class="dropdown-item" href="{% url 'trainee_list' %}"><span class="fas fa-users"></span> Trainee List</a>
|
||||
<a class="dropdown-item" href="{% url 'level_list' %}"><span class="fas fa-layer-group"></span> Level List</a>
|
||||
<a class="dropdown-item" href="{% url 'item_list' %}"><span class="fas fa-sitemap"></span> Item List</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'training_activity_table' %}"><span class="fas fa-random"></span> Recent Changes</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -53,10 +53,21 @@
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<h2 class="col-12">Training Levels</h2>
|
||||
{% for level in completed_levels %}
|
||||
{% for qual in completed_levels %}
|
||||
{% if forloop.first %}<div class="card-columns">{% endif %}
|
||||
<div class="card my-3 border-success">
|
||||
<h3 class="card-header"><a href="{% url 'level_detail' level.pk %}">{{ level }}</a></h3>
|
||||
<h3 class="card-header"><a href="{% url 'level_detail' qual.level.pk %}">{{ qual }}</a></h3>
|
||||
<div class="card-footer text-right pr-1">
|
||||
{% if qual.confirmed_by is None %}
|
||||
{% if request.user.is_supervisor or request.user.is_superuser %}
|
||||
<span class="badge badge-warning">Awaiting Confirmation</span> <a class="btn btn-info" href="{% url 'confirm_level' object.pk qual.level.pk %}">Confirm</a>
|
||||
{% else %}
|
||||
<button class="btn btn-warning" disabled>Awaiting Confirmation</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<button class="btn btn-success active">Confirmed <small>by {{ qual.confirmed_by }}</small></button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if forloop.last %}</div>{%endif%}
|
||||
{% empty %}
|
||||
@@ -73,22 +84,6 @@
|
||||
<div class="progress-bar progress-bar-striped" role="progressbar" style="width: {{completion}}%" aria-valuenow="{{completion}}" aria-valuemin="0" aria-valuemax="100">{{completion}}% complete</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer text-right">
|
||||
{% user_level_if_present object level as level_qualification %}
|
||||
{% if level_qualification %}
|
||||
{% if level_qualification.confirmed_by is None %}
|
||||
{% if request.user.is_supervisor or request.user.is_superuser %}
|
||||
<a class="btn btn-info" href="{% url 'confirm_level' object.pk level.pk %}">Confirm</a>
|
||||
{% else %}
|
||||
<button class="btn btn-warning" disabled>Awaiting Confirmation</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<button class="btn btn-success active">Confirmed <small>by {{ level_qualification.confirmed_by }}</small></button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<button class="btn btn-danger" disabled>Incomplete</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th>Van Driver?</th>
|
||||
<th>Supervisor?</th>
|
||||
<th>Qualification Count</th>
|
||||
<th></th>
|
||||
@@ -23,6 +24,7 @@
|
||||
{% 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 {% if object.is_supervisor %}class="table-success"{%endif%}>{{ object.is_supervisor|yesno|title }}</td>
|
||||
<td>{{ object.qualifications_obtained.all|length }}</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user