From 4949e1da2861107d61900f930d82cac11e92db98 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 14 Feb 2013 14:22:31 +0100 Subject: [PATCH] fix competence links --- catalogue/templates/catalogue/lesson_detail.html | 2 +- curriculum/templates/curriculum/snippets/competence.html | 4 ++-- curriculum/templatetags/curriculum_tags.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/catalogue/templates/catalogue/lesson_detail.html b/catalogue/templates/catalogue/lesson_detail.html index 237e723..ef20d0e 100755 --- a/catalogue/templates/catalogue/lesson_detail.html +++ b/catalogue/templates/catalogue/lesson_detail.html @@ -67,7 +67,7 @@

Kompetencje:

{% endif %} diff --git a/curriculum/templates/curriculum/snippets/competence.html b/curriculum/templates/curriculum/snippets/competence.html index 5fa071c..7f62ac8 100755 --- a/curriculum/templates/curriculum/snippets/competence.html +++ b/curriculum/templates/curriculum/snippets/competence.html @@ -1,7 +1,7 @@ {% load url_for_level from curriculum_tags %} {% if comps %} - {% for comp in comps %} -
  • + {% for competence in comps %} +
  • {{ competence }}
  • {% endfor %} {% else %} diff --git a/curriculum/templatetags/curriculum_tags.py b/curriculum/templatetags/curriculum_tags.py index f772485..6839885 100755 --- a/curriculum/templatetags/curriculum_tags.py +++ b/curriculum/templatetags/curriculum_tags.py @@ -6,13 +6,14 @@ register = template.Library() @register.inclusion_tag("curriculum/snippets/competence.html") -def competence(texts): +def competence(texts, level): try: comps = [Competence.from_text(text) for text in texts] except: return {'texts': texts} return { 'comps': comps, + 'level': level, } @register.inclusion_tag("curriculum/snippets/curriculum.html") -- 2.20.1