2017-07-06 09:21:35 -07:00
{% extends is_xhr|yesno("fragment.html", "layout.html") %}
2015-08-02 11:59:11 -07:00
{% block body %}
< div class = "single" >
< div class = "row" >
2017-03-14 11:48:17 -07:00
< div class = "col-sm-3 col-lg-3 col-xs-5" >
2015-08-02 11:59:11 -07:00
< div class = "cover" >
2021-09-29 23:43:31 -07:00
<!-- Always use full - sized image for the detail page -->
2022-01-26 22:35:45 -08:00
< img id = "detailcover" title = "{{entry.title}}" src = "{{url_for('web.get_cover', book_id=entry.id, resolution='og', c=entry|last_modified)}}" / >
2015-08-02 11:59:11 -07:00
< / div >
< / div >
2016-04-03 14:33:29 -07:00
< div class = "col-sm-9 col-lg-9 book-meta" >
2017-07-08 02:01:40 -07:00
< div class = "btn-toolbar" role = "toolbar" >
2022-05-08 03:55:54 -07:00
< div class = "btn-group" role = "group" aria-label = "Download, send to E-Reader, reading" >
2020-11-22 01:03:10 -08:00
{% if g.user.role_download() %}
2018-02-03 23:05:08 -08:00
{% if entry.data|length %}
2017-07-08 02:01:40 -07:00
< div class = "btn-group" role = "group" >
2018-07-15 09:50:35 -07:00
{% if entry.data|length < 2 % }
2019-02-23 09:28:25 -08:00
< button id = "Download" type = "button" class = "btn btn-primary" >
2018-02-03 23:05:08 -08:00
{{_('Download')}} :
< / button >
{% for format in entry.data %}
2019-07-13 11:45:48 -07:00
< a href = "{{ url_for('web.download_link', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format|lower) }}" id = "btnGroupDrop1{{format.format|lower}}" class = "btn btn-primary" role = "button" >
2018-02-03 23:05:08 -08:00
< span class = "glyphicon glyphicon-download" > < / span > {{format.format}} ({{ format.uncompressed_size|filesizeformat }})
< / a >
{% endfor %}
{% else %}
< button id = "btnGroupDrop1" type = "button" class = "btn btn-primary dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
< span class = "glyphicon glyphicon-download" > < / span > {{_('Download')}}
< span class = "caret" > < / span >
< / button >
< ul class = "dropdown-menu" aria-labelledby = "btnGroupDrop1" >
{% for format in entry.data %}
2019-07-13 11:45:48 -07:00
< li > < a href = "{{ url_for('web.download_link', book_id=entry.id, book_format=format.format|lower, anyname=entry.id|string+'.'+format.format|lower) }}" > {{format.format}} ({{ format.uncompressed_size|filesizeformat }})< / a > < / li >
2018-02-03 23:05:08 -08:00
{% endfor %}
< / ul >
{% endif %}
2017-07-08 02:01:40 -07:00
< / div >
2018-02-03 23:05:08 -08:00
{% endif %}
2017-07-08 02:01:40 -07:00
{% endif %}
2022-05-08 03:55:54 -07:00
{% if g.user.kindle_mail and entry.email_share_list %}
{% if entry.email_share_list.__len__() == 1 %}
< div id = "sendbtn" data-action = "{{url_for('web.send_to_ereader', book_id=entry.id, book_format=entry.email_share_list[0]['format'], convert=entry.email_share_list[0]['convert'])}}" data-text = "{{_('Send to E-Reader')}}" class = "btn btn-primary postAction" role = "button" > < span class = "glyphicon glyphicon-send" > < / span > {{entry.email_share_list[0]['text']}}< / div >
2018-11-18 08:09:13 -08:00
{% else %}
< div class = "btn-group" role = "group" >
2019-01-18 10:43:26 -08:00
< button id = "sendbtn2" type = "button" class = "btn btn-primary dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
2022-05-08 03:55:54 -07:00
< span class = "glyphicon glyphicon-send" > < / span > {{_('Send to E-Reader')}}
2018-11-18 08:09:13 -08:00
< span class = "caret" > < / span >
< / button >
2022-05-08 03:55:54 -07:00
< ul class = "dropdown-menu" aria-labelledby = "send-to-ereader" >
{% for format in entry.email_share_list %}
< li > < a class = "postAction" data-action = "{{url_for('web.send_to_ereader', book_id=entry.id, book_format=format['format'], convert=format['convert'])}}" > {{format['text']}}< / a > < / li >
2018-11-18 08:09:13 -08:00
{%endfor%}
< / ul >
< / div >
{% endif %}
2017-07-08 02:01:40 -07:00
{% endif %}
2021-10-24 00:48:29 -07:00
{% if entry.reader_list and g.user.role_viewer() %}
2017-07-08 02:01:40 -07:00
< div class = "btn-group" role = "group" >
2021-10-24 00:48:29 -07:00
{% if entry.reader_list|length > 1 %}
2017-07-28 20:02:53 -07:00
< button id = "read-in-browser" type = "button" class = "btn btn-primary dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
2021-05-16 04:24:42 -07:00
< span class = "glyphicon glyphicon-book" > < / span > {{_('Read in Browser')}}
2017-07-08 02:01:40 -07:00
< span class = "caret" > < / span >
< / button >
2018-02-03 23:05:08 -08:00
< ul class = "dropdown-menu" aria-labelledby = "read-in-browser" >
2021-10-24 00:48:29 -07:00
{% for format in entry.reader_list %}
2019-07-13 11:45:48 -07:00
< li > < a target = "_blank" href = "{{ url_for('web.read_book', book_id=entry.id, book_format=format) }}" > {{format}}< / a > < / li >
2018-02-03 23:05:08 -08:00
{%endfor%}
< / ul >
2021-03-15 00:58:50 -07:00
{% else %}
2021-10-24 00:48:29 -07:00
< a target = "_blank" href = "{{url_for('web.read_book', book_id=entry.id, book_format=entry.reader_list[0])}}" id = "readbtn" class = "btn btn-primary" role = "button" > < span class = "glyphicon glyphicon-book" > < / span > {{_('Read in Browser')}} - {{entry.reader_list[0]}}< / a >
2021-03-15 00:58:50 -07:00
{% endif %}
2017-07-08 02:01:40 -07:00
< / div >
2019-07-13 11:45:48 -07:00
{% endif %}
2022-04-28 12:40:48 -07:00
{% if entry.audio_entries|length > 0 and g.user.role_viewer() %}
2019-07-13 11:45:48 -07:00
< div class = "btn-group" role = "group" >
2022-04-28 12:40:48 -07:00
{% if entry.audio_entries|length > 1 %}
2019-07-13 11:45:48 -07:00
< button id = "listen-in-browser" type = "button" class = "btn btn-primary dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
2020-02-02 19:22:00 -08:00
< span class = "glyphicon glyphicon-music" > < / span > {{_('Listen in Browser')}}
2019-07-13 11:45:48 -07:00
< span class = "caret" > < / span >
< / button >
2021-03-15 00:58:50 -07:00
< ul class = "dropdown-menu" aria-labelledby = "listen-in-browser" >
2021-10-24 00:48:29 -07:00
{% for format in entry.reader_list %}
2019-07-13 11:45:48 -07:00
< li > < a target = "_blank" href = "{{ url_for('web.read_book', book_id=entry.id, book_format=format) }}" > {{format}}< / a > < / li >
{%endfor%}
< / ul >
< ul class = "dropdown-menu" aria-labelledby = "listen-in-browser" >
{% for format in entry.data %}
2022-04-28 12:40:48 -07:00
{% if format.format|lower in entry.audio_entries %}
2020-09-21 09:24:50 -07:00
< li > < a target = "_blank" href = "{{ url_for('web.read_book', book_id=entry.id, book_format=format.format|lower) }}" > {{format.format|lower }}< / a > < / li >
2019-07-13 11:45:48 -07:00
{% endif %}
{% endfor %}
< / ul >
2021-03-15 00:58:50 -07:00
{% else %}
2022-04-28 12:40:48 -07:00
< a target = "_blank" href = "{{url_for('web.read_book', book_id=entry.id, book_format=entry.audio_entries[0])}}" id = "listenbtn" class = "btn btn-primary" role = "button" > < span class = "glyphicon glyphicon-music" > < / span > {{_('Listen in Browser')}} - {{entry.audio_entries[0]}}< / a >
2021-03-15 00:58:50 -07:00
{% endif %}
2019-07-13 11:45:48 -07:00
< / div >
{% endif %}
2017-07-08 02:01:40 -07:00
< / div >
< / div >
2021-01-30 05:57:59 -08:00
< h2 id = "title" > {{entry.title}}< / h2 >
2016-04-15 14:35:18 -07:00
< p class = "author" >
2022-03-12 07:51:50 -08:00
{% for author in entry.ordered_authors %}
2021-05-13 00:41:27 -07:00
< a href = "{{url_for('web.books_list', data='author', sort_param='stored', book_id=author.id ) }}" > {{author.name.replace('|',',')}}< / a >
2016-04-15 14:35:18 -07:00
{% if not loop.last %}
&
{% endif %}
{% endfor %}
< / p >
2015-08-02 11:59:11 -07:00
{% if entry.ratings.__len__() > 0 %}
< div class = "rating" >
2015-10-12 16:21:46 -07:00
< p >
2015-08-02 11:59:11 -07:00
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
< span class = "glyphicon glyphicon-star good" > < / span >
{% if loop.last and loop.index < 5 % }
{% for numer in range(5 - loop.index) %}
2020-06-03 11:14:07 -07:00
< span class = "glyphicon glyphicon-star-empty" > < / span >
2015-08-02 11:59:11 -07:00
{% endfor %}
{% endif %}
{% endfor %}
2015-10-12 16:21:46 -07:00
< / p >
2015-08-02 11:59:11 -07:00
< / div >
{% endif %}
{% if entry.series|length > 0 %}
2021-08-27 00:43:32 -07:00
< p > {{_("Book %(index)s of %(range)s", index=entry.series_index | formatfloat(2), range=(url_for('web.books_list', data='series', sort_param='stored', book_id=entry.series[0].id)|escapedlink(entry.series[0].name))|safe)}}< / p >
2021-08-01 08:09:29 -07:00
2015-08-02 11:59:11 -07:00
{% endif %}
2015-10-12 16:21:46 -07:00
{% if entry.languages.__len__() > 0 %}
< div class = "languages" >
< p >
2020-02-02 19:22:00 -08:00
< span class = "label label-default" > {{_('Language')}}: {% for language in entry.languages %}{{language.language_name}}{% if not loop.last %}, {% endif %}{% endfor %}< / span >
2015-10-12 16:21:46 -07:00
< / p >
< / div >
{% endif %}
2016-12-27 01:36:06 -08:00
{% if entry.identifiers|length > 0 %}
< div class = "identifiers" >
2017-02-22 11:59:48 -08:00
< p >
2016-12-27 01:36:06 -08:00
< span class = "glyphicon glyphicon-link" > < / span >
{% for identifier in entry.identifiers %}
2022-03-13 04:34:21 -07:00
< a href = "{{identifier}}" target = "_blank" class = "btn btn-xs btn-success" role = "button" > {{identifier.format_type()}}< / a >
2016-12-27 01:36:06 -08:00
{%endfor%}
< / p >
2017-07-09 03:41:09 -07:00
< / div >
2016-12-27 01:36:06 -08:00
{% endif %}
2015-08-02 11:59:11 -07:00
{% if entry.tags|length > 0 %}
2017-07-09 03:41:09 -07:00
2015-10-12 16:21:46 -07:00
< div class = "tags" >
2017-07-09 03:41:09 -07:00
< p >
2015-10-12 16:21:46 -07:00
< span class = "glyphicon glyphicon-tags" > < / span >
2017-04-12 00:53:32 -07:00
2015-08-02 11:59:11 -07:00
{% for tag in entry.tags %}
2021-05-13 00:41:27 -07:00
< a href = "{{ url_for('web.books_list', data='category', sort_param='stored', book_id=tag.id) }}" class = "btn btn-xs btn-info" role = "button" > {{tag.name}}< / a >
2015-08-02 11:59:11 -07:00
{%endfor%}
2015-10-12 16:21:46 -07:00
< / p >
2017-07-09 03:41:09 -07:00
< / div >
2015-08-02 11:59:11 -07:00
{% endif %}
2018-09-30 09:30:24 -07:00
2017-02-22 11:59:48 -08:00
{% if entry.publishers|length > 0 %}
< div class = "publishers" >
2018-09-30 09:30:24 -07:00
< p >
< span > {{_('Publisher')}}:
2021-05-13 00:41:27 -07:00
< a href = "{{url_for('web.books_list', data='publisher', sort_param='stored', book_id=entry.publishers[0].id ) }}" > {{entry.publishers[0].name}}< / a >
2018-09-30 09:30:24 -07:00
< / span >
< / p >
2017-02-22 11:59:48 -08:00
< / div >
{% endif %}
2018-09-30 09:30:24 -07:00
2020-06-06 00:52:35 -07:00
{% if (entry.pubdate|string)[:10] != '0101-01-01' %}
2019-01-07 22:10:10 -08:00
< div class = "publishing-date" >
2020-02-02 19:22:00 -08:00
< p > {{_('Published')}}: {{entry.pubdate|formatdate}} < / p >
2019-01-07 22:10:10 -08:00
< / div >
2017-02-03 04:44:13 -08:00
{% endif %}
2016-04-19 15:20:02 -07:00
{% if cc|length > 0 %}
2017-07-09 03:41:09 -07:00
2019-05-30 00:19:37 -07:00
2016-04-19 15:20:02 -07:00
{% for c in cc %}
2019-05-30 00:19:37 -07:00
< div class = "real_custom_columns" >
2016-04-19 15:20:02 -07:00
{% if entry['custom_column_' ~ c.id]|length > 0 %}
2017-04-12 00:53:32 -07:00
{{ c.name }}:
2016-04-19 15:20:02 -07:00
{% for column in entry['custom_column_' ~ c.id] %}
2016-04-21 03:59:49 -07:00
{% if c.datatype == 'rating' %}
2020-07-25 10:39:19 -07:00
{{ (column.value / 2)|formatfloat }}
2016-04-21 03:59:49 -07:00
{% else %}
2016-11-09 10:24:33 -08:00
{% if c.datatype == 'bool' %}
{% if column.value == true %}
< span class = "glyphicon glyphicon-ok" > < / span >
{% else %}
< span class = "glyphicon glyphicon-remove" > < / span >
{% endif %}
2020-07-23 10:31:48 -07:00
{% else %}
{% if c.datatype == 'float' %}
2020-07-25 10:39:19 -07:00
{{ column.value|formatfloat(2) }}
2021-05-13 01:39:36 -07:00
{% elif c.datatype == 'datetime' %}
{{ column.value|formatdate }}
2021-05-13 05:00:01 -07:00
{% elif c.datatype == 'comments' %}
{{column.value|safe}}
{% elif c.datatype == 'series' %}
2020-07-25 10:39:19 -07:00
{{ '%s [%s]' % (column.value, column.extra|formatfloat(2)) }}
2021-10-17 05:29:13 -07:00
{% elif c.datatype == 'text' %}
{{ column.value.strip() }}{% if not loop.last %}, {% endif %}
2016-11-09 10:24:33 -08:00
{% else %}
{{ column.value }}
{% endif %}
2020-07-23 10:31:48 -07:00
{% endif %}
2016-04-21 03:59:49 -07:00
{% endif %}
2016-04-19 15:20:02 -07:00
{% endfor %}
{% endif %}
2017-07-09 03:41:09 -07:00
< / div >
2019-05-30 00:19:37 -07:00
{% endfor %}
2017-04-12 00:53:32 -07:00
{% endif %}
2017-10-10 07:18:28 -07:00
{% if not g.user.is_anonymous %}
2017-07-09 03:41:09 -07:00
2017-07-06 10:33:47 -07:00
< div class = "custom_columns" >
2017-07-09 03:41:09 -07:00
< p >
2019-07-13 11:45:48 -07:00
< form id = "have_read_form" action = "{{ url_for('web.toggle_read', book_id=entry.id)}}" method = "POST" >
2021-10-04 08:50:32 -07:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2017-07-06 10:33:47 -07:00
< label class = "block-label" >
2021-10-24 00:48:29 -07:00
< input id = "have_read_cb" data-checked = "{{_('Mark As Unread')}}" data-unchecked = "{{_('Mark As Read')}}" type = "checkbox" { % if entry . read_status % } checked { % endif % } >
2017-07-06 10:33:47 -07:00
< span > {{_('Read')}}< / span >
< / label >
2017-02-19 12:08:22 -08:00
< / form >
2017-07-09 03:41:09 -07:00
< / p >
2020-05-09 01:58:59 -07:00
{% if g.user.check_visibility(32768) %}
2020-01-25 15:29:17 -08:00
< p >
< form id = "archived_form" action = "{{ url_for('web.toggle_archived', book_id=entry.id)}}" method = "POST" >
2021-10-04 08:50:32 -07:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2020-01-25 15:29:17 -08:00
< label class = "block-label" >
2021-10-24 12:22:08 -07:00
< input id = "archived_cb" data-checked = "{{_('Restore from archive')}}" data-unchecked = "{{_('Add to archive')}}" type = "checkbox" { % if entry . is_archived % } checked { % endif % } >
2020-01-25 15:29:17 -08:00
< span > {{_('Archived')}}< / span >
< / label >
< / form >
< / p >
2020-05-09 01:58:59 -07:00
{% endif %}
2017-02-19 12:08:22 -08:00
< / div >
2017-03-02 15:56:07 -08:00
{% endif %}
2017-04-12 00:53:32 -07:00
2015-08-02 11:59:11 -07:00
2017-02-03 04:44:13 -08:00
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0%}
2018-09-23 10:15:50 -07:00
< div class = "comments" >
2019-05-30 00:19:37 -07:00
< h3 id = "decription" > {{_('Description:')}}< / h3 >
2018-09-23 10:15:50 -07:00
{{entry.comments[0].text|safe}}
< / div >
2015-08-02 11:59:11 -07:00
{% endif %}
2017-01-12 11:43:36 -08:00
2017-07-09 03:41:09 -07:00
< div class = "more-stuff" >
2017-01-12 11:43:36 -08:00
{% if g.user.is_authenticated %}
2020-04-02 09:23:24 -07:00
{% if g.user.shelf.all() or g.shelves_access %}
2017-07-22 11:24:47 -07:00
< div id = "shelf-actions" class = "btn-toolbar" role = "toolbar" >
2015-10-12 16:21:46 -07:00
< div class = "btn-group" role = "group" aria-label = "Add to shelves" >
2017-07-28 20:02:53 -07:00
< button id = "add-to-shelf" type = "button" class = "btn btn-primary btn-sm dropdown-toggle" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
2017-07-21 20:42:01 -07:00
< span class = "glyphicon glyphicon-list" > < / span > {{_('Add to shelf')}}
< span class = "caret" > < / span >
< / button >
2017-07-28 20:02:53 -07:00
< ul id = "add-to-shelves" class = "dropdown-menu" aria-labelledby = "add-to-shelf" >
2020-04-02 09:23:24 -07:00
{% for shelf in g.shelves_access %}
2020-04-26 02:34:10 -07:00
{% if not shelf.id in books_shelfs and ( not shelf.is_public or g.user.role_edit_shelfs() ) %}
2017-07-21 20:42:01 -07:00
< li >
2022-01-25 10:30:17 -08:00
< a data-href = "{{ url_for('shelf.add_to_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
2019-07-13 11:45:48 -07:00
data-remove-href="{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
2017-07-21 20:42:01 -07:00
data-shelf-action="add"
>
2020-05-12 05:37:13 -07:00
{{shelf.name}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
2015-10-12 16:21:46 -07:00
< / a >
2017-07-21 20:42:01 -07:00
< / li >
{% endif %}
{%endfor%}
< / ul >
< / div >
< div id = "remove-from-shelves" class = "btn-group" role = "group" aria-label = "Remove from shelves" >
{% if books_shelfs %}
2020-04-02 09:23:24 -07:00
{% for shelf in g.shelves_access %}
2017-07-21 20:42:01 -07:00
{% if shelf.id in books_shelfs %}
2022-01-25 10:30:17 -08:00
< a data-href = "{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
2019-07-13 11:45:48 -07:00
data-add-href="{{ url_for('shelf.add_to_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
2017-07-21 20:42:01 -07:00
class="btn btn-sm btn-default" role="button" data-shelf-action="remove"
>
2020-04-26 02:34:10 -07:00
< span { % if not shelf . is_public or g . user . role_edit_shelfs ( ) % }
class="glyphicon glyphicon-remove"
2020-05-12 05:37:13 -07:00
{% endif %}>< / span > {{shelf.name}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
2017-07-21 20:42:01 -07:00
< / a >
{% endif %}
{%endfor%}
{% endif %}
2015-10-12 16:21:46 -07:00
< / div >
2017-07-21 20:42:01 -07:00
< div id = "shelf-action-errors" class = "pull-left" role = "alert" > < / div >
2015-10-12 16:21:46 -07:00
< / div >
{% endif %}
2017-07-09 03:41:09 -07:00
2017-01-12 11:43:36 -08:00
{% endif %}
2020-11-22 01:03:10 -08:00
{% if g.user.role_edit() %}
2015-10-12 16:21:46 -07:00
< div class = "btn-toolbar" role = "toolbar" >
< div class = "btn-group" role = "group" aria-label = "Edit/Delete book" >
2022-03-20 03:21:15 -07:00
< a href = "{{ url_for('edit-book.show_edit_book', book_id=entry.id) }}" class = "btn btn-sm btn-primary" id = "edit_book" role = "button" > < span class = "glyphicon glyphicon-edit" > < / span > {{_('Edit Metadata')}}< / a >
2017-07-09 03:41:09 -07:00
< / div >
2015-10-12 16:21:46 -07:00
< / div >
{% endif %}
2017-07-09 03:41:09 -07:00
< / div >
2015-08-02 11:59:11 -07:00
< / div >
< / div >
2017-07-21 20:42:01 -07:00
< / div >
2015-08-02 11:59:11 -07:00
{% endblock %}
2017-02-19 12:08:22 -08:00
{% block js %}
2017-08-12 22:24:56 -07:00
< script type = "text/template" id = "template-shelf-add" >
< li >
2022-01-25 10:30:17 -08:00
< a data-href = "<%= add %>" data-remove-href = "<%= remove %>" data-shelf-action = "add" >
2017-08-12 22:24:56 -07:00
< %= content %>
< / a >
< / li >
< / script >
< script type = "text/template" id = "template-shelf-remove" >
2022-01-25 10:30:17 -08:00
< a data-href = "<%= remove %>" data-add-href = "<%= add %>" class = "btn btn-sm btn-default" data-shelf-action = "remove" >
2017-08-12 22:24:56 -07:00
< span class = "glyphicon glyphicon-remove" > < / span > < %= content %>
< / a >
< / script >
2017-07-21 20:42:01 -07:00
< script src = "{{ url_for('static', filename='js/details.js') }}" > < / script >
2021-05-26 10:40:41 -07:00
< script src = "{{ url_for('static', filename='js/fullscreen.js') }}" > < / script >
2017-02-19 12:08:22 -08:00
{% endblock %}