fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c67bb0c
)
fix competence links
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 14 Feb 2013 13:22:31 +0000
(14:22 +0100)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 14 Feb 2013 13:22:31 +0000
(14:22 +0100)
catalogue/templates/catalogue/lesson_detail.html
patch
|
blob
|
history
curriculum/templates/curriculum/snippets/competence.html
patch
|
blob
|
history
curriculum/templatetags/curriculum_tags.py
patch
|
blob
|
history
diff --git
a/catalogue/templates/catalogue/lesson_detail.html
b/catalogue/templates/catalogue/lesson_detail.html
index
237e723
..
ef20d0e
100755
(executable)
--- a/
catalogue/templates/catalogue/lesson_detail.html
+++ b/
catalogue/templates/catalogue/lesson_detail.html
@@
-67,7
+67,7
@@
<section class="section-minor">
<h1>Kompetencje:</h1>
<ul class="plain">
<section class="section-minor">
<h1>Kompetencje:</h1>
<ul class="plain">
- {% competence object.dc.competences %}
+ {% competence object.dc.competences
object.level
%}
</ul>
</section>
{% endif %}
</ul>
</section>
{% endif %}
diff --git
a/curriculum/templates/curriculum/snippets/competence.html
b/curriculum/templates/curriculum/snippets/competence.html
index
5fa071c
..
7f62ac8
100755
(executable)
--- 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 %}
{% load url_for_level from curriculum_tags %}
{% if comps %}
- {% for comp in comps %}
- <li><a href="{{ competence|url_for_level:
object.
level }}">
+ {% for comp
etence
in comps %}
+ <li><a href="{{ competence|url_for_level:level }}">
{{ competence }}</a></li>
{% endfor %}
{% else %}
{{ competence }}</a></li>
{% endfor %}
{% else %}
diff --git
a/curriculum/templatetags/curriculum_tags.py
b/curriculum/templatetags/curriculum_tags.py
index
f772485
..
6839885
100755
(executable)
--- 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")
@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,
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")
}
@register.inclusion_tag("curriculum/snippets/curriculum.html")