mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-30 11:52:17 +00:00
Do not display items on trainee detail
That's what the detailed view is for... And definitely nowt to do with my horrifically optimised SQL
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
{% extends 'base_training.html' %}
|
{% extends 'base_training.html' %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load user_has_qualification from tags %}
|
|
||||||
{% load percentage_complete from tags %}
|
{% load percentage_complete from tags %}
|
||||||
{% load user_level_if_present from tags %}
|
{% load markdown_tags %}
|
||||||
{% load colour_from_depth from tags %}
|
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'css/selects.css' %}"/>
|
<link rel="stylesheet" type="text/css" href="{% static 'css/selects.css' %}"/>
|
||||||
@@ -51,7 +49,6 @@
|
|||||||
</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">
|
<ul class="list-group col-12">
|
||||||
{% for qual in completed_levels %}
|
{% for qual in completed_levels %}
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
@@ -70,15 +67,16 @@
|
|||||||
<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>
|
</ul>
|
||||||
<h3 class="col-12 pt-2">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 %}
|
||||||
<div class="card my-3 border-warning">
|
<div class="card my-3 border-warning">
|
||||||
<h3 class="card-header"><a href="{% url 'level_detail' level.pk %}">{{ level }}</a></h3>
|
<h3 class="card-header"><a href="{{ level.get_absolute_url }}">{{ level }}</a></h3>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>{{ level.description|truncatewords:30 }}</p>
|
{{ level.description|markdown }}
|
||||||
<div class="progress mb-2">
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="progress">
|
||||||
<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 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>
|
</div>
|
||||||
@@ -86,29 +84,4 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<h2 class="col-12 pb-2">Training Items <small class="bg-light rounded-sm p-2"> Key: <span class="badge badge-warning">Training Started</span> <span class="badge badge-success">Training Complete</span> <span class="badge badge-info">Passed Out</span></small></h2>
|
|
||||||
{% for category in categories %}
|
|
||||||
{% if forloop.first or forloop.counter|divisibleby:3 %}<div class="card-deck col-12">{% endif %}
|
|
||||||
<div class="card mb-3">
|
|
||||||
<h3 class="card-header">{{ category }}</h3>
|
|
||||||
<div class="list-group list-group-flush">
|
|
||||||
{% for q in object.qualifications_obtained.all %}
|
|
||||||
{% if q.item.category == category %}
|
|
||||||
<li class="list-group-item list-group-item-{% colour_from_depth q.depth %}">{{q.item}} ({{q.date}})</li>
|
|
||||||
{% endif %}
|
|
||||||
{% empty %}
|
|
||||||
<li class="list-group-item text-muted">None yet...</li>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if forloop.counter|add:"1"|divisibleby:3 %}</div>{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col text-right">
|
|
||||||
{% include 'partials/last_edited.html' with target="trainee_history" %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user