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
4550333f
Commit
4550333f
authored
Apr 02, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added redirect after create shelf
parent
3ba610eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
+2
-8
opds.py
cps/opds.py
+1
-6
shelf.py
cps/shelf.py
+1
-0
layout.html
cps/templates/layout.html
+0
-2
No files found.
cps/opds.py
View file @
4550333f
...
...
@@ -310,17 +310,12 @@ def feed_languages(book_id):
return
render_xml_template
(
'feed.xml'
,
entries
=
entries
,
pagination
=
pagination
)
@
opds
.
route
(
"/opds/shelfindex"
)
#, defaults={'public': 0})
# @opds.route("/opds/shelfindex/<string:public>")
@
opds
.
route
(
"/opds/shelfindex"
)
@
requires_basic_auth_if_no_ano
def
feed_shelfindex
():
off
=
request
.
args
.
get
(
"offset"
)
or
0
# if public != 0:
shelf
=
g
.
shelves_access
number
=
len
(
shelf
)
#else:
#shelf = g.user.shelf
# number = shelf.count()
pagination
=
Pagination
((
int
(
off
)
/
(
int
(
config
.
config_books_per_page
))
+
1
),
config
.
config_books_per_page
,
number
)
return
render_xml_template
(
'feed.xml'
,
listelements
=
shelf
,
folder
=
'opds.feed_shelf'
,
pagination
=
pagination
)
...
...
cps/shelf.py
View file @
4550333f
...
...
@@ -226,6 +226,7 @@ def create_shelf():
ub
.
session
.
add
(
shelf
)
ub
.
session
.
commit
()
flash
(
_
(
u"Shelf
%(title)
s created"
,
title
=
to_save
[
"title"
]),
category
=
"success"
)
return
redirect
(
url_for
(
'shelf.show_shelf'
,
shelf_id
=
shelf
.
id
))
except
Exception
:
flash
(
_
(
u"There was an error"
),
category
=
"error"
)
return
render_title_template
(
'shelf_edit.html'
,
shelf
=
shelf
,
title
=
_
(
u"create a shelf"
),
page
=
"shelfcreate"
)
...
...
cps/templates/layout.html
View file @
4550333f
...
...
@@ -125,8 +125,6 @@
<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"
>
<li
class=
"nav-head hidden-xs"
>
{{_('Browse')}}
</li>
{% if g.user.check_visibility(1024) %}
<!-- ToDo: eliminate -->
{%endif%}
{% 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>
...
...
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