mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-26 18:02:18 +00:00
Tweak training level display
This commit is contained in:
@@ -51,11 +51,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<h2 class="col-12">Training Levels</h2>
|
<h2 class="col-12">Training Levels</h2>
|
||||||
|
<h3 class="col-12">Qualified</h3>
|
||||||
|
<ul class="list-group col-12">
|
||||||
{% for qual in completed_levels %}
|
{% for qual in completed_levels %}
|
||||||
{% if forloop.first %}<div class="card-columns">{% endif %}
|
<li class="list-group-item">
|
||||||
<div class="card my-3 border-success">
|
<a href="{% url 'level_detail' qual.level.pk %}">{{ qual.level }}</a>
|
||||||
<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 qual.confirmed_by is None %}
|
||||||
{% if request.user.pk != object.pk and request.user.is_supervisor %}
|
{% if request.user.pk != object.pk and request.user.is_supervisor %}
|
||||||
<span class="badge badge-warning">Awaiting Confirmation</span> <a class="btn btn-info" href="{% url 'confirm_level' object.pk qual.level.pk %}">Confirm</a>
|
<span class="badge badge-warning">Awaiting Confirmation</span> <a class="btn btn-info" href="{% url 'confirm_level' object.pk qual.level.pk %}">Confirm</a>
|
||||||
@@ -65,12 +65,12 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<button class="btn btn-success active">Confirmed <small>by {{ qual.confirmed_by }}</small></button>
|
<button class="btn btn-success active">Confirmed <small>by {{ qual.confirmed_by }}</small></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</li>
|
||||||
</div>
|
|
||||||
{% if forloop.last %}</div>{%endif%}
|
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<div class="alert alert-warning mx-auto">No qualifications in any levels yet...did someone forget to fill out the paperwork?</div>
|
<div class="alert alert-warning mx-auto">No qualifications in any levels yet...did someone forget to fill out the paperwork?</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<h3>In Progress</h3>
|
||||||
<div class="card-columns">
|
<div class="card-columns">
|
||||||
{% for level in started_levels %}
|
{% for level in started_levels %}
|
||||||
{% percentage_complete level object as completion %}
|
{% percentage_complete level object as completion %}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ class LevelDetail(generic.DetailView):
|
|||||||
class LevelList(generic.ListView):
|
class LevelList(generic.ListView):
|
||||||
model = models.TrainingLevel
|
model = models.TrainingLevel
|
||||||
template_name = "level_list.html"
|
template_name = "level_list.html"
|
||||||
|
ordering = ['qualifications_obtained']
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user