various fixes
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 11 Feb 2013 11:30:36 +0000 (12:30 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 11 Feb 2013 11:30:36 +0000 (12:30 +0100)
catalogue/static/catalogue/css/lesson.css
catalogue/static/catalogue/css/lesson.scss
catalogue/templates/catalogue/lesson_detail.html
catalogue/templates/catalogue/snippets/lesson_link.html
catalogue/templates/catalogue/snippets/lesson_nav.html
catalogue/templatetags/catalogue_tags.py
edumed/static/css/base.css
edumed/static/css/base.scss
edumed/templates/base.html

index de122b8..df3f135 100644 (file)
@@ -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; }
 
index 1378c20..a1627bc 100755 (executable)
@@ -286,6 +286,15 @@ em.person {
     }
 }
 
+.lista {
+    .paragraph {
+        margin: .3em 0;
+    }
+    li {
+        margin: .75em 0;
+    }
+}
+
 
 .clearboth {
  clear: both;
index 8cf7bf4..237e723 100755 (executable)
     {% 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 %}
 
index 15b8cf0..749b4e1 100755 (executable)
@@ -1 +1 @@
-<a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a>
+{% if lesson %}<a href="{{ lesson.get_absolute_url }}">{{ lesson }}</a>{% endif %}
index 742004f..a2ff5ba 100755 (executable)
@@ -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>
 
     <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 %}
index 09113d9..fd1fc62 100755 (executable)
@@ -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):
index c256472..89c34d6 100644 (file)
@@ -190,6 +190,9 @@ footer.main {
   .link-list a:hover {
     color: #ed7831; }
 
+.link-list-colored a {
+  color: #ed7831; }
+
 .plain {
   margin: 0;
   padding: 0;
index 3bf409f..4d7e8a7 100644 (file)
@@ -224,6 +224,13 @@ footer.main {
         color: $oranji;
     }
 }
+.link-list-colored {
+    a {
+        color: $oranji;
+    }
+}
+
+
 .plain {
     margin: 0;
     padding: 0;
index e744135..ca28197 100644 (file)
@@ -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>