2015-08-02 20:59:11 +02:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
|
|
|
<h1>{{title}}</h1>
|
2016-06-17 20:01:44 +02:00
|
|
|
<form role="form" method="POST" autocomplete="off">
|
2016-04-27 10:39:52 +02:00
|
|
|
{% if g.user and g.user.role_admin() and new_user %}
|
2015-10-13 18:07:17 +02:00
|
|
|
<div class="form-group required">
|
2016-11-09 19:24:33 +01:00
|
|
|
<label for="nickname">{{_('Username')}}</label>
|
2016-06-17 20:01:44 +02:00
|
|
|
<input type="text" class="form-control" name="nickname" id="nickname" value="{{ content.nickname if content.nickname != None }}" autocomplete="off">
|
2015-10-13 18:07:17 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="form-group">
|
2018-08-31 15:00:22 +02:00
|
|
|
<label for="email">{{_('E-mail address')}}</label>
|
2017-11-12 13:40:56 +01:00
|
|
|
<input type="email" class="form-control" name="email" id="email" value="{{ content.email if content.email != None }}" autocomplete="off">
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2017-01-12 20:43:36 +01:00
|
|
|
{% if ( g.user and g.user.role_passwd() or g.user.role_admin() ) and not content.role_anonymous() %}
|
2018-08-28 09:42:19 +02:00
|
|
|
{% if g.user and g.user.role_admin() and g.allow_registration and not new_user and not profile %}
|
2018-08-24 15:48:09 +02:00
|
|
|
<div class="btn btn-default" id="resend_password"><a href="{{url_for('reset_password', user_id = content.id) }}">{{_('Reset user Password')}}</a></div>
|
2019-01-26 19:06:54 +01:00
|
|
|
{% else %}
|
2018-08-24 15:48:09 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="password">{{_('Password')}}</label>
|
|
|
|
<input type="password" class="form-control" name="password" id="password" value="" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2016-04-27 16:00:58 +02:00
|
|
|
{% endif %}
|
2015-08-02 20:59:11 +02:00
|
|
|
<div class="form-group">
|
2016-11-09 19:24:33 +01:00
|
|
|
<label for="kindle_mail">{{_('Kindle E-Mail')}}</label>
|
2016-08-08 21:01:38 +02:00
|
|
|
<input type="email" class="form-control" name="kindle_mail" id="kindle_mail" value="{{ content.kindle_mail if content.kindle_mail != None }}">
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2016-11-09 19:24:33 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="locale">{{_('Language')}}</label>
|
|
|
|
<select name="locale" id="locale" class="form-control">
|
|
|
|
{% for translation in translations %}
|
2017-02-15 18:09:17 +01:00
|
|
|
<option value="{{translation}}" {% if translation|string == content.locale %}selected{% endif %} {% if new_user == 1 and loop.first %}selected{% endif %}>{{ translation.display_name }}</option>
|
2016-11-09 19:24:33 +01:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="default_language">{{_('Show books with language')}}</label>
|
|
|
|
<select name="default_language" id="default_language" class="form-control">
|
2017-01-22 14:07:54 +01:00
|
|
|
<option value="all" {% if new_user == 1 %}selected{% endif %}>{{ _('Show all') }}</option>
|
2016-11-09 19:24:33 +01:00
|
|
|
{% for language in languages %}
|
|
|
|
<option value="{{ language.lang_code }}" {% if content.default_language == language.lang_code %}selected{% endif %}>{{ language.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
2017-08-08 18:52:00 +02:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_random" id="show_random" {% if content.show_random_books() %}checked{% endif %}>
|
|
|
|
<label for="show_random">{{_('Show random books')}}</label>
|
2017-11-12 14:06:33 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_recent" id="show_recent" {% if content.show_recent() %}checked{% endif %}>
|
|
|
|
<label for="show_recent">{{_('Show recent books')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_sorted" id="show_sorted" {% if content.show_sorted() %}checked{% endif %}>
|
|
|
|
<label for="show_sorted">{{_('Show sorted books')}}</label>
|
2017-08-08 18:52:00 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_hot" id="show_hot" {% if content.show_hot_books() %}checked{% endif %}>
|
|
|
|
<label for="show_hot">{{_('Show hot books')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_best_rated" id="show_best_rated" {% if content.show_best_rated_books() %}checked{% endif %}>
|
|
|
|
<label for="show_best_rated">{{_('Show best rated books')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_language" id="show_language" {% if content.show_language() %}checked{% endif %}>
|
|
|
|
<label for="show_language">{{_('Show language selection')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_series" id="show_series" {% if content.show_series() %}checked{% endif %}>
|
|
|
|
<label for="show_series">{{_('Show series selection')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_category" id="show_category" {% if content.show_category() %}checked{% endif %}>
|
|
|
|
<label for="show_category">{{_('Show category selection')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_author" id="show_author" {% if content.show_author() %}checked{% endif %}>
|
|
|
|
<label for="show_author">{{_('Show author selection')}}</label>
|
|
|
|
</div>
|
2018-09-30 18:30:24 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_publisher" id="show_publisher" {% if content.show_publisher() %}checked{% endif %}>
|
|
|
|
<label for="show_publisher">{{_('Show publisher selection')}}</label>
|
|
|
|
</div>
|
2019-01-26 19:06:54 +01:00
|
|
|
{% if not content.role_anonymous() %}
|
2017-08-08 18:52:00 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_read_and_unread" id="show_read_and_unread" {% if content.show_read_and_unread() %}checked{% endif %}>
|
|
|
|
<label for="show_read_and_unread">{{_('Show read and unread')}}</label>
|
|
|
|
</div>
|
2019-01-26 19:06:54 +01:00
|
|
|
{% endif %}
|
2017-08-08 18:52:00 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_detail_random" id="show_detail_random" {% if content.show_detail_random() %}checked{% endif %}>
|
|
|
|
<label for="show_detail_random">{{_('Show random books in detail view')}}</label>
|
|
|
|
</div>
|
2017-01-28 20:16:40 +01:00
|
|
|
</div>
|
2017-02-25 13:28:57 +01:00
|
|
|
<div class="col-sm-6">
|
2016-12-23 09:53:39 +01:00
|
|
|
{% if g.user and g.user.role_admin() and not profile %}
|
2017-01-12 20:43:36 +01:00
|
|
|
{% if not content.role_anonymous() %}
|
2016-11-09 19:24:33 +01:00
|
|
|
<div class="form-group">
|
2016-04-27 10:35:23 +02:00
|
|
|
<input type="checkbox" name="admin_role" id="admin_role" {% if content.role_admin() %}checked{% endif %}>
|
2016-11-09 19:24:33 +01:00
|
|
|
<label for="admin_role">{{_('Admin user')}}</label>
|
2018-02-04 07:21:08 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-09-08 15:47:22 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="show_mature_content" id="show_mature_content" {% if content.mature_content %}checked{% endif %}>
|
|
|
|
<label for="show_mature_content">{{_('Show mature content')}}</label>
|
2016-04-27 10:35:23 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="download_role" id="download_role" {% if content.role_download() %}checked{% endif %}>
|
2016-11-09 19:24:33 +01:00
|
|
|
<label for="download_role">{{_('Allow Downloads')}}</label>
|
2016-04-27 10:35:23 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="upload_role" id="upload_role" {% if content.role_upload() %}checked{% endif %}>
|
2016-11-09 19:24:33 +01:00
|
|
|
<label for="upload_role">{{_('Allow Uploads')}}</label>
|
2016-04-27 10:35:23 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="edit_role" id="edit_role" {% if content.role_edit() %}checked{% endif %}>
|
2016-11-09 19:24:33 +01:00
|
|
|
<label for="edit_role">{{_('Allow Edit')}}</label>
|
2017-04-14 20:29:11 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="delete_role" id="delete_role" {% if content.role_delete_books() %}checked{% endif %}>
|
|
|
|
<label for="delete_role">{{_('Allow Delete books')}}</label>
|
2015-08-02 20:59:11 +02:00
|
|
|
</div>
|
2017-01-12 20:43:36 +01:00
|
|
|
{% if not content.role_anonymous() %}
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="passwd_role" id="passwd_role" {% if content.role_passwd() %}checked{% endif %}>
|
|
|
|
<label for="passwd_role">{{_('Allow Changing Password')}}</label>
|
|
|
|
</div>
|
2017-03-19 20:29:35 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" name="edit_shelf_role" id="edit_shelf_role" {% if content.role_edit_shelfs() %}checked{% endif %}>
|
2017-07-10 19:26:57 +02:00
|
|
|
<label for="edit_shelf_role">{{_('Allow Editing Public Shelfs')}}</label>
|
2017-03-19 20:29:35 +01:00
|
|
|
</div>
|
2017-01-12 20:43:36 +01:00
|
|
|
{% endif %}
|
2015-10-13 18:07:17 +02:00
|
|
|
{% endif %}
|
2017-01-12 20:43:36 +01:00
|
|
|
{% if g.user and g.user.role_admin() and not profile and not new_user and not content.role_anonymous() %}
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
2018-09-29 15:44:42 +02:00
|
|
|
<input type="checkbox" id="delete" name="delete"> {{_('Delete this user')}}
|
2017-01-12 20:43:36 +01:00
|
|
|
</label>
|
|
|
|
</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% endif %}
|
2017-02-25 13:28:57 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
2017-01-12 20:43:36 +01:00
|
|
|
<button type="submit" id="submit" class="btn btn-default">{{_('Submit')}}</button>
|
2016-11-12 10:52:59 +01:00
|
|
|
{% if not profile %}
|
2017-02-15 18:09:17 +01:00
|
|
|
<a href="{{ url_for('admin') }}" id="back" class="btn btn-default">{{_('Back')}}</a>
|
2016-11-12 10:52:59 +01:00
|
|
|
{% endif %}
|
2018-09-29 15:44:42 +02:00
|
|
|
</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if downloads %}
|
2017-02-25 13:34:33 +01:00
|
|
|
<div class="col-sm-12">
|
2016-11-09 19:24:33 +01:00
|
|
|
<h2>{{_('Recent Downloads')}}</h2>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% for entry in downloads %}
|
|
|
|
<div class="col-sm-2">
|
2017-04-02 10:05:07 +02:00
|
|
|
<a class="pull-left" href="{{ url_for('show_book', book_id=entry.id) }}">
|
2017-02-02 19:36:31 +01:00
|
|
|
<img class="media-object" width="100" src="{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}" alt="...">
|
2015-08-02 20:59:11 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2017-02-25 13:34:33 +01:00
|
|
|
</div>
|
2015-08-02 20:59:11 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|