2015-08-02 18:59:11 +00:00
{% extends "layout.html" %}
{% block body %}
{% if book %}
2017-04-14 18:29:11 +00:00
< div class = "col-sm-3 col-lg-3 col-xs-12" >
< div class = "cover" >
2021-09-30 06:43:31 +00:00
<!-- Always use full - sized image for the book edit page -->
< img id = "detailcover" title = "{{book.title}}" src = "{{url_for('web.get_cover', book_id=book.id, resolution='og', c=book|last_modified)}}" / >
2017-04-14 18:29:11 +00:00
< / div >
2023-02-04 10:18:43 +00:00
{% if current_user.role_delete_books() %}
2017-04-14 18:29:11 +00:00
< div class = "text-center" >
2020-06-18 18:39:45 +00:00
< button type = "button" class = "btn btn-danger" id = "delete" data-toggle = "modal" data-delete-id = "{{ book.id }}" data-target = "#deleteModal" > {{_("Delete Book")}}< / button >
2017-04-14 18:29:11 +00:00
< / div >
2018-08-04 16:22:43 +00:00
{% if book.data|length > 1 %}
2018-08-31 13:00:22 +00:00
< div class = "text-center more-stuff" > < h4 > {{_('Delete formats:')}}< / h4 >
2018-08-04 16:22:43 +00:00
{% for file in book.data %}
2020-10-04 10:09:52 +00:00
< div class = "form-group" >
< button type = "button" class = "btn btn-danger" id = "delete_format" data-toggle = "modal" data-delete-id = "{{ book.id }}" data-delete-format = "{{ file.format }}" data-target = "#deleteModal" > {{_('Delete')}} - {{file.format}}< / button >
< / div >
2018-08-04 16:22:43 +00:00
{% endfor %}
< / div >
{% endif %}
2017-04-14 18:29:11 +00:00
{% endif %}
2018-08-28 23:13:04 +00:00
2018-09-09 16:17:15 +00:00
{% if source_formats|length > 0 and conversion_formats|length > 0 %}
2018-08-31 13:00:22 +00:00
< div class = "text-center more-stuff" > < h4 > {{_('Convert book format:')}}< / h4 >
2022-03-13 11:34:21 +00:00
< form class = "padded-bottom" action = "{{ url_for('edit-book.convert_bookformat', book_id=book.id) }}" method = "post" id = "book_convert_frm" >
2021-10-04 15:50:32 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2018-08-28 23:13:04 +00:00
< div class = "form-group" >
< div class = "text-left" >
< label class = "control-label" for = "book_format_from" > {{_('Convert from:')}}< / label >
< select class = "form-control" name = "book_format_from" id = "book_format_from" >
2021-10-02 05:53:36 +00:00
< option disabled selected value > -- {{_('select an option')}} --< / option >
2018-09-09 16:17:15 +00:00
{% for format in source_formats %}
2021-10-02 05:53:36 +00:00
< option > {{format|upper}}< / option >
2018-08-28 23:13:04 +00:00
{% endfor %}
< / select >
< label class = "control-label" for = "book_format_to" > {{_('Convert to:')}}< / label >
< select class = "form-control" name = "book_format_to" id = "book_format_to" >
2021-10-02 05:53:36 +00:00
< option disabled selected value > -- {{_('select an option')}} --< / option >
2018-08-28 23:13:04 +00:00
{% for format in conversion_formats %}
2021-10-02 05:53:36 +00:00
< option > {{format|upper}}< / option >
2018-08-28 23:13:04 +00:00
{% endfor %}
< / select >
< / div >
< / div >
2018-08-31 13:00:22 +00:00
< button type = "submit" class = "btn btn-primary" id = "btn-book-convert" name = "btn-book-convert" > < span class = "glyphicon glyphicon-duplicate" > < / span > {{_('Convert book')}}< / button >
2018-08-28 23:13:04 +00:00
< / form >
< / div >
{% endif %}
2024-08-16 19:11:54 +00:00
{% if current_user.role_upload() and g.allow_upload %}
2018-08-28 23:13:04 +00:00
2024-08-16 19:11:54 +00:00
< div class = "text-center more-stuff" > <!-- h4 aria - label="Upload new book format"></h4 -->
< form id = "form-upload-format" action = "{{ url_for('edit-book.upload') }}" data-title = "{{_('Uploading...')}}" data-footer = "{{_('Close')}}" data-failed = "{{_('Error')}}" data-message = "{{_('Upload done, processing, please wait...')}}" method = "post" enctype = "multipart/form-data" >
< div class = "text-center" >
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
< input type = "hidden" name = "book_id" value = "{{ book.id }}" >
< div role = "group" aria-label = "Upload new book format" >
< label class = "btn btn-primary btn-file" for = "btn-upload-format" > {{ _('Upload Format') }}< / label >
< div class = "upload-format-input-text" id = "upload-format" > < / div >
< input id = "btn-upload-format" name = "btn-upload-format" type = "file" accept = "{% for format in accept %}.{% if format != ''%}{{format}}{% else %}*{% endif %}{{ ',' if not loop.last }}{% endfor %}" multiple >
< / div >
< / div >
< / form >
2015-08-02 18:59:11 +00:00
< / div >
2024-08-16 19:11:54 +00:00
{% endif %}
< / div >
2022-03-13 11:34:21 +00:00
< form role = "form" action = "{{ url_for('edit-book.edit_book', book_id=book.id) }}" method = "post" enctype = "multipart/form-data" id = "book_edit_frm" >
2021-10-06 16:41:01 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2017-04-14 18:29:11 +00:00
< div class = "col-sm-9 col-xs-12" >
2015-08-02 18:59:11 +00:00
< div class = "form-group" >
2024-08-18 14:27:02 +00:00
< label for = "title" > {{_('Book Title')}}< / label >
< input type = "text" class = "form-control" name = "title" id = "title" value = "{{book.title}}" >
2015-08-02 18:59:11 +00:00
< / div >
2021-05-26 17:57:58 +00:00
< div class = "text-center" >
< button type = "button" class = "btn btn-default" id = "xchange" > < span class = "glyphicon glyphicon-arrow-up" > < / span > < span class = "glyphicon glyphicon-arrow-down" > < / span > < / button >
< / div >
2021-10-10 16:02:18 +00:00
< div id = "author_div" class = "form-group" >
2016-11-09 18:24:33 +00:00
< label for = "bookAuthor" > {{_('Author')}}< / label >
2024-08-18 14:27:02 +00:00
< input type = "text" class = "form-control typeahead" autocomplete = "off" name = "authors" id = "authors" value = "{{' & '.join(authors)}}" >
2015-08-02 18:59:11 +00:00
< / div >
2021-10-10 16:02:18 +00:00
2015-08-02 18:59:11 +00:00
< div class = "form-group" >
2024-08-18 14:27:02 +00:00
< label for = "comments" > {{_('Description')}}< / label >
< textarea class = "form-control" name = "comments" id = "comments" rows = "7" > {% if book.comments %}{{book.comments[0].text}}{%endif%}< / textarea >
2015-08-02 18:59:11 +00:00
< / div >
2020-01-12 22:23:43 +00:00
< div class = "form-group" >
< label > {{_('Identifiers')}}< / label >
2024-11-23 09:49:54 +00:00
< table class = "table" id = "identifier-table" > < tbody >
2020-01-12 22:23:43 +00:00
{% for identifier in book.identifiers %}
< tr >
2020-09-05 16:46:11 +00:00
< td > < input type = "text" class = "form-control" name = "identifier-type-{{identifier.type}}" value = "{{identifier.type}}" required = "required" placeholder = "{{_('Identifier Type')}}" > < / td >
2020-01-12 22:23:43 +00:00
< td > < input type = "text" class = "form-control" name = "identifier-val-{{identifier.type}}" value = "{{identifier.val}}" required = "required" placeholder = "{{_('Identifier Value')}}" > < / td >
< td > < a class = "btn btn-default" onclick = "removeIdentifierLine(this)" > {{_('Remove')}}< / a > < / td >
< / tr >
{% endfor %}
2024-11-23 09:49:54 +00:00
< / tbody >
2020-01-12 22:23:43 +00:00
< / table >
< a id = "add-identifier-line" class = "btn btn-default" > {{_('Add Identifier')}}< / a >
< / div >
2015-08-02 18:59:11 +00:00
< div class = "form-group" >
2016-11-09 18:24:33 +00:00
< label for = "tags" > {{_('Tags')}}< / label >
2023-06-17 08:42:33 +00:00
< input type = "text" class = "form-control typeahead" autocomplete = "off" name = "tags" id = "tags" value = "{% for tag in book.tags %}{{tag.name.strip()}}{% if not loop.last %}, {% endif %}{% endfor %}" >
2015-08-02 18:59:11 +00:00
< / div >
2017-07-09 23:28:06 +00:00
< div class = "form-group" >
< label for = "series" > {{_('Series')}}< / label >
2023-06-17 08:42:33 +00:00
< input type = "text" class = "form-control typeahead" autocomplete = "off" name = "series" id = "series" value = "{% if book.series %}{{book.series[0].name}}{% endif %}" >
2017-07-09 23:28:06 +00:00
< / div >
< div class = "form-group" >
2020-02-03 03:22:00 +00:00
< label for = "series_index" > {{_('Series ID')}}< / label >
2024-10-18 18:24:49 +00:00
< input type = "number" step = "0.01" min = "0" placeholder = "1" class = "form-control" name = "series_index" id = "series_index" value = "{{book.series_index|formatfloat(2)}}" >
2017-07-09 23:28:06 +00:00
< / div >
< div class = "form-group" >
< label for = "rating" > {{_('Rating')}}< / label >
< input type = "number" name = "rating" id = "rating" class = "rating input-lg" data-clearable = "" value = "{% if book.ratings %}{{(book.ratings[0].rating / 2)|int}}{% endif %}" >
< / div >
2023-02-04 10:18:43 +00:00
{% if current_user.role_upload() and g.allow_upload %}
2017-07-09 23:28:06 +00:00
< div class = "form-group" >
2020-02-03 03:22:00 +00:00
< label for = "cover_url" > {{_('Fetch Cover from URL (JPEG - Image will be downloaded and stored in database)')}}< / label >
2017-07-09 23:28:06 +00:00
< input type = "text" class = "form-control" name = "cover_url" id = "cover_url" value = "" >
< / div >
2020-09-23 18:50:34 +00:00
< div class = "form-group" aria-label = "Upload cover from local drive" >
2020-02-03 03:22:00 +00:00
< label class = "btn btn-primary btn-file" for = "btn-upload-cover" > {{ _('Upload Cover from Local Disk') }}< / label >
2018-08-28 12:07:48 +00:00
< div class = "upload-cover-input-text" id = "upload-cover" > < / div >
2019-04-15 18:57:25 +00:00
< input id = "btn-upload-cover" name = "btn-upload-cover" type = "file" accept = ".jpg, .jpeg, .png, .webp" >
2020-09-23 18:50:34 +00:00
< / div >
{% endif %}
2021-05-14 17:58:06 +00:00
< label for = "pubdate" > {{_('Published Date')}}< / label >
< div class = "form-group input-group" >
2021-08-01 11:50:17 +00:00
< input type = "text" class = "datepicker form-control" name = "pubdate" id = "pubdate" value = "{% if book.pubdate %}{{book.pubdate|formatdateinput}}{% endif %}" >
< input type = "text" class = "form-control fake-input hidden" id = "fake_pubdate" value = "{% if book.pubdate %}{{book.pubdate|formatdate}}{% endif %}" >
2021-05-14 17:58:06 +00:00
< span class = "input-group-btn" >
< button type = "button" id = "pubdate_delete" class = "datepicker_delete btn btn-default" > < span class = "glyphicon glyphicon-remove-circle" > < / span > < / button >
< / span >
2017-07-09 23:27:46 +00:00
< / div >
2018-09-02 15:21:01 +00:00
< div class = "form-group" >
< label for = "publisher" > {{_('Publisher')}}< / label >
2023-06-17 08:42:33 +00:00
< input type = "text" class = "form-control typeahead" autocomplete = "off" name = "publisher" id = "publisher" value = "{% if book.publishers|length > 0 %}{{book.publishers[0].name}}{% endif %}" >
2018-09-02 15:21:01 +00:00
< / div >
2016-11-09 18:24:33 +00:00
< div class = "form-group" >
< label for = "languages" > {{_('Language')}}< / label >
2023-06-17 08:42:33 +00:00
< input type = "text" class = "form-control typeahead" autocomplete = "off" name = "languages" id = "languages" value = "{% for language in book.languages %}{{language.language_name.strip()}}{% if not loop.last %}, {% endif %}{% endfor %}" >
2016-11-09 18:24:33 +00:00
< / div >
2016-04-19 22:20:02 +00:00
{% if cc|length > 0 %}
{% for c in cc %}
< div class = "form-group" >
< label for = "{{ 'custom_column_' ~ c.id }}" > {{ c.name }}< / label >
2016-11-09 18:24:33 +00:00
{% if c.datatype == 'bool' %}
< select name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}" class = "form-control" >
< option value = "None" { % if book [ ' custom_column_ ' ~ c . id ] | length = = 0 % } selected { % endif % } > < / option >
< option value = "True" { % if book [ ' custom_column_ ' ~ c . id ] | length > 0 %}{% if book['custom_column_' ~ c.id][0].value ==true %}selected{% endif %}{% endif %} >{{_('Yes')}}< / option >
< option value = "False" { % if book [ ' custom_column_ ' ~ c . id ] | length > 0 %}{% if book['custom_column_' ~ c.id][0].value ==false %}selected{% endif %}{% endif %}>{{_('No')}}< / option >
< / select >
{% endif %}
2017-05-22 20:54:53 +00:00
2020-02-23 08:07:02 +00:00
{% if c.datatype == 'int' or c.datatype == 'float' %}
< input type = "number" step = "{% if c.datatype == 'float' %}0.01{% else %}1{% endif %}" class = "form-control" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}" value = "{% if book['custom_column_' ~ c.id]|length > 0 %}{{ book['custom_column_' ~ c.id][0].value }}{% endif %}" >
2017-05-22 20:54:53 +00:00
{% endif %}
2020-07-25 17:39:19 +00:00
{% if c.datatype == 'text' %}
2016-04-20 16:56:03 +00:00
< input type = "text" class = "form-control" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}"
{% if book['custom_column_' ~ c.id]|length > 0 %}
2020-07-25 17:39:19 +00:00
value="{% for column in book['custom_column_' ~ c.id] %}{{ column.value.strip() }}{% if not loop.last %}, {% endif %}{% endfor %}"{% endif %}>
2016-04-21 17:18:52 +00:00
{% endif %}
2020-07-25 17:39:19 +00:00
{% if c.datatype == 'series' %}
2016-04-21 17:18:52 +00:00
< input type = "text" class = "form-control" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}"
{% if book['custom_column_' ~ c.id]|length > 0 %}
2020-07-25 17:39:19 +00:00
value="{% for column in book['custom_column_' ~ c.id] %} {{ '%s [%s]' % (book['custom_column_' ~ c.id][0].value, book['custom_column_' ~ c.id][0].extra|formatfloat(2)) }}{% if not loop.last %}, {% endif %}{% endfor %}"
{% endif %}>
2016-04-19 22:20:02 +00:00
{% endif %}
2017-05-22 20:54:53 +00:00
2021-05-13 08:39:36 +00:00
{% if c.datatype == 'datetime' %}
2021-05-14 17:58:06 +00:00
< div class = "input-group" >
2021-08-01 11:50:17 +00:00
< input type = "text" class = "datepicker form-control" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}"
2021-05-13 08:39:36 +00:00
{% if book['custom_column_' ~ c.id]|length > 0 %}
value="{% if book['custom_column_' ~ c.id][0].value %}{{ book['custom_column_' ~ c.id][0].value|formatdateinput}}{% endif %}"
{% endif %}>
2021-08-01 11:50:17 +00:00
< input type = "text" class = "fake_custom_column_{{ c.id }} form-control fake-input hidden" id = "fake_pubdate_{{ c.id }}"
2021-05-13 08:39:36 +00:00
{% if book['custom_column_' ~ c.id]|length > 0 %}
value="{% if book['custom_column_' ~ c.id][0].value %}{{book['custom_column_' ~ c.id][0].value|formatdate}}{% endif %}"
{% endif %}>
2021-05-14 17:58:06 +00:00
< span class = "input-group-btn" >
2021-05-15 05:51:12 +00:00
< button type = "button" id = "{{ 'custom_column_' ~ c.id }}_delete" class = "datepicker_delete btn btn-default" > < span class = "glyphicon glyphicon-remove-circle" > < / span > < / button >
2021-05-14 17:58:06 +00:00
< / span >
2021-05-13 08:39:36 +00:00
< / div >
{% endif %}
2020-07-25 17:39:19 +00:00
2021-05-13 12:00:01 +00:00
{% if c.datatype == 'comments' %}
< textarea class = "form-control tiny_editor" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}" rows = "7" > {% if book['custom_column_' ~ c.id]|length > 0 %}{{book['custom_column_' ~ c.id][0].value}}{%endif%}< / textarea >
{% endif %}
2016-04-20 16:56:03 +00:00
{% if c.datatype == 'enumeration' %}
< select class = "form-control" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}" >
< option > < / option >
{% for opt in c.get_display_dict().enum_values %}
2017-05-22 20:54:53 +00:00
< option
2016-04-20 16:56:03 +00:00
{% if book['custom_column_' ~ c.id]|length > 0 %}
{% if book['custom_column_' ~ c.id][0].value == opt %}selected="selected"{% endif %}
{% endif %}
>{{ opt }}< / option >
{% endfor %}
< / select >
{% endif %}
2016-11-09 18:24:33 +00:00
2016-04-20 21:53:55 +00:00
{% if c.datatype == 'rating' %}
2020-07-05 12:35:57 +00:00
< input type = "number" min = "1" max = "5" step = "0.5" class = "form-control" name = "{{ 'custom_column_' ~ c.id }}" id = "{{ 'custom_column_' ~ c.id }}"
2016-04-20 16:56:03 +00:00
{% if book['custom_column_' ~ c.id]|length > 0 %}
2020-07-05 12:35:57 +00:00
value="{{ '%.1f' % (book['custom_column_' ~ c.id][0].value / 2) }}"
2016-04-20 21:53:55 +00:00
{% endif %}>
2016-04-20 16:56:03 +00:00
{% endif %}
< / div >
2016-04-19 22:20:02 +00:00
{% endfor %}
2017-05-22 20:54:53 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
< div class = "checkbox" >
< label >
2020-02-03 03:22:00 +00:00
< input name = "detail_view" type = "checkbox" checked > {{_('View Book on Save')}}
2015-08-02 18:59:11 +00:00
< / label >
< / div >
2020-02-03 03:22:00 +00:00
< a href = "#" id = "get_meta" class = "btn btn-default" data-toggle = "modal" data-target = "#metaModal" > {{_('Fetch Metadata')}}< / a >
< button type = "submit" id = "submit" class = "btn btn-default" > {{_('Save')}}< / button >
2020-05-01 06:33:50 +00:00
< a href = "{{ url_for('web.show_book', book_id=book.id) }}" id = "edit_cancel" class = "btn btn-default" > {{_('Cancel')}}< / a >
2017-04-14 18:29:11 +00:00
< / div >
< / form >
{% endif %}
2017-04-21 18:44:17 +00:00
{% endblock %}
{% block modal %}
2023-02-04 13:51:41 +00:00
{{ delete_book(current_user.role_delete_books()) }}
2020-12-20 18:17:29 +00:00
{{ delete_confirm_modal() }}
2017-04-14 18:29:11 +00:00
2017-02-21 09:49:43 +00:00
< div class = "modal fade" id = "metaModal" tabindex = "-1" role = "dialog" aria-labelledby = "metaModalLabel" >
2017-08-16 04:31:15 +00:00
< div class = "modal-dialog modal-lg" role = "document" >
2017-02-21 09:49:43 +00:00
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" > < span aria-hidden = "true" > × < / span > < / button >
2022-01-04 20:11:52 +00:00
< h4 class = "modal-title text-center" id = "metaModalLabel" > {{_('Fetch Metadata')}}< / h4 >
2017-08-16 04:31:15 +00:00
< form class = "padded-bottom" id = "meta-search" >
< div class = "input-group" >
2017-03-07 01:46:09 +00:00
< label class = "sr-only" for = "keyword" > {{_('Keyword')}}< / label >
2021-07-31 07:00:34 +00:00
< input type = "text" class = "form-control" id = "keyword" name = "keyword" placeholder = "{{_(" Search keyword " ) } } " >
2017-08-16 04:31:15 +00:00
< span class = "input-group-btn" >
2020-02-03 03:22:00 +00:00
< button type = "submit" class = "btn btn-primary" id = "do-search" > {{_("Search")}}< / button >
2017-08-16 04:31:15 +00:00
< / span >
2017-02-28 06:52:55 +00:00
< / div >
< / form >
2019-03-01 20:00:09 +00:00
< div class = "text-center" > < strong > {{_('Click the cover to load metadata to the form')}}< / strong > < / div >
2017-02-21 09:49:43 +00:00
< / div >
2017-08-16 04:31:15 +00:00
< div class = "modal-body" >
2021-07-08 17:14:38 +00:00
< div class = "text-center padded-bottom" id = "metadata_provider" >
2017-08-16 04:31:15 +00:00
< / div >
< div id = "meta-info" >
{{_("Loading...")}}
< / div >
2017-02-21 09:49:43 +00:00
< / div >
< div class = "modal-footer" >
2022-01-07 11:40:03 +00:00
< button id = "meta_close" type = "button" class = "btn btn-default" data-dismiss = "modal" > {{_('Close')}}< / button >
2017-02-21 09:49:43 +00:00
< / div >
< / div >
< / div >
< / div >
2015-08-02 18:59:11 +00:00
{% endblock %}
2016-04-15 21:35:18 +00:00
{% block js %}
2017-08-16 04:31:15 +00:00
< script type = "text/template" id = "template-book-result" >
< li class = "media" data-related = "<%= source.id %>" >
< img class = "pull-left img-responsive"
data-toggle="modal"
data-target="#metaModal"
2021-07-31 07:00:34 +00:00
src="< %= cover || "{{ url_for('static', filename='img/academicpaper.svg') }}" %>"
2017-08-16 04:31:15 +00:00
alt="Cover"
>
< div class = "media-body" >
< h4 class = "media-heading" >
2022-01-07 11:40:03 +00:00
< a class = "meta_title" href = "<%= url %>" target = "_blank" rel = "noopener" > < %= title %>< / a >
2017-08-16 04:31:15 +00:00
< / h4 >
2022-01-07 11:40:03 +00:00
< p class = "meta_author" > {{_('Author')}}: < %= authors.join(" & ") %>< / p >
2017-08-16 04:31:15 +00:00
< % if (publisher) { %>
2022-01-07 11:40:03 +00:00
< p class = "meta_publisher" > {{_('Publisher')}}: < %= publisher %>< / p >
2017-08-16 04:31:15 +00:00
< % } %>
< % if (description) { %>
2022-01-07 11:40:03 +00:00
< p class = "meta_description" > {{_('Description')}}: < %= description %>< / p >
2017-08-16 04:31:15 +00:00
< % } %>
< p > {{_('Source')}}:
2022-01-07 11:40:03 +00:00
< a class = "meta_source" href = "<%= source.link %>" target = "_blank" rel = "noopener" > < %= source.description %>< / a >
2017-08-16 04:31:15 +00:00
< / p >
< / div >
< / li >
< / script >
2017-03-07 01:46:09 +00:00
< script >
2017-03-30 19:17:18 +00:00
var i18nMsg = {
2017-03-07 01:46:09 +00:00
'loading': {{_('Loading...')|safe|tojson}},
'search_error': {{_('Search error!')|safe|tojson}},
2020-03-07 12:33:35 +00:00
'no_result': {{_('No Result(s) found! Please try another keyword.')|safe|tojson}},
2017-03-07 01:46:09 +00:00
'author': {{_('Author')|safe|tojson}},
'publisher': {{_('Publisher')|safe|tojson}},
2024-08-18 14:27:02 +00:00
'comments': {{_('Description')|safe|tojson}},
2017-03-07 01:46:09 +00:00
'source': {{_('Source')|safe|tojson}},
};
2023-02-04 10:18:43 +00:00
var language = '{{ current_user.locale }}';
2020-01-12 22:23:43 +00:00
$("#add-identifier-line").click(function() {
// create a random identifier type to have a valid name in form. This will not be used when dealing with the form
var rand_id = Math.floor(Math.random() * 1000000).toString();
var line = '< tr > ';
2020-05-12 17:08:51 +00:00
line += '< td > < input type = "text" class = "form-control" name = "identifier-type-'+ rand_id +'" required = "required" placeholder = {{_('Identifier Type ' ) | safe | tojson } } > < / td > ';
line += '< td > < input type = "text" class = "form-control" name = "identifier-val-'+ rand_id +'" required = "required" placeholder = {{_('Identifier Value ' ) | safe | tojson } } > < / td > ';
line += '< td > < a class = "btn btn-default" onclick = "removeIdentifierLine(this)" > {{_('Remove')}}< / a > < / td > ';
2020-01-12 22:23:43 +00:00
line += '< / tr > ';
$("#identifier-table").append(line);
});
function removeIdentifierLine(el) {
$(el).parent().parent().remove();
2020-04-24 14:56:08 +00:00
}
2020-01-12 22:23:43 +00:00
2017-03-07 01:46:09 +00:00
< / script >
2017-02-07 18:11:18 +00:00
< script src = "{{ url_for('static', filename='js/libs/typeahead.bundle.js') }}" > < / script >
2017-03-07 18:10:17 +00:00
< script src = "{{ url_for('static', filename='js/libs/bootstrap-rating-input.min.js') }}" > < / script >
2017-02-28 06:52:55 +00:00
< script src = "{{ url_for('static', filename='js/get_meta.js') }}" > < / script >
2017-06-22 15:47:20 +00:00
< script src = "{{ url_for('static', filename='js/libs/tinymce/tinymce.min.js') }}" > < / script >
2017-07-10 16:22:21 +00:00
< script src = "{{ url_for('static', filename='js/libs/bootstrap-datepicker/bootstrap-datepicker.min.js') }}" > < / script >
2023-02-04 10:18:43 +00:00
{% if not current_user.locale == 'en' %}
< script src = "{{ url_for('static', filename='js/libs/bootstrap-datepicker/locales/bootstrap-datepicker.' + current_user.locale + '.min.js') }}" charset = "UTF-8" > < / script >
2017-07-10 16:22:21 +00:00
{% endif %}
2017-07-18 15:51:52 +00:00
< script src = "{{ url_for('static', filename='js/edit_books.js') }}" > < / script >
2021-05-26 17:40:41 +00:00
< script src = "{{ url_for('static', filename='js/fullscreen.js') }}" > < / script >
2016-04-15 21:35:18 +00:00
{% endblock %}
{% block header %}
2019-11-21 16:12:05 +00:00
< meta name = "referrer" content = "never" >
2017-02-07 18:11:18 +00:00
< link href = "{{ url_for('static', filename='css/libs/typeahead.css') }}" rel = "stylesheet" media = "screen" >
2017-07-10 16:22:21 +00:00
< link href = "{{ url_for('static', filename='css/libs/bootstrap-datepicker3.min.css') }}" rel = "stylesheet" media = "screen" >
2016-04-15 21:35:18 +00:00
{% endblock %}