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