Importing whole sections.
[edumed.git] / catalogue / templates / catalogue / snippets / section_box.html
index 2d02b86..6a3b6ec 100755 (executable)
@@ -1,19 +1,29 @@
-<ul class="section-levels">
-{% for level, depths in lessons.items %}
-    <li class="section-level section-level-{{ level.slug }}">
-        <ul class="section-depths">
-        {% for depth, lesson_list in depths.items %}
-            <li class="section-depth section-depth-{{ depth }}">
-                <ul class="section-lessons">
-                    {% for lesson in lesson_list %}
-                        <li class="section-lesson">
-                            <a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a>
-                        </li>
-                    {% endfor %}
-                </ul>
-            </li>
-        {% endfor %}
-        </ul>
-    </li>
+{% for level, types in lessons.items %}
+{% if level.slug == "liceum" %}
+    <p>Poziom zaawansowany
+        <span class="section-links"><a href="#top">wróć do spisu treści</a></span>
+    </p>
+{% endif %}
+<section class="section-level section-level-{{ level.slug }}">
+    {% spaceless %}
+    {% for lesson_type, lesson_list in types.items %}
+        <section class="section-type section-type-{{ lesson_type }}">
+            {% if lesson_type == 'synthetic' %}
+                <h1>Lekcja syntetyczna</h1>
+            {% else %}
+                <h1>Pełny kurs</h1>
+            {% endif %}
+            <ul class="section-lessons">
+                {% for lesson in lesson_list %}
+                    <li class="section-lesson">
+                        <a href="{{ lesson.get_absolute_url }}">{{ lesson }}{% if depth == 'synthetic' %}
+                            (przegląd całego działu w 45 minut)
+                        {% endif %}</a>
+                    </li>
+                {% endfor %}
+            </ul>
+        </section>
+    {% endfor %}
+    {% endspaceless %}
+</section>
 {% endfor %}
-</ul>
\ No newline at end of file