You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calibre-web/cps/templates/shelf_edit.html

61 lines
2.5 KiB
HTML

{% extends "layout.html" %}
{% block header %}
<link href="{{ url_for('static', filename='css/libs/bootstrap-select.min.css') }}" rel="stylesheet" >
{% endblock %}
{% block body %}
<div class="discover">
<h1>{{title}}</h1>
<form role="form" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="form-group">
<label for="title">{{_('Title')}}</label>
<input type="text" class="form-control" name="title" id="title" value="{{ shelf.name if shelf.name != None }}">
</div>
{% if current_user.role_edit_shelfs() %}
<div class="checkbox">
<label>
<input type="checkbox" name="is_public" {% if shelf.is_public == 1 %}checked{% endif %}> {{_('Share with Everyone')}}
</label>
</div>
<div class="form-group">
<label for="type">Shelf type:</label>
<select id="type" name="type" class="selectpicker">
<option value="0"{% if shelf.type == 0 %} selected{% endif %}>Calibre web</option>
<option value="1"{% if shelf.type == 1 %} selected{% endif %}>Category shorcut</option>
</select>
</div>
<div class="form-group">
<label for="category">Category:</label>
<select id="category" name="category" class="selectpicker">
<option value="0">None</option>
{% if shelf.type == 1 %}
{% for category in categories %}
<option value="{{ category.id }}"{% if category.id == shelf.category %} selected{% endif %}>{{ category.name }}</option>
{% endfor %}
{% endif %}
</select>
</div>
{% endif %}
{% if kobo_sync_enabled and sync_only_selected_shelves %}
<div class="checkbox">
<label> <input type="checkbox" name="kobo_sync" {% if shelf.kobo_sync == 1 %}checked{% endif %}>
{{ _('Sync this shelf with Kobo device') }}
</label>
</div>
{% endif %}
<button type="submit" class="btn btn-default" id="submit">{{_('Save')}}</button>
{% if shelf.id != None %}
<a href="{{ url_for('shelf.show_shelf', shelf_id=shelf.id) }}" class="btn btn-default">{{_('Cancel')}}</a>
{% endif %}
</form>
</div>
{% endblock %}
{% block js %}
<script src="{{ url_for('static', filename='js/libs/bootstrap-select.min.js')}}"></script>
{% if not current_user.locale == 'en' %}
<script src="{{ url_for('static', filename='js/libs/bootstrap-select/defaults-' + current_user.locale + '.min.js') }}" charset="UTF-8"></script>
{% endif %}
{% endblock %}