fix competence links
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 14 Feb 2013 13:22:31 +0000 (14:22 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 14 Feb 2013 13:22:31 +0000 (14:22 +0100)
catalogue/templates/catalogue/lesson_detail.html
curriculum/templates/curriculum/snippets/competence.html
curriculum/templatetags/curriculum_tags.py

index 237e723..ef20d0e 100755 (executable)
@@ -67,7 +67,7 @@
     <section class="section-minor">
         <h1>Kompetencje:</h1>
         <ul class="plain">
-        {% competence object.dc.competences %}
+        {% competence object.dc.competences object.level %}
         </ul>
     </section>
     {% endif %}
index 5fa071c..7f62ac8 100755 (executable)
@@ -1,7 +1,7 @@
 {% load url_for_level from curriculum_tags %}
 {% if comps %}
-    {% for comp in comps %}
-        <li><a href="{{ competence|url_for_level:object.level }}">
+    {% for competence in comps %}
+        <li><a href="{{ competence|url_for_level:level }}">
             {{ competence }}</a></li>
     {% endfor %}
 {% else %}
index f772485..6839885 100755 (executable)
@@ -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")