diff --git a/cps/admin.py b/cps/admin.py
index 447e0227..1004ee78 100644
--- a/cps/admin.py
+++ b/cps/admin.py
@@ -1493,7 +1493,7 @@ def _handle_edit_user(to_save, content, languages, translations, kobo_support):
content.role &= ~constants.ROLE_ANONYMOUS
val = [int(k[5:]) for k in to_save if k.startswith('show_')]
- sidebar = get_sidebar_config()
+ sidebar, __ = get_sidebar_config()
for element in sidebar:
value = element['visibility']
if value in val and not content.check_visibility(value):
diff --git a/cps/render_template.py b/cps/render_template.py
index 09a32497..91118049 100644
--- a/cps/render_template.py
+++ b/cps/render_template.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-from flask import render_template
+from flask import render_template, request
from flask_babel import gettext as _
from flask import g
from werkzeug.local import LocalProxy
@@ -30,6 +30,7 @@ log = logger.create()
def get_sidebar_config(kwargs=None):
kwargs = kwargs or []
+ simple = bool([e for e in ['kindle', 'tolino', "kobo"] if (e in request.headers.get('User-Agent', "").lower())])
if 'content' in kwargs:
content = kwargs['content']
content = isinstance(content, (User, LocalProxy)) and not content.role_anonymous()
@@ -93,12 +94,12 @@ def get_sidebar_config(kwargs=None):
{"glyph": "glyphicon-trash", "text": _('Archived Books'), "link": 'web.books_list', "id": "archived",
"visibility": constants.SIDEBAR_ARCHIVED, 'public': (not g.user.is_anonymous), "page": "archived",
"show_text": _('Show archived books'), "config_show": content})
- sidebar.append(
- {"glyph": "glyphicon-th-list", "text": _('Books List'), "link": 'web.books_table', "id": "list",
- "visibility": constants.SIDEBAR_LIST, 'public': (not g.user.is_anonymous), "page": "list",
- "show_text": _('Show Books List'), "config_show": content})
-
- return sidebar
+ if not simple:
+ sidebar.append(
+ {"glyph": "glyphicon-th-list", "text": _('Books List'), "link": 'web.books_table', "id": "list",
+ "visibility": constants.SIDEBAR_LIST, 'public': (not g.user.is_anonymous), "page": "list",
+ "show_text": _('Show Books List'), "config_show": content})
+ return sidebar, simple
def get_readbooks_ids():
if not config.config_read_column:
@@ -116,7 +117,7 @@ def get_readbooks_ids():
# Returns the template for rendering and includes the instance name
def render_title_template(*args, **kwargs):
- sidebar = get_sidebar_config(kwargs)
- return render_template(instance=config.config_calibre_web_title, sidebar=sidebar,
+ sidebar, simple = get_sidebar_config(kwargs)
+ return render_template(instance=config.config_calibre_web_title, sidebar=sidebar, simple=simple,
accept=constants.EXTENSIONS_UPLOAD, read_book_ids=get_readbooks_ids(),
*args, **kwargs)
diff --git a/cps/templates/admin.html b/cps/templates/admin.html
index 6cd7815e..c8c6eb82 100644
--- a/cps/templates/admin.html
+++ b/cps/templates/admin.html
@@ -47,7 +47,9 @@
{% endfor %}
{% endif %}
- {{_('Edit Users')}}
+ {% if not simple %}
+ {{_('Edit Users')}}
+ {% endif %}
{{_('Add New User')}}
{% if (config.config_login_type == 1) %}
{{_('Import LDAP Users')}}
diff --git a/cps/templates/book_exists_flash.html b/cps/templates/book_exists_flash.html
index b0855120..b55192ce 100644
--- a/cps/templates/book_exists_flash.html
+++ b/cps/templates/book_exists_flash.html
@@ -1,3 +1,3 @@
-
+
{{entry.title|shortentitle}}
-
\ No newline at end of file
+
diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html
index 1dc02a5e..e4fea44d 100644
--- a/cps/templates/config_view_edit.html
+++ b/cps/templates/config_view_edit.html
@@ -162,8 +162,10 @@
+ {% if not simple %}
{{_('Add Allowed/Denied Tags')}}
{{_('Add Allowed/Denied custom column values')}}
+ {% endif %}
diff --git a/cps/templates/discover.html b/cps/templates/discover.html
index 852d6210..900dad8c 100644
--- a/cps/templates/discover.html
+++ b/cps/templates/discover.html
@@ -7,7 +7,7 @@