From 0b7c6a7b88888fe948faa33edc988ba10d62b7c5 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 30 Jul 2013 16:13:48 +0200 Subject: [PATCH 1/1] Fixes #2908: projects. --- catalogue/management/commands/repackage.py | 3 +++ .../templates/catalogue/lesson/project/lesson_detail.html | 2 +- catalogue/templatetags/catalogue_tags.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/catalogue/management/commands/repackage.py b/catalogue/management/commands/repackage.py index eed8576..3946e82 100755 --- a/catalogue/management/commands/repackage.py +++ b/catalogue/management/commands/repackage.py @@ -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) diff --git a/catalogue/templates/catalogue/lesson/project/lesson_detail.html b/catalogue/templates/catalogue/lesson/project/lesson_detail.html index d4336ec..ed36341 100755 --- a/catalogue/templates/catalogue/lesson/project/lesson_detail.html +++ b/catalogue/templates/catalogue/lesson/project/lesson_detail.html @@ -15,7 +15,7 @@ {% if object.package %} -
Pobierz całą lekcję
+
Pobierz cały projekt
{% endif %} {% endblock %} diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index c642f18..4485e18 100755 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -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 -- 2.20.1