Fix #866 (Recent book sidebar element can't be removed anymore)
This commit is contained in:
parent
01ff55c84e
commit
fb18ab1ca5
|
@ -60,7 +60,7 @@ def get_sidebar_config(kwargs=None):
|
||||||
sidebar = list()
|
sidebar = list()
|
||||||
sidebar.append({"glyph": "glyphicon-book", "text": _('Recently Added'), "link": 'web.index', "id": "new",
|
sidebar.append({"glyph": "glyphicon-book", "text": _('Recently Added'), "link": 'web.index', "id": "new",
|
||||||
"visibility": constants.SIDEBAR_RECENT, 'public': True, "page": "root",
|
"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",
|
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'),
|
"visibility": constants.SIDEBAR_HOT, 'public': True, "page": "hot", "show_text": _('Show Hot Books'),
|
||||||
"config_show":True})
|
"config_show":True})
|
||||||
|
@ -156,6 +156,8 @@ class UserBase:
|
||||||
return self.default_language
|
return self.default_language
|
||||||
|
|
||||||
def check_visibility(self, value):
|
def check_visibility(self, value):
|
||||||
|
if value == constants.SIDEBAR_RECENT:
|
||||||
|
return True
|
||||||
return constants.has_flag(self.sidebar_view, value)
|
return constants.has_flag(self.sidebar_view, value)
|
||||||
|
|
||||||
def show_detail_random(self):
|
def show_detail_random(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user