Various tweaks

This commit is contained in:
2021-09-13 01:07:17 +01:00
parent 75410db752
commit 081c33ebc8
4 changed files with 22 additions and 12 deletions

View File

@@ -53,11 +53,19 @@
</div>
<div class="row mb-3">
<h2 class="col-12">Training Levels</h2>
{% for level 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>
</div>
{% if forloop.last %}</div>{%endif%}
{% empty %}
<span class="badge badge-warning">No qualifications in any levels yet...did someone forget to fill out the paperwork?</span>
{% endfor %}
<div class="card-columns">
{% for level in levels %}
{% for level in started_levels %}
{% percentage_complete level object as completion %}
{% if completion > 0 %}
<div class="card my-3">
<div class="card my-3 border-warning">
<h3 class="card-header"><a href="{% url 'level_detail' level.pk %}">{{ level }}</a></h3>
<div class="card-body">
<p>{{ level.description|truncatewords:30 }}</p>
@@ -82,9 +90,6 @@
{% endif %}
</div>
</div>
{% endif %}
{% empty %}
<p class="text-muted">No progress in any levels yet...did someone forget to fill out the paperwork?</p>
{% endfor %}
</div>
</div>

View File

@@ -22,7 +22,7 @@
<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>
<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_supervisor %}class="table-success"{%endif%}>{{ object.is_supervisor|yesno|title }}</td>
<td>{{ object.qualifications_obtained.all|length }}</td>
<td>