mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-04 14:18:22 +00:00
Add basic validation of item prerequisites
Currently throws the worlds most unhelpful error message...
This commit is contained in:
@@ -13,11 +13,18 @@
|
||||
<div class="card-body">
|
||||
<div class="list-group list-group-flush">
|
||||
{% for item in category.items.all %}
|
||||
{% if item.active %}
|
||||
<li class="list-group-item">{{ item }}</li>
|
||||
{% elif request.user.is_superuser %}
|
||||
<li class="list-group-item text-warning">{{ item }}</li>
|
||||
{% endif %}
|
||||
<li class="list-group-item {% if not item.active%}text-warning{%endif%}">{{ item }}
|
||||
{% if item.prerequisites.exists %}
|
||||
<div class="ml-3 font-italic">
|
||||
<p class="text-info mb-0">Prerequisites:</p>
|
||||
<ul>
|
||||
{% for p in item.prerequisites.all %}
|
||||
<li>{{p}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user