Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
f8139f31
Commit
f8139f31
authored
Jul 11, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store last selected view for sidebar (not for categories, series, publishers, ..)
Started making search paged
parent
df01022f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
246 additions
and
208 deletions
+246
-208
filter_list.js
cps/static/js/filter_list.js
+9
-3
author.html
cps/templates/author.html
+9
-9
detail.html
cps/templates/detail.html
+4
-4
discover.html
cps/templates/discover.html
+2
-2
grid.html
cps/templates/grid.html
+2
-2
index.html
cps/templates/index.html
+11
-11
languages.html
cps/templates/languages.html
+1
-1
layout.html
cps/templates/layout.html
+1
-1
list.html
cps/templates/list.html
+1
-1
search.html
cps/templates/search.html
+9
-13
search_form.html
cps/templates/search_form.html
+1
-1
shelf.html
cps/templates/shelf.html
+2
-2
shelfdown.html
cps/templates/shelfdown.html
+1
-1
web.py
cps/web.py
+193
-157
No files found.
cps/static/js/filter_list.js
View file @
f8139f31
...
...
@@ -19,6 +19,14 @@ var direction = 0; // Descending order
var
sort
=
0
;
// Show sorted entries
$
(
"#sort_name"
).
click
(
function
()
{
/*$.ajax({
method:"post",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: window.location.pathname + "/../../ajax/view",
data: "{" + st + "}",
});*/
var
count
=
0
;
var
index
=
0
;
var
store
;
...
...
@@ -40,9 +48,7 @@ $("#sort_name").click(function() {
count
++
;
}
});
/*listItems.sort(function(a,b){
return $(a).children()[1].innerText.localeCompare($(b).children()[1].innerText)
});*/
// Find count of middle element
if
(
count
>
20
)
{
var
middle
=
parseInt
(
count
/
2
,
10
)
+
(
count
%
2
);
...
...
cps/templates/author.html
View file @
f8139f31
...
...
@@ -23,14 +23,14 @@
<h3>
{{_("In Library")}}
</h3>
{% endif %}
<div
class=
"filterheader hidden-xs hidden-sm"
>
<a
id=
"new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort='new')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort='old')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
id=
"asc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort='abc')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet"
></span></a>
<a
id=
"desc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort='zyx')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet-alt"
></span></a>
<a
id=
"pub_new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort='pubnew')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"pub_old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort='pubold')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
id=
"new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort
_param
='new')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort
_param
='old')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
id=
"asc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort
_param
='abc')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet"
></span></a>
<a
id=
"desc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort
_param
='zyx')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet-alt"
></span></a>
<a
id=
"pub_new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort
_param
='pubnew')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"pub_old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data='author', book_id=id, sort
_param
='pubold')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<!--div class="btn-group character" role="group">
<a id="no_shelf" class="btn btn-primary" href="{{url_for('web.books_list', data='author', book_id=id, sort='pubold')}}"><span class="glyphicon glyphicon-list"></span><b>?</b></a>
<a id="no_shelf" class="btn btn-primary" href="{{url_for('web.books_list', data='author', book_id=id, sort
_param
='pubold')}}"><span class="glyphicon glyphicon-list"></span><b>?</b></a>
<div id="all" class="btn btn-primary">{{_('All')}}</div>
</div-->
</div>
...
...
@@ -53,7 +53,7 @@
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{g.config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
...
...
@@ -61,7 +61,7 @@
{% if not loop.first %}
<span>
&
</span>
{% endif %}
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% endif %}
{% endfor %}
{% for format in entry.data %}
...
...
cps/templates/detail.html
View file @
f8139f31
...
...
@@ -92,7 +92,7 @@
<h2
id=
"title"
>
{{entry.title|shortentitle(40)}}
</h2>
<p
class=
"author"
>
{% for author in entry.authors %}
<a
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id ) }}"
>
{{author.name.replace('|',',')}}
</a>
<a
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id ) }}"
>
{{author.name.replace('|',',')}}
</a>
{% if not loop.last %}
&
{% endif %}
...
...
@@ -114,7 +114,7 @@
{% endif %}
{% if entry.series|length > 0 %}
<p>
{{_('Book')}} {{entry.series_index}} {{_('of')}}
<a
href=
"{{url_for('web.books_list', data='series',
sort
='abc', book_id=entry.series[0].id)}}"
>
{{entry.series[0].name}}
</a></p>
<p>
{{_('Book')}} {{entry.series_index}} {{_('of')}}
<a
href=
"{{url_for('web.books_list', data='series',
sort_param
='abc', book_id=entry.series[0].id)}}"
>
{{entry.series[0].name}}
</a></p>
{% endif %}
{% if entry.languages.__len__() > 0 %}
...
...
@@ -143,7 +143,7 @@
<span
class=
"glyphicon glyphicon-tags"
></span>
{% for tag in entry.tags %}
<a
href=
"{{ url_for('web.books_list', data='category', sort='new', book_id=tag.id) }}"
class=
"btn btn-xs btn-info"
role=
"button"
>
{{tag.name}}
</a>
<a
href=
"{{ url_for('web.books_list', data='category', sort
_param
='new', book_id=tag.id) }}"
class=
"btn btn-xs btn-info"
role=
"button"
>
{{tag.name}}
</a>
{%endfor%}
</p>
...
...
@@ -154,7 +154,7 @@
<div
class=
"publishers"
>
<p>
<span>
{{_('Publisher')}}:
<a
href=
"{{url_for('web.books_list', data='publisher', sort='new', book_id=entry.publishers[0].id ) }}"
>
{{entry.publishers[0].name}}
</a>
<a
href=
"{{url_for('web.books_list', data='publisher', sort
_param
='new', book_id=entry.publishers[0].id ) }}"
>
{{entry.publishers[0].name}}
</a>
</span>
</p>
</div>
...
...
cps/templates/discover.html
View file @
f8139f31
...
...
@@ -22,7 +22,7 @@
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{g.config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
...
...
@@ -30,7 +30,7 @@
{% if not loop.first %}
<span>
&
</span>
{% endif %}
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% endif %}
{% endfor %}
</p>
...
...
cps/templates/grid.html
View file @
f8139f31
...
...
@@ -27,13 +27,13 @@
{% for entry in entries %}
<div
class=
"col-sm-3 col-lg-2 col-xs-6 book sortable"
{%
if
entry
[
0
].
sort
%}
data-name=
"{{entry[0].series[0].name}}"
{%
endif
%}
data-id=
"{% if entry[0].series[0].name %}{{entry[0].series[0].name}}{% endif %}"
>
<div
class=
"cover"
>
<a
href=
"{{url_for('web.books_list', data=data, sort='new', book_id=entry[0].series[0].id )}}"
>
<a
href=
"{{url_for('web.books_list', data=data, sort
_param
='new', book_id=entry[0].series[0].id )}}"
>
<img
src=
"{{ url_for('web.get_cover', book_id=entry[0].id) }}"
alt=
"{{ entry[0].name }}"
/>
<span
class=
"badge"
>
{{entry.count}}
</span>
</a>
</div>
<div
class=
"meta"
>
<a
href=
"{{url_for('web.books_list', data=data, sort='new', book_id=entry[0].series[0].id )}}"
>
<a
href=
"{{url_for('web.books_list', data=data, sort
_param
='new', book_id=entry[0].series[0].id )}}"
>
<p
class=
"title"
>
{{entry[0].series[0].name|shortentitle}}
</p>
</a>
</div>
...
...
cps/templates/index.html
View file @
f8139f31
...
...
@@ -21,7 +21,7 @@
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{g.config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
...
...
@@ -29,7 +29,7 @@
{% if not loop.first %}
<span>
&
</span>
{% endif %}
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% endif %}
{% endfor %}
</p>
...
...
@@ -54,14 +54,14 @@
<div
class=
"discover load-more"
>
<h2
class=
"{{title}}"
>
{{_(title)}}
</h2>
<div
class=
"filterheader hidden-xs hidden-sm"
>
<a
data-toggle=
"tooltip"
id=
"new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort='new')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort='old')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
id=
"asc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort='abc')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet"
></span></a>
<a
id=
"desc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort='zyx')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet-alt"
></span></a>
<a
id=
"pub_new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort='pubnew')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"pub_old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort='pubold')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
data-toggle=
"tooltip"
id=
"new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort
_param
='new')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort
_param
='old')}}"
><span
class=
"glyphicon glyphicon-book"
></span>
<span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
id=
"asc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort
_param
='abc')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet"
></span></a>
<a
id=
"desc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort
_param
='zyx')}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet-alt"
></span></a>
<a
id=
"pub_new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort
_param
='pubnew')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"pub_old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, book_id=id, sort
_param
='pubold')}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<!--div class="btn-group character">
<a id="no_shelf" class="btn btn-primary" href="{{url_for('web.books_list', data=page, book_id=id, sort='pubold')}}"><span class="glyphicon glyphicon-list"></span> <b>{{_('Group by series')}}</b></a>
<a id="no_shelf" class="btn btn-primary" href="{{url_for('web.books_list', data=page, book_id=id, sort
_param
='pubold')}}"><span class="glyphicon glyphicon-list"></span> <b>{{_('Group by series')}}</b></a>
</div-->
</div>
...
...
@@ -84,7 +84,7 @@
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', book_id=author.id, sort='new') }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', book_id=author.id, sort
_param
='new') }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{g.config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
...
...
@@ -92,7 +92,7 @@
{% if not loop.first %}
<span>
&
</span>
{% endif %}
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', book_id=author.id, sort='new') }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', book_id=author.id, sort
_param
='new') }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% endif %}
{% endfor %}
{% for format in entry.data %}
...
...
cps/templates/languages.html
View file @
f8139f31
...
...
@@ -10,7 +10,7 @@
{% endif %}
<div
class=
"row"
>
<div
class=
"col-xs-2 col-sm-2 col-md-1"
align=
"left"
><span
class=
"badge"
>
{{lang_counter[loop.index0].bookcount}}
</span></div>
<div
class=
"col-xs-10 col-sm-10 col-md-11"
><a
id=
"list_{{loop.index0}}"
href=
"{{url_for('web.books_list', book_id=lang.lang_code, data=data, sort='new')}}"
>
{{lang.name}}
</a></div>
<div
class=
"col-xs-10 col-sm-10 col-md-11"
><a
id=
"list_{{loop.index0}}"
href=
"{{url_for('web.books_list', book_id=lang.lang_code, data=data, sort
_param
='new')}}"
>
{{lang.name}}
</a></div>
</div>
{% endfor %}
</div>
...
...
cps/templates/layout.html
View file @
f8139f31
...
...
@@ -128,7 +128,7 @@
<li
class=
"nav-head hidden-xs"
>
{{_('Browse')}}
</li>
{% for element in sidebar %}
{% if g.user.check_visibility(element['visibility']) and element['public'] %}
<li
id=
"nav_{{element['id']}}"
{%
if
page =
=
element
['
page
']
%}
class=
"active"
{%
endif
%}
><a
href=
"{{url_for(element['link'], data=element['page'], sort
='new
')}}"
><span
class=
"glyphicon {{element['glyph']}}"
></span>
{{_(element['text'])}}
</a></li>
<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>
{% endif %}
{% endfor %}
{% if g.user.is_authenticated or g.allow_anonymous %}
...
...
cps/templates/list.html
View file @
f8139f31
...
...
@@ -32,7 +32,7 @@
{% endif %}
<div
class=
"row"
{%
if
entry
[
0
].
sort
%}
data-name=
"{{entry[0].name}}"
{%
endif
%}
data-id=
"{% if entry[0].sort %}{{entry[0].sort}}{% else %}{% if entry.name %}{{entry.name}}{% else %}{{entry[0].name}}{% endif %}{% endif %}"
>
<div
class=
"col-xs-2 col-sm-2 col-md-1"
align=
"left"
><span
class=
"badge"
>
{{entry.count}}
</span></div>
<div
class=
"col-xs-10 col-sm-10 col-md-11"
><a
id=
"list_{{loop.index0}}"
href=
"{% if entry.format %}{{url_for('web.books_list', data=data, sort
='new', book_id=entry.format )}}{% else %}{{url_for('web.books_list', data=data, sort
='new', book_id=entry[0].id )}}{% endif %}"
>
<div
class=
"col-xs-10 col-sm-10 col-md-11"
><a
id=
"list_{{loop.index0}}"
href=
"{% if entry.format %}{{url_for('web.books_list', data=data, sort
_param='new', book_id=entry.format )}}{% else %}{{url_for('web.books_list', data=data, sort_param
='new', book_id=entry[0].id )}}{% endif %}"
>
{% if entry.name %}
<div
class=
"rating"
>
{% for number in range(entry.name) %}
...
...
cps/templates/search.html
View file @
f8139f31
...
...
@@ -25,18 +25,14 @@
</div>
{% endif %}
{% endif %}
<
!--div class="filterheader hidden-xs hidden-sm"--
><!-- ToDo: Implement filter for search results -->
<
!--a id="new" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort='new'
)}}"><span class="glyphicon glyphicon-sort-by-order"></span></a>
<a id="old" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort
='old'
)}}"><span class="glyphicon glyphicon-sort-by-order-alt"></span></a>
<a id="asc" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort
='abc'
)}}"><span class="glyphicon glyphicon-font"></span><span class="glyphicon glyphicon-sort-by-alphabet"></span></a>
<a id="desc" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort
='zyx'
)}}"><span class="glyphicon glyphicon-font"></span><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></a>
<a id="pub_new" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort
='pubnew'
)}}"><span class="glyphicon glyphicon-calendar"></span><span class="glyphicon glyphicon-sort-by-order"></span></a>
<a id="pub_old" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort
='pubold'
)}}"><span class="glyphicon glyphicon-calendar"></span><span class="glyphicon glyphicon-sort-by-order-alt"></span></a>
<
div
class=
"filterheader hidden-xs hidden-sm"
>
<!-- ToDo: Implement filter for search results -->
<
a
id=
"new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, sort_param='new', query=query
)}}"
><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, sort
_param='old', query=query
)}}"
><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
<a
id=
"asc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, sort
_param='abc', query=query
)}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet"
></span></a>
<a
id=
"desc"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, sort
_param='zyx', query=query
)}}"
><span
class=
"glyphicon glyphicon-font"
></span><span
class=
"glyphicon glyphicon-sort-by-alphabet-alt"
></span></a>
<a
id=
"pub_new"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, sort
_param='pubnew', query=query
)}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order"
></span></a>
<a
id=
"pub_old"
class=
"btn btn-primary"
href=
"{{url_for('web.books_list', data=page, sort
_param='pubold', query=query
)}}"
><span
class=
"glyphicon glyphicon-calendar"
></span><span
class=
"glyphicon glyphicon-sort-by-order-alt"
></span></a>
</div>
<div class="btn-group character" role="group">
<a id="no_shelf" class="btn btn-primary" href="{{url_for('web.books_list', data=page, sort='pubold')}}"><span class="glyphicon glyphicon-list"></span><b>?</b></a>
<div id="all" class="btn btn-primary">{{_('All')}}</div>
</div-->
{% endif %}
<div
class=
"row"
>
...
...
@@ -59,7 +55,7 @@
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{g.config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
...
...
@@ -67,7 +63,7 @@
{% if not loop.first %}
<span>
&
</span>
{% endif %}
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% endif %}
{% endfor %}
{% for format in entry.data %}
...
...
cps/templates/search_form.html
View file @
f8139f31
{% extends "layout.html" %}
{% block body %}
<div
class=
"col-md-10 col-lg-6"
>
<form
role=
"form"
id=
"search"
action=
"{{ url_for('web.advanced_search
') }}"
method=
"GE
T"
>
<form
role=
"form"
id=
"search"
action=
"{{ url_for('web.advanced_search
_form') }}"
method=
"POS
T"
>
<div
class=
"form-group"
>
<label
for=
"book_title"
>
{{_('Book Title')}}
</label>
<input
type=
"text"
class=
"form-control"
name=
"book_title"
id=
"book_title"
value=
""
>
...
...
cps/templates/shelf.html
View file @
f8139f31
...
...
@@ -31,7 +31,7 @@
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{g.config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
...
...
@@ -39,7 +39,7 @@
{% if not loop.first %}
<span>
&
</span>
{% endif %}
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name"
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% endif %}
{% endfor %}
</p>
...
...
cps/templates/shelfdown.html
View file @
f8139f31
...
...
@@ -37,7 +37,7 @@
<p
class=
"title"
>
{{entry.title|shortentitle}}
</p>
<p
class=
"author"
>
{% for author in entry.authors %}
<a
href=
"{{url_for('web.books_list', data='author', sort='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')}}
</a>
<a
href=
"{{url_for('web.books_list', data='author', sort
_param
='new', book_id=author.id) }}"
>
{{author.name.replace('|',',')}}
</a>
{% if not loop.last %}
&
{% endif %}
...
...
cps/web.py
View file @
f8139f31
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment