X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8786b85863e82ff2685fbf93cff5abaa0fb2a860..4029754270633cec551a0af783476cbb060cc1bd:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index cf1461feb..7cef7268b 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -86,6 +86,7 @@ def tagged_object_list(request, tags=''): model = models.Book shelf = [tag for tag in tags if tag.category == 'set'] shelf_is_set = (len(tags) == 1 and tags[0].category == 'set') + my_shelf_is_set = shelf_is_set and tags[0].user == request.user theme_is_set = len([tag for tag in tags if tag.category == 'theme']) > 0 if theme_is_set: model = models.Fragment @@ -110,6 +111,7 @@ def tagged_object_list(request, tags=''): extra_context = { 'categories': categories, 'shelf_is_set': shelf_is_set, + 'my_shelf_is_set': my_shelf_is_set, 'only_author': only_author, 'pd_counter': pd_counter, 'user_is_owner': user_is_owner,