From: Radek Czajka Date: Thu, 14 Feb 2013 13:22:31 +0000 (+0100) Subject: fix competence links X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/4949e1da2861107d61900f930d82cac11e92db98 fix competence links --- 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")