diff --git a/cps/admin.py b/cps/admin.py index 852ea5df..aee7fd09 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -529,7 +529,7 @@ def new_user(): content.locale = to_save["locale"] val = 0 - for key, _ in to_save.items(): + for key, __ in to_save.items(): if key.startswith('show'): val += int(key[5:]) content.sidebar_view = val diff --git a/cps/subproc_wrapper.py b/cps/subproc_wrapper.py index 64204a56..d8826111 100644 --- a/cps/subproc_wrapper.py +++ b/cps/subproc_wrapper.py @@ -37,6 +37,7 @@ def process_open(command, quotes=(), env=None, sout=subprocess.PIPE): else: if sys.version_info < (3, 0): exc_command = [x.encode(sys.getfilesystemencoding()) for x in command] + else: + exc_command = [x for x in command] - # return subprocess.Popen(exc_command, shell=False, stdout=subprocess.PIPE, universal_newlines=True, env=env) return subprocess.Popen(exc_command, shell=False, stdout=sout, universal_newlines=True, env=env) diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html index ff71aa8a..a6601a58 100644 --- a/cps/templates/config_view_edit.html +++ b/cps/templates/config_view_edit.html @@ -119,10 +119,12 @@
{% for element in sidebar %} -
+ {% if element['config_show'] %} +
-
+
+ {% endif %} {% endfor %}
diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 1c7d901b..5fd0871e 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -117,7 +117,7 @@ {% endif %} {% if entry.series|length > 0 %} -

{{_('Book')}} {{entry.series_index}} {{_('of')}} {{entry.series[0].name}}

+

{{_('Book')}} {{entry.series_index}} {{_('of')}} {{entry.series[0].name}}

{% endif %} {% if entry.languages.__len__() > 0 %} @@ -157,7 +157,7 @@ diff --git a/cps/templates/index.html b/cps/templates/index.html index 25c23106..ed86c8c6 100755 --- a/cps/templates/index.html +++ b/cps/templates/index.html @@ -4,7 +4,7 @@

{{_('Discover (Random Books)')}}

-web. {% for entry in random %} + {% for entry in random %}
diff --git a/cps/ub.py b/cps/ub.py index 421ad218..ce389cb8 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -105,7 +105,7 @@ def get_sidebar_config(kwargs=None): else: content = False else: - content = False + content = 'conf' in kwargs sidebar = list() sidebar.append({"glyph": "glyphicon-book", "text": _('Recently Added'), "link": 'web.index', "id": "new", "visibility": SIDEBAR_RECENT, 'public': True, "page": "root", diff --git a/cps/web.py b/cps/web.py index 37d8d6df..7f4289b5 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1209,7 +1209,6 @@ def token_verified(): @web.route("/me", methods=["GET", "POST"]) @login_required def profile(): - global _ downloads = list() languages = speaking_language() translations = babel.list_translations() + [LC('en')] @@ -1248,7 +1247,7 @@ def profile(): current_user.locale = to_save["locale"] val = 0 - for key, _ in to_save.items(): + for key, __ in to_save.items(): if key.startswith('show'): val += int(key[5:]) current_user.sidebar_view = val diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index 32ddf212..571c1fb1 100644 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -30,15 +30,15 @@
-

Start Time: 2019-02-10 12:10:31.096065

+

Start Time: 2019-05-12 18:51:22.511134

-

Stop Time: 2019-02-10 12:53:18.410539

+

Stop Time: 2019-05-12 19:42:21.577115

-

Duration: 0:42:47.314474

+

Duration: 0:50:59.065981

@@ -98,36 +98,19 @@ test_opds_feed.test_opds_feed 16 + 2 0 0 - 0 - 16 + 14
Detail - +
test_opds
- -
- SKIP -
- - - - + PASS @@ -221,28 +204,11 @@ - +
test_opds_guest_user
- -
- SKIP -
- - - - + PASS @@ -577,92 +543,97 @@ - + test_email_ssl.test_SSL_Python27 4 - 1 + 4 + 0 0 - 3 0 Detail - +
test_SSL_None_setup_error
- ERROR + PASS
-