update fnpdjango to incorporate bug fix
[edumed.git] / catalogue / templates / catalogue / snippets / section_box.html
1 {% load thumbnail %}
2 {% for level, types in lessons.items %}
3 {% if level.slug == "liceum" %}
4     <p><strong>{{section.title}}</strong>: poziom zaawansowany
5         <span class="section-links"><a href="#top">wróć do spisu treści</a></span>
6     </p>
7 {% endif %}
8 <section id="{{ section.slug }}_{{ level.slug }}" class="section-level section-level-{{ level.slug }}">
9     {% spaceless %}
10     <div class='sections-row'>
11     {% for lesson_type, lesson_list in types.items %}
12         {% if lesson_type == 'project' %}
13             </div><div class='sections-row'>
14         {% endif %}
15         <section class="section-type section-type-{{ lesson_type }}">
16             {% if lesson_type == 'synthetic' %}
17                 {% if section.image %}
18                     {% thumbnail section.image "120x160" as im %}
19                         <a class="image" href="{{ section.image.url }}">
20                             <img src="{{ im.url }}" />
21                         </a>
22                     {% endthumbnail %}
23                 {% endif %}
24                 <h1>Lekcja syntetyczna</h1>
25             {% elif lesson_type == 'project' %}
26                 <h1>Projekt</h1>
27             {% else %}
28                 <h1>Pełny kurs</h1>
29             {% endif %}
30             {% if lesson_list %}
31             <ul class="section-lessons link-list">
32                 {% for lesson in lesson_list %}
33                     <li class="section-lesson">
34                         {% if lesson.slug %}
35                             <a href="{{ lesson.get_absolute_url }}">{{ lesson }}{% if lesson_type == 'synthetic' %}
36                                 <br/>(przegląd całego tematu w 45 minut)
37                             {% endif %}</a>
38                         {% else %}
39                             {{ lesson }} <em>(w&nbsp;przygotowaniu)</em>
40                         {% endif %}
41                     </li>
42                 {% endfor %}
43             </ul>
44             {% else %}
45                 <p>(W przygotowaniu)</p>
46             {% endif %}
47         </section>
48     {% endfor %}
49     </div>
50     {% endspaceless %}
51 </section>
52 {% endfor %}