feat(templates/course_module_page.html): add lesson list

This commit is contained in:
2026-03-17 12:46:05 +01:00
parent fd537c82fc
commit 42830dbc45

View File

@@ -1,6 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load static %} {% load static i18n wagtailcore_tags %}
{% load wagtailcore_tags %}
{% block title %}{{ page.full_title }}{% endblock %} {% block title %}{{ page.full_title }}{% endblock %}
@@ -18,4 +17,15 @@
</h2> </h2>
{{ page.body|richtext }} {{ page.body|richtext }}
<h3 class="not-prose text-lg mt-8 mb-4 text-gray-700 font-semibold">{% trans "Lessons" %}</h3>
<ul class="list-disc list-inside">
{% for lesson in page.get_children.specific.live %}
<li>
<a href="{{ lesson.url }}" class="text-blue-600 hover:underline">{{ lesson.title }}</a>
</li>
{% empty %}
<li>{% trans "No lessons yet." %}</li>
{% endfor %}
</ul>
{% endblock content %} {% endblock content %}