merge remote
This commit is contained in:
+31
-15
@@ -7,6 +7,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h2>{{_('Users')}}</h2>
|
||||
{% if allUser.__len__() < 10 %}
|
||||
<table class="table table-striped" id="table_user">
|
||||
<tr>
|
||||
<th>{{_('Username')}}</th>
|
||||
@@ -25,7 +26,7 @@
|
||||
{% for user in allUser %}
|
||||
{% if not user.role_anonymous() or config.config_anonbrowse %}
|
||||
<tr>
|
||||
<td><a href="{{url_for('admin.edit_user', user_id=user.id)}}">{{user.nickname}}</a></td>
|
||||
<td><a href="{{url_for('admin.edit_user', user_id=user.id)}}">{{user.name}}</a></td>
|
||||
<td>{{user.email}}</td>
|
||||
<td>{{user.kindle_mail}}</td>
|
||||
<td>{{user.downloads.count()}}</td>
|
||||
@@ -41,6 +42,8 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
<a class="btn btn-default" id="admin_user_table" href="{{url_for('admin.edit_user_table')}}">{{_('Edit Users')}}</a>
|
||||
<a class="btn btn-default" id="admin_new_user" href="{{url_for('admin.new_user')}}">{{_('Add New User')}}</a>
|
||||
{% if (config.config_login_type == 1) %}
|
||||
<div class="btn btn-default" id="import_ldap_users" data-toggle="modal" data-target="#StatusDialog">{{_('Import LDAP Users')}}</div>
|
||||
@@ -52,29 +55,42 @@
|
||||
<div class="col">
|
||||
<h2>{{_('E-mail Server Settings')}}</h2>
|
||||
{% if config.get_mail_server_configured() %}
|
||||
<div class="col-xs-12 col-sm-12">
|
||||
<div class="row">
|
||||
{% if email.mail_server_type == 0 %}
|
||||
<div class="col-xs-12 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('SMTP Hostname')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_server}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('SMTP Port')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_port}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('Encryption')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{ display_bool_setting(email.mail_use_ssl) }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('SMTP Login')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_login}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('From E-mail')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_from}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('SMTP Login')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_login}}</div>
|
||||
{% else %}
|
||||
<div class="col-xs-12 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('E-Mail Service')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{_('Gmail via Oauth2')}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('From E-mail')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_gmail_token['email']}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-3">{{_('From E-mail')}}</div>
|
||||
<div class="col-xs-6 col-sm-3">{{email.mail_from}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a class="btn btn-default emailconfig" id="admin_edit_email" href="{{url_for('admin.edit_mailsettings')}}">{{_('Edit E-mail Server Settings')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<label for="autoupdate_titlesort">{{_('Update Title Sort automatically')}}</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="checkbox" id="autoupdate_autorsort" name="autoupdate_autorsort" checked>
|
||||
<label for="autoupdate_autorsort">{{_('Update Author Sort automatically')}}</label>
|
||||
<input type="checkbox" id="autoupdate_authorsort" name="autoupdate_authorsort" checked>
|
||||
<label for="autoupdate_authorsort">{{_('Update Author Sort automatically')}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
{{ text_table_row('languages', _('Enter Languages'),_('Languages'), false) }}
|
||||
<!--th data-field="pubdate" data-type="date" data-visible="{{visiblility.get('pubdate')}}" data-viewformat="dd.mm.yyyy" id="pubdate" data-sortable="true">{{_('Publishing Date')}}</th-->
|
||||
{{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false) }}
|
||||
{% if g.user.role_edit() %}
|
||||
{% if g.user.role_delete_books() and g.user.role_edit()%}
|
||||
<th data-align="right" data-formatter="EbookActions" data-switchable="false">{{_('Delete')}}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
@@ -94,6 +94,4 @@
|
||||
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table-editable.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-editable.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/table.js') }}"></script>
|
||||
<script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -141,8 +141,8 @@
|
||||
<input type="checkbox" name="Show_detail_random" id="Show_detail_random" {% if conf.show_detail_random() %}checked{% endif %}>
|
||||
<label for="Show_detail_random">{{_('Show Random Books in Detail View')}}</label>
|
||||
</div>
|
||||
<a href="#" id="get_tags" class="btn btn-default" data-toggle="modal" data-target="#restrictModal">{{_('Add Allowed/Denied Tags')}}</a>
|
||||
<a href="#" id="get_column_values" class="btn btn-default" data-toggle="modal" data-target="#restrictModal">{{_('Add Allowed/Denied custom column values')}}</a>
|
||||
<a href="#" id="get_tags" data-id="0" class="btn btn-default" data-toggle="modal" data-target="#restrictModal">{{_('Add Allowed/Denied Tags')}}</a>
|
||||
<a href="#" id="get_column_values" data-id="0" class="btn btn-default" data-toggle="modal" data-target="#restrictModal">{{_('Add Allowed/Denied custom column values')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,44 +7,66 @@
|
||||
<div class="discover">
|
||||
<h1>{{title}}</h1>
|
||||
<form role="form" class="col-md-10 col-lg-6" method="POST">
|
||||
{% if feature_support['gmail'] %}
|
||||
<div class="form-group">
|
||||
<label for="mail_server">{{_('SMTP Hostname')}}</label>
|
||||
<input type="text" class="form-control" name="mail_server" id="mail_server" value="{{content.mail_server}}" required>
|
||||
<label for="mail_server_type">{{_('Choose Server Type')}}</label>
|
||||
<select name="mail_server_type" id="config_email_type" class="form-control" data-control="email-settings">
|
||||
<option value="0" {% if content.mail_server_type == 0 %}selected{% endif %}>{{_('Use Standard E-Mail Account')}}</option>
|
||||
<option value="1" {% if content.mail_server_type == 1 %}selected{% endif %}>{{_('G-Mail Account with OAuth2 Verfification')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_port">{{_('SMTP Port')}}</label>
|
||||
<input type="number" min="1" max="65535" step="1" class="form-control" name="mail_port" id="mail_port" value="{% if content.mail_port != None %}{{ content.mail_port }}{% endif %}" autocomplete="off" required>
|
||||
<div data-related="email-settings-1">
|
||||
<div class="form-group">
|
||||
{% if content.mail_gmail_token == {} %}
|
||||
<button type="submit" id="gmail_server" name="gmail" value="submit" class="btn btn-default">{{_('Setup Gmail Account as E-Mail Server')}}</button>
|
||||
{% else %}
|
||||
<button type="submit" id="invalidate_server" name="invalidate" value="submit" class="btn btn-danger">{{_('Revoke G-Mail Access')}}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_use_ssl">{{_('Encryption')}}</label>
|
||||
<select name="mail_use_ssl" id="mail_use_ssl" class="form-control">
|
||||
<option value="0" {% if content.mail_use_ssl == 0 %}selected{% endif %}>{{ _('None') }}</option>
|
||||
<option value="1" {% if content.mail_use_ssl == 1 %}selected{% endif %}>{{ _('STARTTLS') }}</option>
|
||||
<option value="2" {% if content.mail_use_ssl == 2 %}selected{% endif %}>{{ _('SSL/TLS') }}</option>
|
||||
</select>
|
||||
<div data-related="email-settings-0">
|
||||
{% endif %}
|
||||
<div class="form-group">
|
||||
<label for="mail_server">{{_('SMTP Hostname')}}</label>
|
||||
<input type="text" class="form-control" name="mail_server" id="mail_server" value="{{content.mail_server}}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_port">{{_('SMTP Port')}}</label>
|
||||
<input type="number" min="1" max="65535" step="1" class="form-control" name="mail_port" id="mail_port" value="{% if content.mail_port != None %}{{ content.mail_port }}{% endif %}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_use_ssl">{{_('Encryption')}}</label>
|
||||
<select name="mail_use_ssl" id="mail_use_ssl" class="form-control">
|
||||
<option value="0" {% if content.mail_use_ssl == 0 %}selected{% endif %}>{{ _('None') }}</option>
|
||||
<option value="1" {% if content.mail_use_ssl == 1 %}selected{% endif %}>{{ _('STARTTLS') }}</option>
|
||||
<option value="2" {% if content.mail_use_ssl == 2 %}selected{% endif %}>{{ _('SSL/TLS') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_login">{{_('SMTP Login')}}</label>
|
||||
<input type="text" class="form-control" name="mail_login" id="mail_login" value="{{content.mail_login}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_password">{{_('SMTP Password')}}</label>
|
||||
<input type="password" class="form-control" name="mail_password" id="mail_password" value="{{content.mail_password}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_from">{{_('From E-mail')}}</label>
|
||||
<input type="text" class="form-control" name="mail_from" id="mail_from" value="{{content.mail_from}}" required>
|
||||
</div>
|
||||
<label for="mail_size">{{_('Attachment Size Limit')}}</label>
|
||||
<div class="form-group input-group">
|
||||
<input type="number" min="1" max="600" step="1" class="form-control" name="mail_size" id="mail_size" value="{% if content.mail_size != None %}{{ (content.mail_size / 1024 / 1024)|int }}{% endif %}" required>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" id="attachement_size" class="btn btn-default" disabled>MB</button>
|
||||
</span>
|
||||
</div>
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-default">{{_('Save')}}</button>
|
||||
<button type="submit" name="test" value="test" class="btn btn-default">{{_('Save and Send Test E-mail')}}</button>
|
||||
{% if feature_support['gmail'] %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_login">{{_('SMTP Login')}}</label>
|
||||
<input type="text" class="form-control" name="mail_login" id="mail_login" value="{{content.mail_login}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_password">{{_('SMTP Password')}}</label>
|
||||
<input type="password" class="form-control" name="mail_password" id="mail_password" value="{{content.mail_password}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mail_from">{{_('From E-mail')}}</label>
|
||||
<input type="text" class="form-control" name="mail_from" id="mail_from" value="{{content.mail_from}}" required>
|
||||
</div>
|
||||
<label for="mail_size">{{_('Attachment Size Limit')}}</label>
|
||||
<div class="form-group input-group">
|
||||
<input type="number" min="1" max="600" step="1" class="form-control" name="mail_size" id="mail_size" value="{% if content.mail_size != None %}{{ (content.mail_size / 1024 / 1024)|int }}{% endif %}" required>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" id="attachement_size" class="btn btn-default" disabled>MB</button>
|
||||
</span>
|
||||
</div>
|
||||
<button type="submit" name="submit" value="submit" class="btn btn-default">{{_('Save')}}</button>
|
||||
<button type="submit" name="test" value="test" class="btn btn-default">{{_('Save and Send Test E-mail')}}</button>
|
||||
<a href="{{ url_for('admin.admin') }}" id="back" class="btn btn-default">{{_('Cancel')}}</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('admin.admin') }}" id="back" class="btn btn-default">{{_('Back')}}</a>
|
||||
</form>
|
||||
{% if g.allow_registration %}
|
||||
<div class="col-md-10 col-lg-6">
|
||||
|
||||
@@ -84,4 +84,11 @@
|
||||
<link rel="subsection" type="application/atom+xml;profile=opds-catalog" href="{{url_for(folder, book_id=entry.id)}}"/>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
{% for entry in letterelements %}
|
||||
<entry>
|
||||
<title>{{entry['name']}}</title>
|
||||
<id>{{ url_for(folder, book_id=entry['id']) }}</id>
|
||||
<link rel="subsection" type="application/atom+xml;profile=opds-catalog" href="{{url_for(folder, book_id=entry['id'])}}"/>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<button id="sort_name" class="btn btn-primary"><b>B,A <-> A B</b></button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button id="desc" data-id="series" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>
|
||||
<button id="asc" data-id="series" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>
|
||||
<button id="asc" data-id="series" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>
|
||||
<button id="desc" data-id="series" data-order="{{ order }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>
|
||||
{% if charlist|length %}
|
||||
<button id="all" class="btn btn-primary">{{_('All')}}</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
<name>{{instance}}</name>
|
||||
<uri>https://github.com/janeczku/calibre-web</uri>
|
||||
</author>
|
||||
<entry>
|
||||
<title>{{_('Alphabetical Books')}}</title>
|
||||
<link href="{{url_for('opds.feed_booksindex')}}" type="application/atom+xml;profile=opds-catalog"/>
|
||||
<id>{{url_for('opds.feed_booksindex')}}</id>
|
||||
<updated>{{ current_time }}</updated>
|
||||
<content type="text">{{_('Books sorted alphabetically')}}</content>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>{{_('Hot Books')}}</title>
|
||||
<link href="{{url_for('opds.feed_hot')}}" type="application/atom+xml;profile=opds-catalog"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% from 'modal_dialogs.html' import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal %}
|
||||
{% from 'modal_dialogs.html' import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ g.user.locale }}">
|
||||
<head>
|
||||
@@ -76,7 +76,7 @@
|
||||
{% if g.user.role_admin() %}
|
||||
<li><a id="top_admin" data-text="{{_('Settings')}}" href="{{url_for('admin.admin')}}"><span class="glyphicon glyphicon-dashboard"></span> <span class="hidden-sm">{{_('Admin')}}</span></a></li>
|
||||
{% endif %}
|
||||
<li><a id="top_user" data-text="{{_('Account')}}" href="{{url_for('web.profile')}}"><span class="glyphicon glyphicon-user"></span> <span class="hidden-sm">{{g.user.nickname}}</span></a></li>
|
||||
<li><a id="top_user" data-text="{{_('Account')}}" href="{{url_for('web.profile')}}"><span class="glyphicon glyphicon-user"></span> <span class="hidden-sm">{{g.user.name}}</span></a></li>
|
||||
{% if not g.user.is_anonymous %}
|
||||
<li><a id="logout" href="{{url_for('web.logout')}}"><span class="glyphicon glyphicon-log-out"></span> <span class="hidden-sm">{{_('Logout')}}</span></a></li>
|
||||
{% endif %}
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<button id="sort_name" class="btn btn-primary"><b>B,A <-> A B</b></button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<button id="desc" data-id="{{ data }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>
|
||||
<button id="asc" data-id="{{ data }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>
|
||||
<button id="asc" data-order="{{ order }}" data-id="{{ data }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>
|
||||
<button id="desc" data-id="{{ data }}" class="btn btn-primary"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>
|
||||
{% if charlist|length %}
|
||||
<button id="all" class="btn btn-primary">{{_('All')}}</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<form id="add_restriction" action="" method="POST">
|
||||
<div class="form-group required">
|
||||
<label for="add_element">{{_('Add View Restriction')}}</label>
|
||||
<input type="text" class="form-control" name="add_element" id="add_element" >
|
||||
<input type="text" class="form-control" name="add_element" id="add_element">
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<input type="button" class="btn btn-default" value="{{_('Allow')}}" name="submit_allow" id="submit_allow" data-dismiss="static">
|
||||
@@ -108,13 +108,31 @@
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-danger text-center">
|
||||
<span id="header"></span>
|
||||
<span id="header-GeneralDeleteModal"></span>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<span id="text"></span>
|
||||
<span id="text-GeneralDeleteModal"></span>
|
||||
<p></p>
|
||||
<button id="btnConfirmYes" type="button" class="btn btn btn-danger">{{_('Delete')}}</button>
|
||||
<button id="btnConfirmNo" type="button" class="btn btn-default">{{_('Cancel')}}</button>
|
||||
<button id="btnConfirmYes-GeneralDeleteModal" type="button" class="btn btn btn-danger">{{_('Delete')}}</button>
|
||||
<button id="btnConfirmNo-GeneralDeleteModal" type="button" class="btn btn-default">{{_('Cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro change_confirm_modal() %}
|
||||
<div id="GeneralChangeModal" class="modal fade" role="Dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-info text-center">
|
||||
<span id="header-GeneralChangeModal"></span>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<span id="text-GeneralChangeModal"></span>
|
||||
<p></p>
|
||||
<button id="btnConfirmYes-GeneralChangeModal" type="button" class="btn btn btn-default">{{_('Ok')}}</button>
|
||||
<button id="btnConfirmNo-GeneralChangeModal" type="button" class="btn btn-default">{{_('Cancel')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<form method="POST" role="form">
|
||||
{% if not config.config_register_email %}
|
||||
<div class="form-group required">
|
||||
<label for="nickname">{{_('Username')}}</label>
|
||||
<input type="text" class="form-control" id="nickname" name="nickname" placeholder="{{_('Choose a username')}}" required>
|
||||
<label for="name">{{_('Username')}}</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="{{_('Choose a username')}}" required>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-group required">
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<h1>{{title}}</h1>
|
||||
<form role="form" method="POST" autocomplete="off">
|
||||
<div class="col-md-10 col-lg-8">
|
||||
{% if new_user or ( g.user and content.nickname != "Guest" and g.user.role_admin() ) %}
|
||||
{% if new_user or ( g.user and content.name != "Guest" and g.user.role_admin() ) %}
|
||||
<div class="form-group required">
|
||||
<label for="nickname">{{_('Username')}}</label>
|
||||
<input type="text" class="form-control" name="nickname" id="nickname" value="{{ content.nickname if content.nickname != None }}" autocomplete="off">
|
||||
<label for="name">{{_('Username')}}</label>
|
||||
<input type="text" class="form-control" name="name" id="name" value="{{ content.name if content.name != None }}" autocomplete="off">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-group">
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
{% extends "layout.html" %}
|
||||
{% macro user_table_row(parameter, edit_text, show_text, validate, button=False, id=0) -%}
|
||||
<th data-field="{{ parameter }}" id="{{ parameter }}"
|
||||
data-name="{{ parameter }}"
|
||||
data-visible="{{visiblility.get(parameter)}}"
|
||||
data-editable-type="text"
|
||||
data-editable-url="{{ url_for('admin.edit_list_user', param=parameter)}}"
|
||||
data-editable-title="{{ edit_text }}"
|
||||
data-edit="true"
|
||||
{% if not button %}
|
||||
data-sortable="true"
|
||||
{% endif %}
|
||||
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}"{% endif %}>
|
||||
{% if button %}
|
||||
<!--div><button data-id="{{id}}" data-toggle="modal" data-target="#restrictModal" class="btn btn-default button_head disabled" aria-disabled="true">{{edit_text}}</button></div--><br>
|
||||
{% endif %}
|
||||
{{ show_text }}
|
||||
</th>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro user_checkbox_row(parameter, array_field, show_text, element, value) -%}
|
||||
<th data-name="{{array_field}}" data-field="{{parameter}}"
|
||||
data-visible="{{element.get(array_field)}}"
|
||||
data-column="{{value.get(array_field)}}"
|
||||
data-formatter="checkboxFormatter">
|
||||
<div class="form-check">
|
||||
<label>
|
||||
<input type="radio" class="check_head" name="options_{{array_field}}" onchange="checkboxHeader('false', '{{parameter}}', {{value.get(array_field)}})" disabled>{{_('Deny')}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label>
|
||||
<input type="radio" class="check_head" name="options_{{array_field}}" onchange="checkboxHeader('true', '{{parameter}}', {{value.get(array_field)}})" disabled>{{_('Allow')}}
|
||||
</label>
|
||||
</div>
|
||||
{{show_text}}
|
||||
</th>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro user_select_languages(parameter, url, show_text, validate) -%}
|
||||
<th data-field="{{ parameter }}" id="{{ parameter }}"
|
||||
data-name="{{ parameter }}"
|
||||
data-visible="{{visiblility.get(parameter)}}"
|
||||
data-editable-type="select"
|
||||
data-edit="true"
|
||||
data-sortable="true"
|
||||
data-editable-url="{{ url_for('admin.edit_list_user', param=parameter)}}"
|
||||
data-editable-source={{url}}
|
||||
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}"{% endif %}>
|
||||
<div>
|
||||
<select id="select_{{ parameter }}" class="header_select" onchange="selectHeader(this, '{{parameter}}')" disabled="">
|
||||
<option value="all">{{ _('Show All') }}</option>
|
||||
{% for language in languages %}
|
||||
<option value="{{language.lang_code}}">{{language.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div><br>
|
||||
|
||||
{{ show_text }}
|
||||
</th>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro user_select_translations(parameter, url, show_text, validate) -%}
|
||||
<th data-field="{{ parameter }}" id="{{ parameter }}"
|
||||
data-name="{{ parameter }}"
|
||||
data-visible="{{visiblility.get(parameter)}}"
|
||||
data-editable-type="select"
|
||||
data-edit="true"
|
||||
data-sortable="true"
|
||||
data-editable-url="{{ url_for('admin.edit_list_user', param=parameter)}}"
|
||||
data-editable-source={{url}}
|
||||
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}"{% endif %}>
|
||||
<div>
|
||||
<select id="select_{{ parameter }}" class="header_select" onchange="selectHeader(this, '{{parameter}}')" disabled="">
|
||||
<option value="None">{{_('Select...')}}</option>
|
||||
{% for translation in translations %}
|
||||
<option value="{{translation}}">{{translation.display_name|capitalize}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div><br>
|
||||
{{ show_text }}
|
||||
</th>
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
{% block header %}
|
||||
<link href="{{ url_for('static', filename='css/libs/bootstrap-table.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='css/libs/bootstrap-editable.css') }}" rel="stylesheet">
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<h2 class="{{page}}">{{_(title)}}</h2>
|
||||
<div class="col-xs-12 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="btn btn-default disabled" id="user_delete_selection" aria-disabled="true">{{_('Remove Selections')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="user-table" class="table table-no-bordered table-striped"
|
||||
data-url="{{url_for('admin.list_users')}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-name="edit" data-buttontext="{{_('Edit User')}}" data-visible="{{visiblility.get('edit')}}" data-formatter="singleUserFormatter">{{_('Edit')}}</th>
|
||||
<th data-name="state" data-field="state" data-checkbox="true" data-visible="{{visiblility.get('state')}}" data-sortable="true"></th>
|
||||
<th data-name="id" data-field="id" id="id" data-visible="false" data-switchable="false"></th>
|
||||
{{ user_table_row('name', _('Enter Username'), _('Username'), true) }}
|
||||
{{ user_table_row('email', _('Enter E-mail Address'), _('E-mail Address'), true) }}
|
||||
{{ user_table_row('kindle_mail', _('Enter Kindle E-mail Address'), _('Kindle E-mail'), false) }}
|
||||
{{ user_select_translations('locale', url_for('admin.table_get_locale'), _('Locale'), true) }}
|
||||
{{ user_select_languages('default_language', url_for('admin.table_get_default_lang'), _('Visible Book Languages'), true) }}
|
||||
{{ user_table_row('denied_tags', _("Edit Denied Tags"), _("Denied Tags"), false, true, 0) }}
|
||||
{{ user_table_row('allowed_tags', _("Edit Allowed Tags"), _("Allowed Tags"), false, true, 1) }}
|
||||
{{ user_table_row('allowed_column_value', _("Edit Allowed Column Values"), _("Allowed Column Values"), false, true, 2) }}
|
||||
{{ user_table_row('denied_column_value', _("Edit Denied Column Values"), _("Denied Columns Values"), false, true, 3) }}
|
||||
{{ user_checkbox_row("role", "admin_role", _('Admin'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "download_role",_('Upload'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "upload_role", _('Download'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "edit_role", _('Edit'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "passwd_role", _('Change Password'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "edit_shelf_role", _('Edit Public Shelfs'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "delete_role", _('Delete'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("role", "viewer_role", _('View'), visiblility, all_roles)}}
|
||||
{{ user_checkbox_row("sidebar_view", "detail_random", _('Show Random Books in Detail View'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_language", _('Show language selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_series", _('Show series selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_category", _('Show category selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_random", _('Show random books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_author", _('Show author selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_best_rated", _('Show Top Rated Books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_read_and_unread", _('Show random books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_publisher", _('Show publisher selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_rating", _('Show ratings selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_format", _('Show file formats selection'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_archived", _('Show archived books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_download", _('Show Downloaded Books'), visiblility, sidebar_settings)}}
|
||||
{{ user_checkbox_row("sidebar_view", "sidebar_list", _('Show Books List'), visiblility, sidebar_settings)}}
|
||||
<th data-align="right" data-formatter="UserActions" data-switchable="false"><div><div class="btn btn-default button_head disabled" aria-disabled="true">{{_('Delete User')}}</div></div><br>{{_('Delete User')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{% endblock %}
|
||||
{% block modal %}
|
||||
{{ delete_confirm_modal() }}
|
||||
{{ change_confirm_modal() }}
|
||||
{{ restrict_modal() }}
|
||||
{% endblock %}
|
||||
{% block js %}
|
||||
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table-editable.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-editable.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/table.js') }}"></script>
|
||||
<script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user