feat(templates/course_module_page.html): add lesson list
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load wagtailcore_tags %}
|
||||
{% load static i18n wagtailcore_tags %}
|
||||
|
||||
{% block title %}{{ page.full_title }}{% endblock %}
|
||||
|
||||
@@ -18,4 +17,15 @@
|
||||
</h2>
|
||||
|
||||
{{ 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 %}
|
||||
|
||||
Reference in New Issue
Block a user