From: Lukasz Anwajler Date: Fri, 26 Nov 2010 21:39:16 +0000 (-0600) Subject: Merge branch 'master' of git@github.com:fnp/wolnelektury X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/088b37be4aa9fe5156c101c0e65b0d229bcec849?hp=21b418d80950915a683c1fe929717acd9e031dc7 Merge branch 'master' of git@github.com:fnp/wolnelektury --- diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index fa6c13225..5b33dcc1a 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -355,9 +355,9 @@ class Book(models.Model): if self.has_media("txt"): formats.append(u'TXT' % 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'%s' % m.type, m.file.url) - + formats = [mark_safe(format) for format in formats] setattr(self, key, unicode(render_to_string('catalogue/book_short.html', diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 38036ab3a..fbd4fb610 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -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 = [] diff --git a/lib/librarian b/lib/librarian index 4dc60ac38..dd7a7591a 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 4dc60ac382ac861ca6f86e8c95ef0508257a32d3 +Subproject commit dd7a7591ae946e6526f7555672517563c994b3ee diff --git a/wolnelektury/static/css/master.book.css b/wolnelektury/static/css/master.book.css index aac5d5837..cbd6bbceb 100644 --- a/wolnelektury/static/css/master.book.css +++ b/wolnelektury/static/css/master.book.css @@ -80,7 +80,7 @@ img { } -#toc, #themes { +#toc, #themes, #nota_red { position: fixed; left: 0em; top: 1.5em; diff --git a/wolnelektury/static/js/book.js b/wolnelektury/static/js/book.js index 9960bfa6a..b9ab6b1da 100644 --- a/wolnelektury/static/js/book.js +++ b/wolnelektury/static/js/book.js @@ -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) diff --git a/wolnelektury/templates/catalogue/book_text.html b/wolnelektury/templates/catalogue/book_text.html index d8282650a..a4a319ba6 100644 --- a/wolnelektury/templates/catalogue/book_text.html +++ b/wolnelektury/templates/catalogue/book_text.html @@ -16,6 +16,7 @@