From e8ce88095e706abd8b6da40d3249e23aa030f967 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sat, 26 Jan 2019 19:06:54 +0100 Subject: [PATCH] Fix viewing Publisher settings for other users Fix Visiblilty of read/unread category --- cps/server.py | 2 +- cps/templates/user_edit.html | 4 +++- cps/web.py | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cps/server.py b/cps/server.py index da7b487c..0531a729 100644 --- a/cps/server.py +++ b/cps/server.py @@ -25,7 +25,7 @@ import signal import web try: - from gevent.piwsgi import WSGIServer + from gevent.pywsgi import WSGIServer from gevent.pool import Pool from gevent import __version__ as geventVersion gevent_present = True diff --git a/cps/templates/user_edit.html b/cps/templates/user_edit.html index f43cc36f..92685464 100644 --- a/cps/templates/user_edit.html +++ b/cps/templates/user_edit.html @@ -16,7 +16,7 @@ {% if ( g.user and g.user.role_passwd() or g.user.role_admin() ) and not content.role_anonymous() %} {% if g.user and g.user.role_admin() and g.allow_registration and not new_user and not profile %}
{{_('Reset user Password')}}
- {% else %} + {% else %}
@@ -85,10 +85,12 @@
+ {% if not content.role_anonymous() %}
+ {% endif %}
diff --git a/cps/web.py b/cps/web.py index 6870305a..92681da6 100644 --- a/cps/web.py +++ b/cps/web.py @@ -3280,6 +3280,11 @@ def edit_user(user_id): elif "show_sorted" not in to_save and content.show_sorted(): content.sidebar_view -= ub.SIDEBAR_SORTED + if "show_publisher" in to_save and not content.show_publisher(): + content.sidebar_view += ub.SIDEBAR_PUBLISHER + elif "show_publisher" not in to_save and content.show_publisher(): + content.sidebar_view -= ub.SIDEBAR_PUBLISHER + if "show_hot" in to_save and not content.show_hot_books(): content.sidebar_view += ub.SIDEBAR_HOT elif "show_hot" not in to_save and content.show_hot_books():