Fixes #2908: projects.
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 30 Jul 2013 14:13:48 +0000 (16:13 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 30 Jul 2013 14:15:44 +0000 (16:15 +0200)
catalogue/management/commands/repackage.py
catalogue/templates/catalogue/lesson/project/lesson_detail.html
catalogue/templatetags/catalogue_tags.py

index eed8576..3946e82 100755 (executable)
@@ -42,6 +42,9 @@ class Command(BaseCommand):
                     elif lesson.type == 'synthetic':
                         prefix = "%s/%s (synteza)/" % (
                                 section_dir, lesson.slug)
+                    elif lesson.type == 'project':
+                        prefix = "%s/%s (projekt)/" % (
+                                section_dir, lesson.slug)
                     else:
                         prefix = "%s/%s/" % (
                                 section_dir, lesson.slug)
index d4336ec..ed36341 100755 (executable)
@@ -15,7 +15,7 @@
 </section>
 
 {% if object.package %}
-    <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz całą lekcję</a></section>
+    <section class="box-button"><a href="{{ object.package.url }}" class="dl-button">Pobierz cały projekt</a></section>
 {% endif %}
 
 {% endblock %}
index c642f18..4485e18 100755 (executable)
@@ -49,7 +49,7 @@ def section_box(section):
 
 @register.inclusion_tag("catalogue/snippets/lesson_nav.html")
 def lesson_nav(lesson):
-    if lesson.type == 'course':
+    if lesson.type in ('course', 'project'):
         root = lesson.section
         siblings = Lesson.objects.filter(type='course', level=lesson.level, section=root)
         mark_level = False