mirror of
https://github.com/janeczku/calibre-web.git
synced 2024-11-28 08:58:41 +02:00
206 lines
8.8 KiB
HTML
206 lines
8.8 KiB
HTML
{% extends "layout.html" %}
|
|
{% macro display_bool_setting(setting_value) -%}
|
|
{% if setting_value %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}
|
|
{%- endmacro %}
|
|
{% block body %}
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2>{{_('User list')}}</h2>
|
|
<table class="table table-striped" id="table_user">
|
|
<tr>
|
|
<th>{{_('Nickname')}}</th>
|
|
<th>{{_('E-mail')}}</th>
|
|
<th>{{_('Kindle')}}</th>
|
|
<th>{{_('DLS')}}</th>
|
|
<th class="hidden-xs">{{_('Admin')}}</th>
|
|
<th class="hidden-xs">{{_('Download')}}</th>
|
|
<th class="hidden-xs">{{_('View Ebooks')}}</th>
|
|
<th class="hidden-xs">{{_('Upload')}}</th>
|
|
<th class="hidden-xs">{{_('Edit')}}</th>
|
|
</tr>
|
|
{% 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>{{user.email}}</td>
|
|
<td>{{user.kindle_mail}}</td>
|
|
<td>{{user.downloads.count()}}</td>
|
|
<td class="hidden-xs">{{ display_bool_setting(user.role_admin()) }}</td>
|
|
<td class="hidden-xs">{{ display_bool_setting(user.role_download()) }}</td>
|
|
<td class="hidden-xs">{{ display_bool_setting(user.role_viewer()) }}</td>
|
|
<td class="hidden-xs">{{ display_bool_setting(user.role_upload()) }}</td>
|
|
<td class="hidden-xs">{{ display_bool_setting(user.role_edit()) }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
<div class="btn btn-default" id="admin_new_user"><a href="{{url_for('admin.new_user')}}">{{_('Add new user')}}</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2>{{_('SMTP e-mail server settings')}}</h2>
|
|
<table class="table table-striped" id="table_email">
|
|
<tr>
|
|
<th>{{_('SMTP hostname')}}</th>
|
|
<th>{{_('SMTP port')}}</th>
|
|
<th>{{_('SSL')}}</th>
|
|
<th>{{_('SMTP login')}}</th>
|
|
<th class="hidden-xs">{{_('From mail')}}</th>
|
|
</tr>
|
|
<tr>
|
|
<td>{{email.mail_server}}</td>
|
|
<td>{{email.mail_port}}</td>
|
|
<td>{% if email.mail_use_ssl %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
|
<td>{{email.mail_login}}</td>
|
|
<td class="hidden-xs">{{email.mail_from}}</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn btn-default" id="admin_edit_email"><a href="{{url_for('admin.edit_mailsettings')}}">{{_('Change SMTP settings')}}</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2>{{_('Configuration')}}</h2>
|
|
<div class="col-xs-12 col-sm-6">
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-6">{{_('Calibre DB dir')}}</div>
|
|
<div class="col-xs-6 col-sm-6">{{config.config_calibre_dir}}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-6">{{_('Log level')}}</div>
|
|
<div class="col-xs-6 col-sm-6">{{config.get_log_level()}}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-6">{{_('Port')}}</div>
|
|
<div class="col-xs-6 col-sm-6">{{config.config_port}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-6">
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Books per page')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{config.config_books_per_page}}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Uploading')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{ display_bool_setting(config.config_uploading) }}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Anonymous browsing')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{ display_bool_setting(config.config_anonbrowse) }}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Public registration')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{ display_bool_setting(config.config_public_reg) }}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Remote login')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{ display_bool_setting(config.config_remote_login) }}</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Reverse proxy login')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{ display_bool_setting(config.config_allow_reverse_proxy_header_login) }}</div>
|
|
</div>
|
|
{% if config.config_allow_reverse_proxy_header_login %}
|
|
<div class="row">
|
|
<div class="col-xs-6 col-sm-7">{{_('Reverse proxy header name')}}</div>
|
|
<div class="col-xs-6 col-sm-5">{{ config.config_reverse_proxy_login_header_name }}</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="btn btn-default"><a id="basic_config" href="{{url_for('admin.configuration')}}">{{_('Basic Configuration')}}</a></div>
|
|
<div class="btn btn-default"><a id="view_config" href="{{url_for('admin.view_configuration')}}">{{_('UI Configuration')}}</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2>{{_('Administration')}}</h2>
|
|
<div class="btn btn-default"><a id="logfile" href="{{url_for('admin.view_logfile')}}">{{_('View Logfiles')}}</a></div>
|
|
<div class="btn btn-default" id="restart_database">{{_('Reconnect to Calibre DB')}}</div>
|
|
<div class="btn btn-default" id="admin_restart" data-toggle="modal" data-target="#RestartDialog">{{_('Restart Calibre-Web')}}</div>
|
|
<div class="btn btn-default" id="admin_stop" data-toggle="modal" data-target="#ShutdownDialog">{{_('Stop Calibre-Web')}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2>{{_('Update')}}</h2>
|
|
<table class="table table-striped" id="update_table">
|
|
<thead>
|
|
<tr>
|
|
<th class="col-xs-3">{{_('Version')}}</th>
|
|
<th class="col-xl-8">{{_('Details')}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="current_version">
|
|
<td>{{commit}} </td>
|
|
<td><i>{{_('Current version')}}</i></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="hidden" id="update_error"> <span>{{update_error}}</span></div>
|
|
<div class="btn btn-default" id="check_for_update">{{_('Check for update')}}</div>
|
|
<div class="btn btn-default hidden" id="perform_update" data-toggle="modal" data-target="#UpdateprogressDialog">{{_('Perform Update')}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal -->
|
|
<div id="RestartDialog" class="modal fade" role="dialog">
|
|
<div class="modal-dialog modal-sm">
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-info"></div>
|
|
<div class="modal-body text-center">
|
|
<p>{{_('Do you really want to restart Calibre-Web?')}}</p>
|
|
<div id="spinner" class="spinner" style="display:none;">
|
|
<img id="img-spinner" src="{{ url_for('static', filename='css/libs/images/loading-icon.gif') }}"/>
|
|
</div>
|
|
<p></p>
|
|
<button type="button" class="btn btn-default" id="restart" >{{_('Ok')}}</button>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{_('Back')}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="ShutdownDialog" class="modal fade" role="dialog">
|
|
<div class="modal-dialog modal-sm">
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-info">
|
|
</div>
|
|
<div class="modal-body text-center">
|
|
<p>{{_('Do you really want to stop Calibre-Web?')}}</p>
|
|
<button type="button" class="btn btn-default" id="shutdown" data-dismiss="modal">{{_('Ok')}}</button>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{_('Back')}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="UpdateprogressDialog" class="modal fade" role="dialog">
|
|
<div class="modal-dialog modal-sm">
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-info text-center">
|
|
<span>{{_('Updating, please do not reload page')}}</span>
|
|
</div>
|
|
<div class="modal-body text-center">
|
|
<div id="spinner2" class="spinner2" style="display:none;">
|
|
<img id="img-spinner2" src="{{ url_for('static', filename='css/libs/images/loading-icon.gif') }}"/>
|
|
</div>
|
|
<p></p>
|
|
<div id="Updatecontent"></div>
|
|
<p></p>
|
|
<button type="button" class="btn btn-default hidden" id="updateFinished" data-dismiss="modal">{{_('Ok')}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|