Merge branch 'master' of git@github.com:fnp/wolnelektury
authorLukasz Anwajler <lukasz@anwajler.com>
Fri, 26 Nov 2010 21:39:16 +0000 (15:39 -0600)
committerLukasz Anwajler <lukasz@anwajler.com>
Fri, 26 Nov 2010 21:39:16 +0000 (15:39 -0600)
apps/catalogue/models.py
apps/catalogue/views.py
lib/librarian
wolnelektury/static/css/master.book.css
wolnelektury/static/js/book.js
wolnelektury/templates/catalogue/book_text.html

index fa6c132..5b33dcc 100644 (file)
@@ -355,9 +355,9 @@ class Book(models.Model):
             if self.has_media("txt"):
                 formats.append(u'<a href="%s">TXT</a>' % self.get_media('txt').url)
             # other files
-            for m in self.media.order_by('type'):
+            for m in self.medias.order_by('type'):
                 formats.append(u'<a href="%s">%s</a>' % m.type, m.file.url)
+
             formats = [mark_safe(format) for format in formats]
 
             setattr(self, key, unicode(render_to_string('catalogue/book_short.html',
index 38036ab..fbd4fb6 100644 (file)
@@ -255,7 +255,7 @@ def book_detail(request, slug):
     book_tag = book.book_tag()
     tags = list(book.tags.filter(~Q(category='set')))
     categories = split_tags(tags)
-    book_children = book.children.all().order_by('parent_number')
+    book_children = book.children.all().order_by('parent_number', 'title')
     
     _book = book
     parents = []
index 4dc60ac..dd7a759 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 4dc60ac382ac861ca6f86e8c95ef0508257a32d3
+Subproject commit dd7a7591ae946e6526f7555672517563c994b3ee
index aac5d58..cbd6bbc 100644 (file)
@@ -80,7 +80,7 @@ img {
 }
 
 
-#toc, #themes {
+#toc, #themes, #nota_red {
     position: fixed;
     left: 0em;
     top: 1.5em;
index 9960bfa..b9ab6b1 100644 (file)
@@ -19,6 +19,9 @@ $(function() {
     if ($('#toc li').length == 0) {
         $('#menu li a[href="#toc"]').remove();
     }
+    if ($('#nota_red').length == 0) {
+        $('#menu li a[href="#nota_red"]').remove();
+    }
 
     // On page load, scroll to anchor
     scrollToAnchor(window.location.hash)
index d828265..a4a319b 100644 (file)
@@ -16,6 +16,7 @@
             <ul>
                 <li><a href="#toc">{% trans "Table of contents" %}</a></li>
                 <li><a href="#themes">{% trans "Themes" %}</a></li>
+                <li><a href="#nota_red">{% trans "Edit. note" %}</a></li>
             </ul>
         </div>
         <div id="header">