From fb18ab1ca5ecbf049fcd6d36ae1a622d914ed848 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Wed, 29 Apr 2020 18:57:39 +0200 Subject: [PATCH] Fix #866 (Recent book sidebar element can't be removed anymore) --- cps/ub.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cps/ub.py b/cps/ub.py index 2b0c0e16..3e753e1d 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -60,7 +60,7 @@ def get_sidebar_config(kwargs=None): sidebar = list() sidebar.append({"glyph": "glyphicon-book", "text": _('Recently Added'), "link": 'web.index', "id": "new", "visibility": constants.SIDEBAR_RECENT, 'public': True, "page": "root", - "show_text": _('Show recent books'), "config_show":True}) + "show_text": _('Show recent books'), "config_show":False}) sidebar.append({"glyph": "glyphicon-fire", "text": _('Hot Books'), "link": 'web.books_list', "id": "hot", "visibility": constants.SIDEBAR_HOT, 'public': True, "page": "hot", "show_text": _('Show Hot Books'), "config_show":True}) @@ -156,6 +156,8 @@ class UserBase: return self.default_language def check_visibility(self, value): + if value == constants.SIDEBAR_RECENT: + return True return constants.has_flag(self.sidebar_view, value) def show_detail_random(self):