Fix #866 (Recent book sidebar element can't be removed anymore)

pull/1350/head
Ozzieisaacs 5 years ago
parent 01ff55c84e
commit fb18ab1ca5

@ -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):

Loading…
Cancel
Save