2021-03-16 14:40:58 +00:00
{% from 'modal_dialogs.html' import restrict_modal, delete_book, filechooser_modal, delete_confirm_modal, change_confirm_modal %}
2021-09-25 08:04:38 +00:00
{% import 'image.html' as image %}
2015-08-02 18:59:11 +00:00
<!DOCTYPE html>
2017-07-29 03:03:23 +00:00
< html lang = "{{ g.user.locale }}" >
2015-08-02 18:59:11 +00:00
< head >
2017-01-22 20:30:36 +00:00
< title > {{instance}} | {{title}}< / title >
2015-08-02 18:59:11 +00:00
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" >
< meta name = "apple-mobile-web-app-capable" content = "yes" >
2022-11-10 16:02:50 +00:00
{% if g.google_site_verification|length > 0 %}
2022-12-25 09:32:01 +00:00
< meta name = "google-site-verification" content = "{{g.google_site_verification}}" >
2022-11-10 16:02:50 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
<!-- Bootstrap -->
2018-01-14 13:15:07 +00:00
< link rel = "apple-touch-icon" sizes = "140x140" href = "{{ url_for('static', filename='favicon.ico') }}" >
2016-03-27 21:36:51 +00:00
< link rel = "shortcut icon" href = "{{ url_for('static', filename='favicon.ico') }}" >
2017-02-07 18:11:18 +00:00
< link href = "{{ url_for('static', filename='css/libs/bootstrap.min.css') }}" rel = "stylesheet" media = "screen" >
2020-01-05 15:43:48 +00:00
{% block header %}{% endblock %}
2015-08-02 18:59:11 +00:00
< link href = "{{ url_for('static', filename='css/style.css') }}" rel = "stylesheet" media = "screen" >
2019-02-16 09:05:51 +00:00
< link href = "{{ url_for('static', filename='css/upload.css') }}" rel = "stylesheet" media = "screen" >
2019-01-11 07:36:28 +00:00
{% if g.current_theme == 1 %}
2020-10-10 10:22:52 +00:00
< link href = "{{ url_for('static', filename='css/caliBlur.css') }}" rel = "stylesheet" media = "screen" >
2020-04-13 21:15:44 +00:00
< link href = "{{ url_for('static', filename='css/caliBlur_override.css') }}" rel = "stylesheet" media = "screen" >
2018-04-02 08:09:19 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- [if lt IE 9]>
< script src = "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js" > < / script >
< script src = "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js" > < / script >
<![endif]-->
< / head >
2022-12-25 18:06:35 +00:00
< body class = "{{ page }} {{ bodyClass }}{% if g.current_theme == 1 %} blur{% endif %}" data-text = "{{_('Home')}}" data-textback = "{{_('Back')}}" >
2015-08-02 18:59:11 +00:00
<!-- Static navbar -->
< div class = "navbar navbar-default navbar-static-top" role = "navigation" >
< div class = "container-fluid" >
< div class = "navbar-header" >
< button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = ".navbar-collapse" >
2020-02-03 03:22:00 +00:00
< span class = "sr-only" > {{_('Toggle Navigation')}}< / span >
2015-08-02 18:59:11 +00:00
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< span class = "icon-bar" > < / span >
< / button >
2019-07-13 18:45:48 +00:00
< a class = "navbar-brand" href = "{{url_for('web.index')}}" > {{instance}}< / a >
2015-08-02 18:59:11 +00:00
< / div >
2022-10-21 19:52:04 +00:00
{% if g.current_theme == 1 %}
< div class = "home-btn" > < a class = "home-btn-tooltip" href = "/" data-toggle = "tooltip" title = "" data-placement = "bottom" data-original-title = "Home" > < / a > < / div >
< div class = "plexBack" > < a href = "{{url_for('web.index')}}" > < / a > < / div >
{% endif %}
2019-07-13 18:45:48 +00:00
{% if g.user.is_authenticated or g.allow_anonymous %}
2022-04-26 09:28:20 +00:00
< form class = "navbar-form navbar-left" role = "search" action = "{{url_for('search.simple_search')}}" method = "GET" >
2017-02-18 09:38:16 +00:00
< div class = "form-group input-group input-group-sm" >
2017-07-29 03:03:43 +00:00
< label for = "query" class = "sr-only" > {{_('Search')}}< / label >
2020-04-19 11:12:02 +00:00
< input type = "text" class = "form-control" id = "query" name = "query" placeholder = "{{_('Search Library')}}" value = "{{searchterm}}" >
2017-02-18 09:38:16 +00:00
< span class = "input-group-btn" >
2020-02-23 12:27:36 +00:00
< button type = "submit" id = "query_submit" class = "btn btn-default" > {{_('Search')}}< / button >
2017-02-18 09:38:16 +00:00
< / span >
< / div >
< / form >
{% endif %}
2015-08-02 18:59:11 +00:00
< div class = "navbar-collapse collapse" >
2019-07-13 18:45:48 +00:00
{% if g.user.is_authenticated or g.allow_anonymous %}
2015-08-02 18:59:11 +00:00
< ul class = "nav navbar-nav " >
2022-04-26 09:28:20 +00:00
< li > < a href = "{{url_for('search.advanced_search')}}" id = "advanced_search" > < span class = "glyphicon glyphicon-search" > < / span > < span class = "hidden-sm" > {{_('Advanced Search')}}< / span > < / a > < / li >
2015-08-02 18:59:11 +00:00
< / ul >
2016-11-09 18:24:33 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
< ul class = "nav navbar-nav navbar-right" id = "main-nav" >
2019-07-13 18:45:48 +00:00
{% if g.user.is_authenticated or g.allow_anonymous %}
2022-10-21 19:52:04 +00:00
{% if g.current_theme == 1 %}
< li class = "dropdown" > < a href = "#" class = "dropdown-toggle profileDrop" data-toggle = "dropdown" role = "button" aria-haspopup = "true" aria-expanded = "false" > < span class = "glyphicon glyphicon-user" > < / span > < / a >
< ul class = "dropdown-menu profileDropli" >
< li > < a id = "top_user" data-text = "{{_('Account')}}" href = "{{url_for('web.profile')}}" > < span class = "glyphicon glyphicon-user" > < / span > < span class = "hidden-sm" > {{g.user.name}}< / span > < / a > < / li >
{% if g.allow_registration and not g.user.is_authenticated %}
< li > < a id = "login" href = "{{url_for('web.login')}}" > < span class = "glyphicon glyphicon-log-in" > < / span > {{_('Login')}}< / a > < / li >
< li > < a id = "register" href = "{{url_for('web.register')}}" > < span class = "glyphicon glyphicon-user" > < / span > {{_('Register')}}< / a > < / li >
{% endif %}
{% if not g.user.is_anonymous %}
< li > < a id = "logout" href = "{{url_for('web.logout')}}" > < span class = "glyphicon glyphicon-log-out" > < / span > < span class = "hidden-sm" > {{_('Logout')}}< / span > < / a > < / li >
{% endif %}
< / ul >
< / li >
{% endif %}
2021-11-24 16:35:09 +00:00
{% if g.user.role_upload() and g.allow_upload %}
2018-03-06 12:31:46 +00:00
< li >
2022-03-13 11:34:21 +00:00
< form id = "form-upload" class = "navbar-form" 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" >
2021-10-06 16:41:01 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2018-03-06 12:31:46 +00:00
< div class = "form-group" >
2019-02-27 18:30:13 +00:00
< span class = "btn btn-default btn-file" > {{_('Upload')}}< input id = "btn-upload" name = "btn-upload"
2020-09-08 18:57:39 +00:00
type="file" accept="{% for format in accept %}.{% if format != ''%}{{format}}{% else %}*{% endif %}{{ ',' if not loop.last }}{% endfor %}" multiple>< / span >
2018-03-06 12:31:46 +00:00
< / div >
< / form >
< / li >
2016-04-15 17:39:25 +00:00
{% endif %}
2022-03-25 17:30:12 +00:00
{% if not g.user.is_anonymous and not simple%}
2022-10-21 19:52:04 +00:00
< li class = "top_tasks" > < a id = "top_tasks" href = "{{url_for('tasks.get_tasks_status')}}" > < span class = "glyphicon glyphicon-tasks" > < / span > < span class = "hidden-sm" > {{_('Tasks')}}< / span > < / a > < / li >
2018-07-30 18:12:41 +00:00
{% endif %}
2016-04-27 08:35:23 +00:00
{% if g.user.role_admin() %}
2020-02-03 03:22:00 +00:00
< li > < a id = "top_admin" data-text = "{{_('Settings')}}" href = "{{url_for('admin.admin')}}" > < span class = "glyphicon glyphicon-dashboard" > < / span > < span class = "hidden-sm" > {{_('Admin')}}< / span > < / a > < / li >
2015-08-02 18:59:11 +00:00
{% endif %}
2022-10-21 19:52:04 +00:00
{% if g.current_theme == 0 %}
2021-03-21 17:55:02 +00:00
< li > < a id = "top_user" data-text = "{{_('Account')}}" href = "{{url_for('web.profile')}}" > < span class = "glyphicon glyphicon-user" > < / span > < span class = "hidden-sm" > {{g.user.name}}< / span > < / a > < / li >
2022-10-21 19:52:04 +00:00
{% if not g.user.is_anonymous %}
< li > < a id = "logout" href = "{{url_for('web.logout')}}" > < span class = "glyphicon glyphicon-log-out" > < / span > < span class = "hidden-sm" > {{_('Logout')}}< / span > < / a > < / li >
{% endif %}
2015-10-13 00:30:55 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
{% endif %}
2022-10-21 19:52:04 +00:00
{% if g.allow_registration and not g.user.is_authenticated and g.current_theme == 0 %}
2019-07-13 18:45:48 +00:00
< li > < a id = "login" href = "{{url_for('web.login')}}" > < span class = "glyphicon glyphicon-log-in" > < / span > {{_('Login')}}< / a > < / li >
< li > < a id = "register" href = "{{url_for('web.register')}}" > < span class = "glyphicon glyphicon-user" > < / span > {{_('Register')}}< / a > < / li >
2016-11-09 18:24:33 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
< / ul >
< / div > <!-- /.nav - collapse -->
< / div >
< / div >
{% for message in get_flashed_messages(with_categories=True) %}
{%if message[0] == "error" %}
2021-08-01 11:50:17 +00:00
< div class = "row-fluid text-center" >
2021-04-13 17:08:02 +00:00
< div id = "flash_danger" class = "alert alert-danger" > {{ message[1] }}< / div >
2015-08-02 18:59:11 +00:00
< / div >
{%endif%}
{%if message[0] == "info" %}
2021-08-01 11:50:17 +00:00
< div class = "row-fluid text-center" >
2017-02-15 17:09:17 +00:00
< div id = "flash_info" class = "alert alert-info" > {{ message[1] }}< / div >
2015-08-02 18:59:11 +00:00
< / div >
{%endif%}
2019-11-26 07:19:03 +00:00
{%if message[0] == "warning" %}
2021-08-01 11:50:17 +00:00
< div class = "row-fluid text-center" >
2019-11-26 07:19:03 +00:00
< div id = "flash_warning" class = "alert alert-warning" > {{ message[1] }}< / div >
< / div >
{%endif%}
2015-08-02 18:59:11 +00:00
{%if message[0] == "success" %}
2021-08-01 11:50:17 +00:00
< div class = "row-fluid text-center" >
2017-02-15 17:09:17 +00:00
< div id = "flash_success" class = "alert alert-success" > {{ message[1] }}< / div >
2015-08-02 18:59:11 +00:00
< / div >
{%endif%}
{% endfor %}
2021-05-26 11:35:35 +00:00
{% block flash %}{% endblock %}
2019-02-20 19:00:08 +00:00
{% if g.current_theme == 1 %}
< div id = "loader" hidden = "true" >
< center >
< h3 > {{_('Uploading...')}}< / h3 >
2020-02-23 19:07:21 +00:00
< span > {{_("Please do not refresh the page")}}< / span > .
2019-02-20 19:00:08 +00:00
< / center >
< / div >
{%endif%}
2015-08-02 18:59:11 +00:00
< div class = "container-fluid" >
< div class = "row-fluid" >
2019-07-13 18:45:48 +00:00
{% if g.user.is_authenticated or g.allow_anonymous %}
2015-08-02 18:59:11 +00:00
< div class = "col-sm-2" >
< nav class = "navigation" >
< ul class = "list-unstyled" id = "scnd-nav" intent in-standard-append = "nav.navigation" in-mobile-after = "#main-nav" in-mobile-class = "nav navbar-nav" >
2016-11-09 18:24:33 +00:00
< li class = "nav-head hidden-xs" > {{_('Browse')}}< / li >
2019-07-13 18:45:48 +00:00
{% for element in sidebar %}
{% if g.user.check_visibility(element['visibility']) and element['public'] %}
2021-08-10 18:17:30 +00:00
< li id = "nav_{{element['id']}}" { % if page = = element [ ' page ' ] % } class = "active" { % endif % } > < a href = "{{url_for(element['link'], data=element['page'], sort_param='stored')}}" > < span class = "glyphicon {{element['glyph']}}" > < / span > {{_(element['text'])}}< / a > < / li >
2019-07-13 18:45:48 +00:00
{% endif %}
{% endfor %}
2019-08-14 00:39:52 +00:00
{% if g.user.is_authenticated or g.allow_anonymous %}
2020-04-02 16:23:24 +00:00
< li class = "nav-head hidden-xs public-shelves" > {{_('Shelves')}}< / li >
{% for shelf in g.shelves_access %}
2021-09-29 17:26:21 +00:00
< li > < a href = "{{url_for('shelf.show_shelf', shelf_id=shelf.id)}}" > < span class = "glyphicon glyphicon-list shelf" > < / span > {{shelf.name|shortentitle(40)}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}< / a > < / li >
2015-08-02 18:59:11 +00:00
{% endfor %}
2017-10-10 14:18:28 +00:00
{% if not g.user.is_anonymous %}
2019-07-13 18:45:48 +00:00
< li id = "nav_createshelf" class = "create-shelf" > < a href = "{{url_for('shelf.create_shelf')}}" > {{_('Create a Shelf')}}< / a > < / li >
2020-02-03 03:22:00 +00:00
< li id = "nav_about" { % if page = = ' stat ' % } class = "active" { % endif % } > < a href = "{{url_for('about.stats')}}" > < span class = "glyphicon glyphicon-info-sign" > < / span > {{_('About')}}< / a > < / li >
2016-11-09 18:24:33 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
{% endif %}
2017-01-12 19:43:36 +00:00
2015-08-02 18:59:11 +00:00
< / ul >
< / nav >
< / div >
2016-11-09 18:24:33 +00:00
{% endif %}
2015-08-02 18:59:11 +00:00
< div class = "col-sm-10" >
{% block body %}{% endblock %}
2017-02-15 17:09:17 +00:00
{% if pagination and (pagination.has_next or pagination.has_prev) %}
2015-08-02 18:59:11 +00:00
< div class = "pagination" >
2017-07-28 14:37:25 +00:00
{% if pagination.has_prev %}
2020-08-30 00:58:30 +00:00
< li class = "page-item page-previous" > < a class = "page-link" aria-label = "next page" href = "{{ ( pagination . page - 1 ) | url_for_other_page
2020-06-09 18:46:02 +00:00
}}">« {{_('Previous')}}< / a > < / li >
2017-07-28 14:37:25 +00:00
{% endif %}
2017-02-15 17:09:17 +00:00
{% for page in pagination.iter_pages() %}
2015-08-02 18:59:11 +00:00
{% if page %}
{% if page != pagination.page %}
2020-06-09 18:46:02 +00:00
< li class = "page-item" > < a class = "page-link" aria-label = "to page {{ page }}" href = "{{ (page)|url_for_other_page }}" > {{ page }}< / a > < / li >
2015-08-02 18:59:11 +00:00
{% else %}
2020-06-09 18:46:02 +00:00
< li class = "page-item active" > < a class = "page-link" aria-label = "to page {{ page }}" href = "{{ (page)|url_for_other_page }}" > {{ page }}< / a > < / li >
2015-08-02 18:59:11 +00:00
{% endif %}
{% else %}
2020-06-09 18:46:02 +00:00
< li class = "page-item page-last-separator disabled" > < a class = "page-link" aria-label = "" > …< / a > < / li >
2015-08-02 18:59:11 +00:00
{% endif %}
2017-02-15 17:09:17 +00:00
{% endfor %}
2015-08-02 18:59:11 +00:00
{% if pagination.has_next %}
2020-10-10 14:51:46 +00:00
< li class = "page-item page-next" > < a class = "page-link next" aria-label = "next page" href = "{{ ( pagination . page + 1 ) | url_for_other_page
2020-06-09 18:46:02 +00:00
}}">{{_('Next')}} » < / a > < / li >
2015-08-02 18:59:11 +00:00
{% endif %}
< / div >
{% endif %}
< / div >
< / div >
2020-06-11 06:48:23 +00:00
< / div >
2017-07-06 16:21:35 +00:00
< div class = "modal fade" id = "bookDetailsModal" tabindex = "-1" role = "dialog" aria-labelledby = "bookDetailsModalLabel" >
< div class = "modal-dialog modal-lg" role = "document" >
< 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 >
< h4 class = "modal-title" id = "bookDetailsModalLabel" > {{_('Book Details')}}< / h4 >
< / div >
< div class = "modal-body" > ...< / div >
< div class = "modal-footer" >
2022-01-17 17:38:37 +00:00
< button type = "button" id = "details_close" class = "btn btn-default" data-dismiss = "modal" > {{_('Close')}}< / button >
2017-07-06 16:21:35 +00:00
< / div >
< / div >
< / div >
< / div >
2017-04-21 18:44:17 +00:00
{% block modal %}{% endblock %}
2017-07-29 03:07:10 +00:00
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
< script src = "{{ url_for('static', filename='js/libs/jquery.min.js') }}" > < / script >
<!-- Include all compiled plugins (below), or include individual files as needed -->
< script src = "{{ url_for('static', filename='js/libs/bootstrap.min.js') }}" > < / script >
2021-05-14 07:29:24 +00:00
< script src = "{{ url_for('static', filename='js/libs/underscore-umd-min.js') }}" > < / script >
2017-07-29 03:07:10 +00:00
< script src = "{{ url_for('static', filename='js/libs/intention.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/context.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/plugins.js') }}" > < / script >
2021-05-14 07:29:24 +00:00
< script src = "{{ url_for('static', filename='js/libs/jquery.form.min.js') }}" > < / script >
2019-02-16 09:05:51 +00:00
< script src = "{{ url_for('static', filename='js/uploadprogress.js') }}" > < / script >
2020-12-20 18:17:29 +00:00
< script src = "{{ url_for('static', filename='js/main.js') }}" > < / script >
{% if g.current_theme == 1 %}
< script src = "{{ url_for('static', filename='js/libs/jquery.visible.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/compromise.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/readmore.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/caliBlur.js') }}" > < / script >
{% endif %}
2016-04-15 21:35:18 +00:00
{% block js %}{% endblock %}
2015-08-02 18:59:11 +00:00
< / body >
2016-11-09 18:24:33 +00:00
< / html >