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
6e714f3f
Commit
6e714f3f
authored
Nov 17, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #391
parent
211c3b16
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
16 deletions
+13
-16
index.xml
cps/templates/index.xml
+1
-1
layout.html
cps/templates/layout.html
+4
-2
web.py
cps/web.py
+8
-13
No files found.
cps/templates/index.xml
View file @
6e714f3f
...
...
@@ -41,13 +41,13 @@
<id>
{{url_for('feed_read_books')}}
</id>
<content
type=
"text"
>
{{_('Read Books')}}
</content>
</entry>
{% endif %}
<entry>
<title>
{{_('Unread Books')}}
</title>
<link
rel=
"subsection"
href=
"{{url_for('feed_unread_books')}}"
type=
"application/atom+xml;profile=opds-catalog"
/>
<id>
{{url_for('feed_unread_books')}}
</id>
<content
type=
"text"
>
{{_('Unread Books')}}
</content>
</entry>
{% endif %}
<entry>
<title>
{{_('Authors')}}
</title>
<link
rel=
"subsection"
href=
"{{url_for('feed_authorindex')}}"
type=
"application/atom+xml;profile=opds-catalog"
/>
...
...
cps/templates/layout.html
View file @
6e714f3f
...
...
@@ -128,7 +128,9 @@
<li><a
href=
"{{url_for('best_rated_books')}}"
><span
class=
"glyphicon glyphicon-star"
></span>
{{_('Best rated Books')}}
</a></li>
{%endif%}
{% if g.user.show_read_and_unread() %}
{% if not g.user.is_anonymous %}
<li><a
href=
"{{url_for('read_books')}}"
><span
class=
"glyphicon glyphicon-eye-open"
></span>
{{_('Read Books')}}
</a></li>
{%endif%}
<li><a
href=
"{{url_for('unread_books')}}"
><span
class=
"glyphicon glyphicon-eye-close"
></span>
{{_('Unread Books')}}
</a></li>
{%endif%}
{% if g.user.show_random_books() %}
...
...
cps/web.py
View file @
6e714f3f
...
...
@@ -1757,7 +1757,6 @@ def feed_get_cover(book_id):
def
render_read_books
(
page
,
are_read
,
as_xml
=
False
):
if
not
current_user
.
is_anonymous
:
readBooks
=
ub
.
session
.
query
(
ub
.
ReadBook
)
.
filter
(
ub
.
ReadBook
.
user_id
==
int
(
current_user
.
id
))
.
filter
(
ub
.
ReadBook
.
is_read
==
True
)
.
all
()
readBookIds
=
[
x
.
book_id
for
x
in
readBooks
]
if
are_read
:
...
...
@@ -1767,10 +1766,6 @@ def render_read_books(page, are_read, as_xml=False):
entries
,
random
,
pagination
=
fill_indexpage
(
page
,
db
.
Books
,
db_filter
,
db
.
Books
.
timestamp
.
desc
())
else
:
entries
=
[]
random
=
False
pagination
=
Pagination
(
page
,
1
,
0
)
if
as_xml
:
xml
=
render_title_template
(
'feed.xml'
,
entries
=
entries
,
pagination
=
pagination
)
...
...
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