2015-08-02 18:59:11 +00:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
2017-01-02 17:52:33 +00:00
|
|
|
<h2>{{_('User list')}}</h2>
|
2017-02-15 17:09:17 +00:00
|
|
|
<table class="table table-striped" id="table_user">
|
2015-08-02 18:59:11 +00:00
|
|
|
<tr>
|
2016-11-09 18:24:33 +00:00
|
|
|
<th>{{_('Nickname')}}</th>
|
|
|
|
<th>{{_('Email')}}</th>
|
|
|
|
<th>{{_('Kindle')}}</th>
|
|
|
|
<th>{{_('DLS')}}</th>
|
|
|
|
<th>{{_('Admin')}}</th>
|
|
|
|
<th>{{_('Download')}}</th>
|
|
|
|
<th>{{_('Upload')}}</th>
|
|
|
|
<th>{{_('Edit')}}</th>
|
|
|
|
<th>{{_('Passwd')}}</th>
|
2015-08-02 18:59:11 +00:00
|
|
|
</tr>
|
|
|
|
{% for user in content %}
|
2017-01-22 20:30:36 +00:00
|
|
|
{% if not user.role_anonymous() or config.config_anonbrowse %}
|
2015-08-02 18:59:11 +00:00
|
|
|
<tr>
|
|
|
|
<td><a href="{{url_for('edit_user', user_id=user.id)}}">{{user.nickname}}</a></td>
|
|
|
|
<td>{{user.email}}</td>
|
|
|
|
<td>{{user.kindle_mail}}</td>
|
|
|
|
<td>{{user.downloads.count()}}</td>
|
2016-04-27 08:35:23 +00:00
|
|
|
<td>{% if user.role_admin() %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
|
|
|
<td>{% if user.role_download() %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
|
|
|
<td>{% if user.role_upload() %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
|
|
|
<td>{% if user.role_edit() %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
2016-04-27 14:00:58 +00:00
|
|
|
<td>{% if user.role_passwd() %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
2017-01-12 19:43:36 +00:00
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2015-08-02 18:59:11 +00:00
|
|
|
{% endfor %}
|
2015-08-02 19:23:24 +00:00
|
|
|
</table>
|
2017-02-15 17:09:17 +00:00
|
|
|
<div class="btn btn-default" id="admin_new_user"><a href="{{url_for('new_user')}}">{{_('Add new user')}}</a></div>
|
2016-11-09 18:24:33 +00:00
|
|
|
<h2>{{_('SMTP mail settings')}}</h2>
|
2017-02-15 17:09:17 +00:00
|
|
|
<table class="table table-striped" id="table_email">
|
2015-08-02 19:23:24 +00:00
|
|
|
<tr>
|
2016-11-09 18:24:33 +00:00
|
|
|
<th>{{_('SMTP hostname')}}</th>
|
|
|
|
<th>{{_('SMTP port')}}</th>
|
|
|
|
<th>{{_('SSL')}}</th>
|
|
|
|
<th>{{_('SMTP login')}}</th>
|
|
|
|
<th>{{_('SMTP password')}}</th>
|
|
|
|
<th>{{_('From mail')}}</th>
|
2015-08-02 19:23:24 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>{{email.mail_server}}</td>
|
|
|
|
<td>{{email.mail_port}}</td>
|
2016-03-27 21:36:51 +00:00
|
|
|
<td>{% if email.mail_use_ssl %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
2015-08-02 19:23:24 +00:00
|
|
|
<td>{{email.mail_login}}</td>
|
|
|
|
<td>********</td>
|
|
|
|
<td>{{email.mail_from}}</td>
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2017-02-15 17:09:17 +00:00
|
|
|
<div class="btn btn-default" id="admin_edit_email"><a href="{{url_for('edit_mailsettings')}}">{{_('Change SMTP settings')}}</a></div>
|
2015-08-02 18:59:11 +00:00
|
|
|
|
2017-01-02 17:52:33 +00:00
|
|
|
<h2>{{_('Configuration')}}</h2>
|
2017-02-15 17:09:17 +00:00
|
|
|
<table class="table table-striped" id="table_configuration">
|
2017-01-02 17:52:33 +00:00
|
|
|
<tr>
|
2017-01-22 20:30:36 +00:00
|
|
|
<th>{{_('Calibre DB dir')}}</th>
|
2017-01-02 17:52:33 +00:00
|
|
|
<th>{{_('Log Level')}}</th>
|
|
|
|
<th>{{_('Port')}}</th>
|
|
|
|
<th>{{_('Books per page')}}</th>
|
|
|
|
<th>{{_('Uploading')}}</th>
|
|
|
|
<th>{{_('Public registration')}}</th>
|
|
|
|
<th>{{_('Anonymous browsing')}}</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2017-01-22 20:30:36 +00:00
|
|
|
<td>{{config.config_calibre_dir}}</td>
|
2017-01-28 19:54:31 +00:00
|
|
|
<td>{{config.get_Log_Level()}}</td>
|
2017-01-22 20:30:36 +00:00
|
|
|
<td>{{config.config_port}}</td>
|
|
|
|
<td>{{config.config_books_per_page}}</td>
|
|
|
|
<td>{% if config.config_uploading %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
|
|
|
<td>{% if config.config_public_reg %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
|
|
|
<td>{% if config.config_anonbrowse %}<span class="glyphicon glyphicon-ok"></span>{% else %}<span class="glyphicon glyphicon-remove"></span>{% endif %}</td>
|
2017-01-02 17:52:33 +00:00
|
|
|
</table>
|
2017-01-22 15:44:37 +00:00
|
|
|
<div class="btn btn-default"><a href="{{url_for('configuration')}}">{{_('Configuration')}}</a></div>
|
2017-01-02 17:52:33 +00:00
|
|
|
<h2>{{_('Administration')}}</h2>
|
2017-01-28 19:16:40 +00:00
|
|
|
{% if not development %}
|
2017-02-15 17:09:17 +00:00
|
|
|
<p>{{_('Current commit timestamp')}}: {{commit}} </p>
|
2017-01-22 15:44:37 +00:00
|
|
|
<div class="btn btn-default" data-toggle="modal" data-target="#RestartDialog">{{_('Restart Calibre-web')}}</a></div>
|
|
|
|
<div class="btn btn-default" data-toggle="modal" data-target="#ShutdownDialog">{{_('Stop Calibre-web')}}</a></div>
|
2017-01-30 17:58:36 +00:00
|
|
|
<div class="btn btn-default" id="check_for_update">{{_('Check for update')}}</a></div>
|
|
|
|
<a href="{{url_for('update')}}" class="btn btn-default hidden" id="perform_update">{{_('Perform Update')}}</a>
|
2017-01-02 17:52:33 +00:00
|
|
|
{% endif %}
|
2015-08-02 18:59:11 +00:00
|
|
|
</div>
|
2017-01-22 15:44:37 +00:00
|
|
|
<!-- 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>
|
|
|
|
<button type="button" class="btn btn-default" id="restart" data-dismiss="modal">{{_('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>
|
|
|
|
|
|
|
|
{% endblock %}
|