fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
book preview js/css compressing
[redakcja.git]
/
apps
/
catalogue
/
templatetags
/
book_list.py
diff --git
a/apps/catalogue/templatetags/book_list.py
b/apps/catalogue/templatetags/book_list.py
index
f5b7e64
..
f7e7047
100755
(executable)
--- a/
apps/catalogue/templatetags/book_list.py
+++ b/
apps/catalogue/templatetags/book_list.py
@@
-103,6
+103,9
@@
def document_list_filter(request, **kwargs):
chunks = chunks.order_by('book__title', 'book', 'number')
chunks = chunks.order_by('book__title', 'book', 'number')
+ if not request.user.is_authenticated():
+ chunks = chunks.filter(book__public=True)
+
state = arg_or_GET('status')
if state in _states_dict:
chunks = chunks.filter(_states_dict[state])
state = arg_or_GET('status')
if state in _states_dict:
chunks = chunks.filter(_states_dict[state])
@@
-127,6
+130,7
@@
def book_list(context, user=None):
'-count', 'last_name', 'first_name')}
new_context.update({
'-count', 'last_name', 'first_name')}
new_context.update({
+ "filters": True,
"request": request,
"books": ChunksList(document_list_filter(request, **filters)),
"stages": Chunk.tag_model.objects.all(),
"request": request,
"books": ChunksList(document_list_filter(request, **filters)),
"stages": Chunk.tag_model.objects.all(),
@@
-134,4
+138,3
@@
def book_list(context, user=None):
})
return new_context
})
return new_context
-