Changed sets to shelfs.
[wolnelektury.git] / catalogue / templatetags / catalogue_tags.py
index cf4abe7..0e05fa5 100644 (file)
@@ -117,22 +117,6 @@ def breadcrumbs(tags, search_form=True):
     return context
 
 
-@register.inclusion_tag('catalogue/_book.html')
-def book(request, book):
-    tags = book.tags.filter(~Q(category__in=('set', 'theme')))
-    tags = [u'<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name) for tag in tags]
-    
-    formats = []
-    if book.html_file:
-        formats.append(u'<a href="%s">Czytaj online</a>' % book.html_file.url)
-    if book.pdf_file:
-        formats.append(u'<a href="%s">Plik PDF</a>' % book.pdf_file.url)
-    if book.odt_file:
-        formats.append(u'<a href="%s">Plik ODT</a>' % book.odt_file.url)
-        
-    return locals()
-
-
 @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')