From: Radek Czajka Date: Mon, 11 Feb 2013 11:30:36 +0000 (+0100) Subject: various fixes X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/483e6706c77dd3531f8b02334a7fde0491ca138d?ds=sidebyside various fixes --- diff --git a/catalogue/static/catalogue/css/lesson.css b/catalogue/static/catalogue/css/lesson.css index de122b8..df3f135 100644 --- a/catalogue/static/catalogue/css/lesson.css +++ b/catalogue/static/catalogue/css/lesson.css @@ -227,6 +227,11 @@ em.person { .activity .info .materials h1 { background: url(/static/img/icons/activity-tools.png) 0 0 no-repeat; } +.lista .paragraph { + margin: .3em 0; } +.lista li { + margin: .75em 0; } + .clearboth { clear: both; } diff --git a/catalogue/static/catalogue/css/lesson.scss b/catalogue/static/catalogue/css/lesson.scss index 1378c20..a1627bc 100755 --- a/catalogue/static/catalogue/css/lesson.scss +++ b/catalogue/static/catalogue/css/lesson.scss @@ -286,6 +286,15 @@ em.person { } } +.lista { + .paragraph { + margin: .3em 0; + } + li { + margin: .75em 0; + } +} + .clearboth { clear: both; diff --git a/catalogue/templates/catalogue/lesson_detail.html b/catalogue/templates/catalogue/lesson_detail.html index 8cf7bf4..237e723 100755 --- a/catalogue/templates/catalogue/lesson_detail.html +++ b/catalogue/templates/catalogue/lesson_detail.html @@ -55,11 +55,11 @@ {% if object.dc.relations %}

Powiązane lekcje

+
{% endif %} diff --git a/catalogue/templates/catalogue/snippets/lesson_link.html b/catalogue/templates/catalogue/snippets/lesson_link.html index 15b8cf0..749b4e1 100755 --- a/catalogue/templates/catalogue/snippets/lesson_link.html +++ b/catalogue/templates/catalogue/snippets/lesson_link.html @@ -1 +1 @@ -{{ lesson }} +{% if lesson %}{{ lesson }}{% endif %} diff --git a/catalogue/templates/catalogue/snippets/lesson_nav.html b/catalogue/templates/catalogue/snippets/lesson_nav.html index 742004f..a2ff5ba 100755 --- a/catalogue/templates/catalogue/snippets/lesson_nav.html +++ b/catalogue/templates/catalogue/snippets/lesson_nav.html @@ -2,8 +2,10 @@

{% if root %} {{ root }} +{% elif lesson.type == 'synthetic' %} + Lekcje syntetyczne ze wszystkich tematów {% else %} - Wszystkie działy + Inne {% endif %}

@@ -12,8 +14,11 @@
  • {% if item == lesson %} {{ item }} + {% if mark_level and item.level.slug == 'liceum' %} (poziom zaawansowany){% endif %} {% else %} - {{ item }} + {{ item }} + {% if mark_level and item.level.slug == 'liceum' %} (poziom zaawansowany){% endif %} + {% endif %}
  • {% endfor %} diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index 09113d9..fd1fc62 100755 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -37,19 +37,25 @@ def section_box(section): def lesson_nav(lesson): if lesson.type == 'course': root = lesson.section - siblings = root.lesson_set.filter(type='course') + siblings = root.lesson_set.filter(type='course', level=lesson.level) + mark_level = False else: root = None siblings = Lesson.objects.filter(type=lesson.type) + mark_level = True return { "lesson": lesson, "root": root, "siblings": siblings, + "mark_level": mark_level } @register.inclusion_tag("catalogue/snippets/lesson_link.html") def lesson_link(uri): - return {'lesson': Lesson.objects.get(slug=WLURI(uri).slug)} + try: + return {'lesson': Lesson.objects.get(slug=WLURI(uri).slug)} + except Lesson.DoesNotExist: + return {} @register.filter def person_list(persons): diff --git a/edumed/static/css/base.css b/edumed/static/css/base.css index c256472..89c34d6 100644 --- a/edumed/static/css/base.css +++ b/edumed/static/css/base.css @@ -190,6 +190,9 @@ footer.main { .link-list a:hover { color: #ed7831; } +.link-list-colored a { + color: #ed7831; } + .plain { margin: 0; padding: 0; diff --git a/edumed/static/css/base.scss b/edumed/static/css/base.scss index 3bf409f..4d7e8a7 100644 --- a/edumed/static/css/base.scss +++ b/edumed/static/css/base.scss @@ -224,6 +224,13 @@ footer.main { color: $oranji; } } +.link-list-colored { + a { + color: $oranji; + } +} + + .plain { margin: 0; padding: 0; diff --git a/edumed/templates/base.html b/edumed/templates/base.html index e744135..ca28197 100644 --- a/edumed/templates/base.html +++ b/edumed/templates/base.html @@ -43,7 +43,7 @@
  • Lekcje
  • Kompetencje
  • Współpraca
  • -
  • Szkolenia
  • +
  • Konkurs
  • Wesprzyj nas
  • O nas
  • Kontakt