From: Radek Czajka Date: Wed, 7 Aug 2013 11:37:44 +0000 (+0200) Subject: Merge branch 'infographics' X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/66639e61ca81cd591cddd58325fee1845eed8e30?hp=c75a826660e072154b4f1f9cdf455cb9765e1fc4 Merge branch 'infographics' --- 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/templates/catalogue/snippets/lesson_nav.html b/catalogue/templates/catalogue/snippets/lesson_nav.html index fa9d8ad..4e36e22 100755 --- a/catalogue/templates/catalogue/snippets/lesson_nav.html +++ b/catalogue/templates/catalogue/snippets/lesson_nav.html @@ -3,6 +3,8 @@ {{ root }} {% elif lesson.type == 'synthetic' %} Lekcje syntetyczne ze wszystkich tematów +{% elif lesson.type == 'project' %} + Projekty ze wszystkich tematów {% else %} Inne {% endif %} @@ -23,6 +25,7 @@ {% endfor %} +{% if link_other_level %} {% with other=lesson.get_other_level %} {% if other %}

Ten temat jest dostępny również na @@ -30,3 +33,4 @@ {% if other.slug == 'liceum' %}zaawansowanym{% else %}podstawowym{% endif %}.

{% endif %} {% endwith %} +{% endif %} diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index c642f18..a8d69e6 100755 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -53,10 +53,11 @@ def lesson_nav(lesson): root = lesson.section siblings = Lesson.objects.filter(type='course', level=lesson.level, section=root) mark_level = False + link_other_level = True else: root = None siblings = Lesson.objects.filter(type=lesson.type) - mark_level = True + mark_level = link_other_level = lesson.type == 'course' return { "lesson": lesson, "root": root,