@ -1,10 +1,11 @@
{% extends "layout.html" %}
{% extends "layout.html" %}
{% macro text_table_row(parameter, edit_text, show_text, validate) -%}
{% macro text_table_row(parameter, edit_text, show_text, validate) -%}
< th data-field = "{{ parameter }}" id = "{{ parameter }}" data-sortable = "true"
< th data-field = "{{ parameter }}" id = "{{ parameter }}" data-sortable = "true"
data-visible = "{{visiblility.get(parameter)}}"
{% if g.user.role_edit() %}
{% if g.user.role_edit() %}
data-editable-type="text"
data-editable-type="text"
data-editable-url="{{ url_for('editbook.edit_list_book', param=parameter)}}"
data-editable-url="{{ url_for('editbook.edit_list_book', param=parameter)}}"
data-editable-title="{{ edit_text}}"
data-editable-title="{{ edit_text }}"
data-edit="true"
data-edit="true"
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}" {% endif %}
{% if validate %}data-edit-validate="{{ _('This Field is Required') }}" {% endif %}
{% endif %}
{% endif %}
@ -18,9 +19,15 @@
{% block body %}
{% block body %}
< h2 class = "{{page}}" > {{_(title)}}< / h2 >
< h2 class = "{{page}}" > {{_(title)}}< / h2 >
< div class = "btn btn-default disabled" id = "merge_books" aria-disabled = "true" > {{_('Merge selected books')}}< / div >
< div class = "btn btn-default disabled" id = "merge_books" aria-disabled = "true" > {{_('Merge selected books')}}< / div >
< div class = "btn btn-default" id = "delete_selection" aria-disabled = "false" > {{_('Remove Selections')}}< / div >
< div class = "btn btn-default disabled" id = "delete_selection" aria-disabled = "true" > {{_('Remove Selections')}}< / div >
< div class = "btn btn-default" id = "autoupdate_titlesort" aria-disabled = "false" > {{_('Update Title Sort automatically')}}< / div >
< div class = "form-group" >
< div class = "btn btn-default" id = "autoupdate_autorsort" aria-disabled = "false" > {{_('Update Author Sort automatically')}}< / div >
< input type = "checkbox" id = "autoupdate_titlesort" name = "autoupdate_titlesort" >
< label for = "autoupdate_titlesort" > {{_('Update Title Sort automatically')}}< / label >
< / div >
< div class = "form-group" >
< input type = "checkbox" id = "autoupdate_autorsort" name = "autoupdate_autorsort" >
< label for = "autoupdate_autorsort" > {{_('Update Author Sort automatically')}}< / label >
< / div >
< table id = "books-table" class = "table table-no-bordered table-striped"
< table id = "books-table" class = "table table-no-bordered table-striped"
data-url="{{url_for('web.list_books')}}">
data-url="{{url_for('web.list_books')}}">
< thead >
< thead >
@ -35,12 +42,12 @@
{{ text_table_row('authors', _('Enter Authors'),_('Authors'), true) }}
{{ text_table_row('authors', _('Enter Authors'),_('Authors'), true) }}
{{ text_table_row('tags', _('Enter Categories'),_('Categories'), false) }}
{{ text_table_row('tags', _('Enter Categories'),_('Categories'), false) }}
{{ text_table_row('series', _('Enter Series'),_('Series'), false) }}
{{ text_table_row('series', _('Enter Series'),_('Series'), false) }}
< th data-field = "series_index" id = "series_index" data- edit-validate= "{{ _('This Field is Required') }}" 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-edit = "true" data-editable-title = "{{_('Enter title')}}" { % endif % } > {{_('Series Index')}}< / th >
< th data-field = "series_index" id = "series_index" data- visible= "{{visiblility.get('series_index')}}" data- edit-validate= "{{ _('This Field is Required') }}" 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-edit = "true" data-editable-title = "{{_('Enter title')}}" { % endif % } > {{_('Series Index')}}< / th >
{{ text_table_row('languages', _('Enter Languages'),_('Languages'), false) }}
{{ text_table_row('languages', _('Enter Languages'),_('Languages'), false) }}
< th data-field = "pubdate" data-type = "date" data-vi ewformat= "dd.mm.yyyy" id = "pubdate" data-sortable = "true" > {{_('Publishing Date')}}< / th >
< th data-field = "pubdate" data-type = "date" data-vi sible= "{{visiblility.get('pubdate')}}" data-vi ewformat= "dd.mm.yyyy" id = "pubdate" data-sortable = "true" > {{_('Publishing Date')}}< / th >
{{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false) }}
{{ text_table_row('publishers', _('Enter Publishers'),_('Publishers'), false) }}
{% if g.user.role_edit() %}
{% if g.user.role_edit() %}
< th data-align = "right" data-formatter = "EbookActions" data-switchable = "false" > < / th >
< th data-align = "right" data-formatter = "EbookActions" data-switchable = "false" > {{_('Delete')}} < / th >
{% endif %}
{% endif %}
< / tr >
< / tr >
< / thead >
< / thead >