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
67dd4a72
Commit
67dd4a72
authored
Jun 26, 2020
by
Michael Knepher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add series info to all book "meta" displays
parent
54cf3652
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
author.html
cps/templates/author.html
+16
-0
index.html
cps/templates/index.html
+1
-1
shelfdown.html
cps/templates/shelfdown.html
+8
-1
web.py
cps/web.py
+2
-1
No files found.
cps/templates/author.html
View file @
67dd4a72
...
...
@@ -70,6 +70,14 @@
{% endif %}
{% endfor %}
</p>
{% if entry.series.__len__() > 0 %}
<p
class=
"series"
>
<a
href=
"{{url_for('web.books_list', data='series', sort='new', book_id=entry.series[0].id )}}"
>
{{entry.series[0].name}}
</a>
({{entry.series_index}})
</p>
{% endif %}
{% if entry.ratings.__len__() > 0 %}
<div
class=
"rating"
>
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
...
...
@@ -114,6 +122,14 @@
{% endif %}
{% endfor %}
</p>
{% if entry.series.__len__() > 0 %}
<p
class=
"series"
>
<a
href=
"{{url_for('web.books_list', data='series', sort='new', book_id=entry.series[0].id )}}"
>
{{entry.series[0].name}}
</a>
({{entry.series_index}})
</p>
{% endif %}
<div
class=
"rating"
>
{% for number in range((entry.average_rating)|float|round|int(2)) %}
<span
class=
"glyphicon glyphicon-star good"
></span>
...
...
cps/templates/index.html
View file @
67dd4a72
cps/templates/shelfdown.html
View file @
67dd4a72
...
...
@@ -43,7 +43,14 @@
{% endif %}
{% endfor %}
</p>
{% if entry.series.__len__() > 0 %}
<p
class=
"series"
>
<a
href=
"{{url_for('web.books_list', data='series', sort='new', book_id=entry.series[0].id )}}"
>
{{entry.series[0].name}}
</a>
({{entry.series_index}})
</p>
{% endif %}
</div>
<div
class=
"btn-group"
role=
"group"
aria-label=
"Download, send to Kindle, reading"
>
...
...
cps/web.py
View file @
67dd4a72
...
...
@@ -841,8 +841,9 @@ def books_table():
@
login_required_if_no_ano
def
author_list
():
if
current_user
.
check_visibility
(
constants
.
SIDEBAR_AUTHOR
):
entries
=
calibre_db
.
session
.
query
(
db
.
Authors
,
func
.
count
(
'books_authors_link.book'
)
.
label
(
'count'
))
\
entries
=
calibre_db
.
session
.
query
(
db
.
Authors
,
func
.
count
(
'books_authors_link.book'
)
.
label
(
'count'
)
,
db
.
Series
)
\
.
join
(
db
.
books_authors_link
)
.
join
(
db
.
Books
)
.
filter
(
calibre_db
.
common_filters
())
\
.
join
(
db
.
books_series_link
)
.
join
(
db
.
Series
)
.
filter
(
calibre_db
.
common_filters
())
\
.
group_by
(
text
(
'books_authors_link.author'
))
.
order_by
(
db
.
Authors
.
sort
)
.
all
()
charlist
=
calibre_db
.
session
.
query
(
func
.
upper
(
func
.
substr
(
db
.
Authors
.
sort
,
1
,
1
))
.
label
(
'char'
))
\
.
join
(
db
.
books_authors_link
)
.
join
(
db
.
Books
)
.
filter
(
calibre_db
.
common_filters
())
\
...
...
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