2018-07-15 15:08:06 +02:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
|
|
|
<h2>{{title}}</h2>
|
|
|
|
<form role="form" method="POST" autocomplete="off">
|
|
|
|
<div class="panel-group">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsefour">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('View Configuration')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div id="collapsefour" class="panel-collapse collapse">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_calibre_web_title">{{_('Title')}}</label>
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="text" class="form-control" name="config_calibre_web_title" id="config_calibre_web_title" value="{% if conf.config_calibre_web_title != None %}{{ conf.config_calibre_web_title }}{% endif %}" autocomplete="off" required>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_books_per_page">{{_('Books per page')}}</label>
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="number" min="1" max="200" class="form-control" name="config_books_per_page" id="config_books_per_page" value="{% if conf.config_books_per_page != None %}{{ conf.config_books_per_page }}{% endif %}" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_random_books">{{_('No. of random books to show')}}</label>
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="number" min="1" max="30" class="form-control" name="config_random_books" id="config_random_books" value="{% if conf.config_random_books != None %}{{ conf.config_random_books }}{% endif %}" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
2019-02-25 19:26:43 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_authors_max">{{_('No. of authors to show before hiding (0=disable hiding)')}}</label>
|
|
|
|
<input type="number" min="0" max="999" class="form-control" name="config_authors_max" id="config_authors_max" value="{% if content.config_authors_max != None %}{{ content.config_authors_max }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
2019-01-11 08:36:28 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_theme">{{_('Theme')}}</label>
|
|
|
|
<select name="config_theme" id="config_theme" class="form-control">
|
2019-03-05 17:34:51 +01:00
|
|
|
<option value="0" {% if conf.config_theme == 0 %}selected{% endif %}>{{ _("Standard Theme") }}</option>
|
|
|
|
<option value="1" {% if conf.config_theme == 1 %}selected{% endif %}>{{ _("caliBlur! Dark Theme") }}</option>
|
2019-01-11 08:36:28 +01:00
|
|
|
</select>
|
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_columns_to_ignore">{{_('Regular expression for ignoring columns')}}</label>
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="text" class="form-control" name="config_columns_to_ignore" id="config_columns_to_ignore" value="{% if conf.config_columns_to_ignore != None %}{{ conf.config_columns_to_ignore }}{% endif %}" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_read_column">{{_('Link read/unread status to Calibre column')}}</label>
|
|
|
|
<select name="config_read_column" id="config_read_column" class="form-control">
|
2019-03-05 17:34:51 +01:00
|
|
|
<option value="0" {% if conf.config_read_column == 0 %}selected{% endif %}></option>
|
2018-07-15 15:08:06 +02:00
|
|
|
{% for readColumn in readColumns %}
|
2019-03-05 17:34:51 +01:00
|
|
|
<option value="{{ readColumn.id }}" {% if readColumn.id == conf.config_read_column %}selected{% endif %}>{{ readColumn.name }}</option>
|
2018-07-15 15:08:06 +02:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_title_regex">{{_('Regular expression for title sorting')}}</label>
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="text" class="form-control" name="config_title_regex" id="config_title_regex" value="{% if conf.config_title_regex != None %}{{ conf.config_title_regex }}{% endif %}" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_mature_content_tags">{{_('Tags for Mature Content')}}</label>
|
|
|
|
<input type="text" class="form-control" name="config_mature_content_tags" id="config_mature_content_tags"
|
2019-03-05 17:34:51 +01:00
|
|
|
value="{% if conf.config_mature_content_tags != None%}{{ conf.config_mature_content_tags }}{% endif %}"
|
2018-07-15 15:08:06 +02:00
|
|
|
autocomplete="off"
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsesix">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Default settings for new users')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div id="collapsesix" class="panel-collapse collapse">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="admin_role" id="admin_role" {% if conf.role_admin() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="admin_role">{{_('Admin user')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="download_role" id="download_role" {% if conf.role_download() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="download_role">{{_('Allow Downloads')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="upload_role" id="upload_role" {% if conf.role_upload() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="upload_role">{{_('Allow Uploads')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="edit_role" id="edit_role" {% if conf.role_edit() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="edit_role">{{_('Allow Edit')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="delete_role" id="delete_role" {% if conf.role_delete_books() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="delete_role">{{_('Allow Delete books')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="passwd_role" id="passwd_role" {% if conf.role_passwd() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="passwd_role">{{_('Allow Changing Password')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="edit_shelf_role" id="edit_shelf_role" {% if conf.role_edit_shelfs() %}checked{% endif %}>
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="edit_shelf_role">{{_('Allow Editing Public Shelfs')}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapseseven">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Default visibilities for new users')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div id="collapseseven" class="panel-collapse collapse">
|
|
|
|
<div class="panel-body">
|
2019-03-03 19:42:17 +01:00
|
|
|
{% for element in sidebar %}
|
2018-07-15 15:08:06 +02:00
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="show_{{element['visibility']}}" id="show_{{element['visibility']}}" {% if conf.show_element_new_user(element['visibility']) %}checked{% endif %}>
|
2019-03-03 19:42:17 +01:00
|
|
|
<label for="show_{{element['visibility']}}">{{element['show_text']}}</label>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2019-03-04 19:34:29 +01:00
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="Show_detail_random" id="Show_detail_random" {% if conf.show_detail_random() %}checked{% endif %}>
|
2019-03-04 19:34:29 +01:00
|
|
|
<label for="Show_detail_random">{{_('Show random books in detail view')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-03-05 17:34:51 +01:00
|
|
|
<input type="checkbox" name="Show_mature_content" id="Show_mature_content" {% if conf.show_mature_content() %}checked{% endif %}>
|
2019-03-04 19:34:29 +01:00
|
|
|
<label for="Show_mature_content">{{_('Show mature content')}}</label>
|
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
2018-09-29 15:44:42 +02:00
|
|
|
<button type="submit" name="submit" class="btn btn-default">{{_('Submit')}}</button>
|
2019-02-08 20:11:44 +01:00
|
|
|
<a href="{{ url_for('admin.admin') }}" class="btn btn-default">{{_('Back')}}</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block js %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
$('.collapse').on('shown.bs.collapse', function(){
|
|
|
|
$(this).parent().find(".glyphicon-plus").removeClass("glyphicon-plus").addClass("glyphicon-minus");
|
|
|
|
}).on('hidden.bs.collapse', function(){
|
|
|
|
$(this).parent().find(".glyphicon-minus").removeClass("glyphicon-minus").addClass("glyphicon-plus");
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|