mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-15 22:34:56 +00:00
Fix issues with send permission and custom page styling
This commit is contained in:
parent
f20b0f3064
commit
0f3bfdda79
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,6 +29,7 @@ cps/cache
|
||||
*.bak
|
||||
*.log.*
|
||||
.key
|
||||
.venv
|
||||
|
||||
settings.yaml
|
||||
gdrive_credentials
|
||||
|
@ -1981,7 +1981,7 @@ def _handle_edit_user(to_save, content, languages, translations, kobo_support):
|
||||
return redirect(url_for('admin.admin'))
|
||||
|
||||
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):
|
||||
|
@ -7944,3 +7944,27 @@ div.comments[data-readmore] {
|
||||
transition: height 300ms;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
div.col-sm-10 > h2.book_table, div.col-sm-10 > a.session {
|
||||
padding-left: 40px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
div.col-sm-10 > h2.book_table {
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.col-sm-10 > table.table {
|
||||
margin-left: 40px;
|
||||
width: calc(100% - 50px);
|
||||
}
|
||||
|
||||
div.col-sm-10 > div.custom_page {
|
||||
padding-left: 40px;
|
||||
padding-right: 10px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.col-sm-10 > div.custom_page > h2 {
|
||||
color: white;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<div>{{body|safe}}</div>
|
||||
<div class="custom_page">{{body|safe}}</div>
|
||||
{% endblock %}
|
||||
|
@ -100,6 +100,10 @@
|
||||
<input type="checkbox" name="download_role" id="download_role" {% if content.role_download() %}checked{% endif %}>
|
||||
<label for="download_role">{{_('Allow Downloads')}}</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="send_to_ereader" id="send_to_ereader" {% if content.role_send_to_ereader() %}checked{% endif %}>
|
||||
<label for="send_to_ereader">{{_('Allow Send to eReader')}}</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="viewer_role" id="viewer_role" {% if content.role_viewer() %}checked{% endif %}>
|
||||
<label for="viewer_role">{{_('Allow eBook Viewer')}}</label>
|
||||
|
@ -144,6 +144,7 @@
|
||||
{{ user_checkbox_row("role", "passwd_role", _('Change Password'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "upload_role",_('Upload'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "download_role", _('Download'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "send_to_ereader", _('Send to eReader'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "viewer_role", _('View'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "edit_role", _('Edit'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "delete_role", _('Delete'), visiblility, all_roles)}}
|
||||
|
@ -233,7 +233,7 @@ class User(UserBase, Base):
|
||||
id = Column(Integer, primary_key=True)
|
||||
name = Column(String(64), unique=True)
|
||||
email = Column(String(120), unique=True, default="")
|
||||
role = Column(SmallInteger, default=constants.ROLE_USER)
|
||||
role = Column(Integer, default=constants.ROLE_USER)
|
||||
password = Column(String)
|
||||
kindle_mail = Column(String(120), default="")
|
||||
shelf = relationship('Shelf', backref='user', lazy='dynamic', order_by='Shelf.name')
|
||||
@ -745,7 +745,7 @@ def migrate_Database(_session):
|
||||
conn.execute(text("CREATE TABLE user_id (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,"
|
||||
"name VARCHAR(64),"
|
||||
"email VARCHAR(120),"
|
||||
"role SMALLINT,"
|
||||
"role INTEGER,"
|
||||
"password VARCHAR,"
|
||||
"kindle_mail VARCHAR(120),"
|
||||
"locale VARCHAR(2),"
|
||||
|
Loading…
Reference in New Issue
Block a user