2020-05-12 14:32:26 +00:00
|
|
|
|
{% extends "layout.html" %}
|
2020-06-11 19:19:09 +00:00
|
|
|
|
{% macro text_table_row(parameter, edit_text, show_text, validate) -%}
|
|
|
|
|
<th data-field="{{ parameter }}" id="{{ parameter }}" data-sortable="true"
|
|
|
|
|
{% if g.user.role_edit() %}
|
|
|
|
|
data-editable-type="text"
|
|
|
|
|
data-editable-url="{{ url_for('editbook.edit_list_book', param=parameter)}}"
|
|
|
|
|
data-editable-title="{{ edit_text}}"
|
|
|
|
|
data-edit="true"
|
2020-06-11 19:36:12 +00:00
|
|
|
|
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}" {% endif %}
|
2020-06-11 19:19:09 +00:00
|
|
|
|
{% endif %}
|
|
|
|
|
>{{ show_text }}</th>
|
2020-06-11 06:48:23 +00:00
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
2020-06-06 19:21:10 +00:00
|
|
|
|
{% block header %}
|
|
|
|
|
<link href="{{ url_for('static', filename='css/libs/bootstrap-table.min.css') }}" rel="stylesheet">
|
|
|
|
|
<link href="{{ url_for('static', filename='css/libs/bootstrap-editable.css') }}" rel="stylesheet">
|
|
|
|
|
{% endblock %}
|
2020-05-12 14:32:26 +00:00
|
|
|
|
{% block body %}
|
2020-06-06 19:21:10 +00:00
|
|
|
|
<h2 class="{{page}}">{{_(title)}}</h2>
|
2020-06-11 19:19:09 +00:00
|
|
|
|
<!--table id="table1"></table-->
|
|
|
|
|
<!--a href="{{url_for('editbook.merge_list_book')}}" class="btn btn-default disabled" id="merge_book" role="button" aria-disabled="true">{{_('Merge selected books')}}
|
2020-06-06 19:21:10 +00:00
|
|
|
|
data-side-pagination="server"
|
|
|
|
|
data-pagination="true"
|
|
|
|
|
data-pagination-detail-h-align=" hidden"
|
|
|
|
|
data-pagination-h-align="left"
|
|
|
|
|
id="books-table"
|
2020-06-11 19:19:09 +00:00
|
|
|
|
|
2020-06-06 19:21:10 +00:00
|
|
|
|
data-id-field="id"
|
|
|
|
|
data-editable-mode="inline"
|
|
|
|
|
data-show-columns="true"
|
|
|
|
|
data-search="true"
|
|
|
|
|
data-search-align="left"
|
|
|
|
|
data-show-search-button="false"
|
2020-06-08 15:34:03 +00:00
|
|
|
|
data-search-on-enter-key="true"
|
2020-06-06 19:21:10 +00:00
|
|
|
|
data-checkbox-header="false"
|
2020-06-09 18:46:02 +00:00
|
|
|
|
data-maintain-meta-data="true"
|
2020-06-11 06:48:23 +00:00
|
|
|
|
data-response-handler="responseHandler"
|
2020-06-11 19:19:09 +00:00
|
|
|
|
data-editable-emptytext="<span class='glyphicon glyphicon-plus'></span>"
|
|
|
|
|
</a-->
|
|
|
|
|
<div class="btn btn-default disabled" id="merge_books" aria-disabled="true">{{_('Merge selected books')}}</div>
|
2020-06-11 19:36:12 +00:00
|
|
|
|
<table id="books-table" class="table table-no-bordered table-striped"
|
2020-06-11 19:19:09 +00:00
|
|
|
|
data-url="{{url_for('web.list_books')}}">
|
2020-06-06 19:21:10 +00:00
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2020-06-08 19:57:52 +00:00
|
|
|
|
{% if g.user.role_edit() %}
|
2020-06-11 06:48:23 +00:00
|
|
|
|
<th data-field="state" data-checkbox="true" data-sortable="true"></th>
|
2020-06-08 19:57:52 +00:00
|
|
|
|
{% endif %}
|
2020-06-06 19:21:10 +00:00
|
|
|
|
<th data-field="id" id="id" data-visible="false" data-switchable="false"></th>
|
2020-06-11 19:19:09 +00:00
|
|
|
|
{{ text_table_row('title', _('Enter Title'),_('Title'), true) }}
|
|
|
|
|
{{ text_table_row('sort', _('Enter Titlesort'),_('Sort'), false) }}
|
|
|
|
|
{{ text_table_row('author_sort', _('Enter Authorsort'),_('Authors Sort'), false) }}
|
|
|
|
|
{{ text_table_row('authors', _('Enter Authors'),_('Authors'), false) }}
|
|
|
|
|
{{ text_table_row('tags', _('Enter Tags'),_('Tags'), false) }}
|
|
|
|
|
{{ text_table_row('series', _('Enter Series'),_('Series'), false) }}
|
2020-06-11 06:48:23 +00:00
|
|
|
|
<th data-field="series_index" id="series_index" data-sortable="true" {% if g.user.role_edit() %} data-editable-type="number" data-editable-placeholder="1" data-editable-step="0.01" data-editable-min="0" data-editable-url="{{ url_for('editbook.edit_list_book', param='series_index')}}" data-editable="true" data-editable-title="{{_('Enter title')}}"{% endif %}>{{_('Series Index')}}</th>
|
2020-06-11 19:19:09 +00:00
|
|
|
|
{{ text_table_row('languages', _('Enter Languages'),_('Languages'), false) }}
|
2020-06-11 19:36:12 +00:00
|
|
|
|
<th data-field="pubdate" data-type="date" data-viewformat="dd.mm.yyyy" id="pubdate" data-sortable="true">_('Publishing Date')</th>
|
2020-06-11 19:19:09 +00:00
|
|
|
|
{{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false) }}
|
2020-06-06 19:21:10 +00:00
|
|
|
|
{% if g.user.role_edit() %}
|
|
|
|
|
<th data-align="right" data-formatter="EbookActions" data-switchable="false"></th>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
</table>
|
2020-05-12 14:32:26 +00:00
|
|
|
|
{% endblock %}
|
2020-06-08 15:34:03 +00:00
|
|
|
|
{% block modal %}
|
|
|
|
|
{{ delete_book(0) }}
|
|
|
|
|
{% endblock %}
|
2020-05-12 14:32:26 +00:00
|
|
|
|
{% block js %}
|
2020-06-06 19:21:10 +00:00
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table.min.js') }}"></script>
|
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table-editable.min.js') }}"></script>
|
|
|
|
|
<script src="{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-editable.min.js') }}"></script>
|
|
|
|
|
<script src="{{ url_for('static', filename='js/table.js') }}"></script>
|
2020-06-11 06:48:23 +00:00
|
|
|
|
<script>
|
|
|
|
|
</script>
|
2020-05-12 14:32:26 +00:00
|
|
|
|
{% endblock %}
|