X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f7bf1b53894f95a4c27d3063c70ce798f39a6d3b..78f64bd3e21f1a5610b50bc3235ad4c85dfe11c9:/catalogue/templatetags/catalogue_tags.py diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index d3a25ad93..12460a0c8 100644 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -54,9 +54,9 @@ def title_from_tags(tags): title = u'' - # Specjalny przypadek oglądania wszystkich lektur w danym zestawie + # Specjalny przypadek oglądania wszystkich lektur na danej półce if len(self) == 1 and 'set' in self: - return u'Zestaw %s' % self['set'] + return u'Półka %s' % self['set'] # Specjalny przypadek "Twórczość w pozytywizmie", wtedy gdy tylko epoka # jest wybrana przez użytkownika @@ -117,22 +117,6 @@ def breadcrumbs(tags, search_form=True): return context -@register.inclusion_tag('catalogue/_book.html') -def book(book): - tags = book.tags.filter(~Q(category__in=('set', 'theme'))) - tags = [u'%s' % (tag.get_absolute_url(), tag.name) for tag in tags] - - formats = [] - if book.html_file: - formats.append(u'Czytaj online' % book.html_file.url) - if book.pdf_file: - formats.append(u'Plik PDF' % book.pdf_file.url) - if book.odt_file: - formats.append(u'Plik ODT' % book.odt_file.url) - - return {'book': book, 'tags': tags, 'formats': formats} - - @register.tag def catalogue_url(parser, token): bits = token.split_contents() @@ -180,7 +164,7 @@ class CatalogueURLNode(Node): pass if len(tag_slugs) > 0: - return reverse('tagged_book_list', kwargs={'tags': '/'.join(tag_slugs)}) + return reverse('tagged_object_list', kwargs={'tags': '/'.join(tag_slugs)}) else: return reverse('main_page')