fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor fix
[wolnelektury.git]
/
apps
/
catalogue
/
templatetags
/
catalogue_tags.py
diff --git
a/apps/catalogue/templatetags/catalogue_tags.py
b/apps/catalogue/templatetags/catalogue_tags.py
index
fa78495
..
25376f8
100644
(file)
--- a/
apps/catalogue/templatetags/catalogue_tags.py
+++ b/
apps/catalogue/templatetags/catalogue_tags.py
@@
-69,7
+69,7
@@
def book_title(book, html_links=False):
while book:
books.append(book)
book = book.parent
while book:
books.append(book)
book = book.parent
- names.extend(reversed(books
[::-1]
))
+ names.extend(reversed(books))
if html_links:
names = ['<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name) for tag in names]
if html_links:
names = ['<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name) for tag in names]
@@
-253,6
+253,7
@@
def tag_list(tags, choices=None):
@register.inclusion_tag('catalogue/folded_tag_list.html')
def folded_tag_list(tags, choices=None):
@register.inclusion_tag('catalogue/folded_tag_list.html')
def folded_tag_list(tags, choices=None):
+ tags = [tag for tag in tags if tag.count]
if choices is None:
choices = []
some_tags_hidden = False
if choices is None:
choices = []
some_tags_hidden = False