From: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl> 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=inline 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 %} <section class="section-minor"> <h1>PowiÄ zane lekcje</h1> + <ul class="link-list link-list-colored"> {% for uri in object.dc.relations %} - <ul class="link-list"> <li>{% lesson_link uri %}</li> - </ul> {% endfor %} + </ul> </section> {% 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 @@ -<a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a> +{% if lesson %}<a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a>{% 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 @@ <h1> {% if root %} <a href="{{ root.get_absolute_url }}">{{ root }}</a> +{% elif lesson.type == 'synthetic' %} + <a href="{% url 'catalogue_lessons' %}">Lekcje syntetyczne ze wszystkich tematów</a> {% else %} - <a href="{% url 'catalogue_lessons' %}">Wszystkie dziaÅy</a> + <a href="{% url 'catalogue_lessons' %}">Inne</a> {% endif %} </h1> @@ -12,8 +14,11 @@ <li> {% if item == lesson %} <strong>{{ item }}</strong> + {% if mark_level and item.level.slug == 'liceum' %} (poziom zaawansowany){% endif %} {% else %} - <a href="{{ item.get_absolute_url }}">{{ item }}</a> + <a href="{{ item.get_absolute_url }}">{{ item }} + {% if mark_level and item.level.slug == 'liceum' %} (poziom zaawansowany){% endif %} + </a> {% endif %} </li> {% 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 @@ <li><a class="menu-lekcje" href="{% url "catalogue_lessons" %}">Lekcje</a></li> <li><a class="menu-kompetencje" href="{% url "curriculum" %}">Kompetencje</a></li> <li><a class="menu-wspolpraca" href="{% url "info" "wspolpraca/" %}">WspóÅpraca</a></li> - <li><a class="menu-szkolenia" href="{% url "info" "szkolenia/" %}">Szkolenia</a></li> + <li><a class="menu-szkolenia" href="{% url "info" "konkurs/" %}">Konkurs</a></li> <li><a class="menu-wesprzyj" href="{% url "info" "wesprzyj/" %}">Wesprzyj nas</a></li> <li><a class="menu-o-nas" href="{% url "info" "o-nas/" %}">O nas</a></li> <li><a class="menu-kontakt" href="{% url "info" "kontakt/" %}">Kontakt</a></li>