X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e24e657ebf536f55c1bde66bd41563fae30a98b0..HEAD:/src/catalogue/views.py diff --git a/src/catalogue/views.py b/src/catalogue/views.py index dac4e6faa..588cdb073 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -1,5 +1,5 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from collections import OrderedDict import random @@ -253,6 +253,8 @@ class TaggedObjectList(BookList): t for t in self.ctx['tags'] if t is not self.ctx['main_tag'] ] + if len(self.ctx['tags']) == 1 and self.ctx['main_tag'].category == 'author': + self.ctx['translation_list'] = self.ctx['main_tag'].book_set.all() def get_queryset(self): qs = Book.tagged.with_all(self.ctx['work_tags']).filter(findable=True) @@ -546,6 +548,7 @@ def book_text(request, slug): return render(request, 'catalogue/book_text.html', { 'book': book, + 'extra_info': book.get_extra_info_json(), 'book_text': book_text, 'inserts': DynamicTextInsert.get_all(request) })