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
e8ce8809
Commit
e8ce8809
authored
Jan 26, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix viewing Publisher settings for other users
Fix Visiblilty of read/unread category
parent
9128615f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
server.py
cps/server.py
+1
-1
user_edit.html
cps/templates/user_edit.html
+3
-1
web.py
cps/web.py
+5
-0
No files found.
cps/server.py
View file @
e8ce8809
...
...
@@ -25,7 +25,7 @@ import signal
import
web
try
:
from
gevent.p
i
wsgi
import
WSGIServer
from
gevent.p
y
wsgi
import
WSGIServer
from
gevent.pool
import
Pool
from
gevent
import
__version__
as
geventVersion
gevent_present
=
True
...
...
cps/templates/user_edit.html
View file @
e8ce8809
...
...
@@ -16,7 +16,7 @@
{% if ( g.user and g.user.role_passwd() or g.user.role_admin() ) and not content.role_anonymous() %}
{% if g.user and g.user.role_admin() and g.allow_registration and not new_user and not profile %}
<div
class=
"btn btn-default"
id=
"resend_password"
><a
href=
"{{url_for('reset_password', user_id = content.id) }}"
>
{{_('Reset user Password')}}
</a></div>
{% else %}
{% else %}
<div
class=
"form-group"
>
<label
for=
"password"
>
{{_('Password')}}
</label>
<input
type=
"password"
class=
"form-control"
name=
"password"
id=
"password"
value=
""
autocomplete=
"off"
>
...
...
@@ -85,10 +85,12 @@
<input
type=
"checkbox"
name=
"show_publisher"
id=
"show_publisher"
{%
if
content
.
show_publisher
()
%}
checked
{%
endif
%}
>
<label
for=
"show_publisher"
>
{{_('Show publisher selection')}}
</label>
</div>
{% if not content.role_anonymous() %}
<div
class=
"form-group"
>
<input
type=
"checkbox"
name=
"show_read_and_unread"
id=
"show_read_and_unread"
{%
if
content
.
show_read_and_unread
()
%}
checked
{%
endif
%}
>
<label
for=
"show_read_and_unread"
>
{{_('Show read and unread')}}
</label>
</div>
{% endif %}
<div
class=
"form-group"
>
<input
type=
"checkbox"
name=
"show_detail_random"
id=
"show_detail_random"
{%
if
content
.
show_detail_random
()
%}
checked
{%
endif
%}
>
<label
for=
"show_detail_random"
>
{{_('Show random books in detail view')}}
</label>
...
...
cps/web.py
View file @
e8ce8809
...
...
@@ -3280,6 +3280,11 @@ def edit_user(user_id):
elif
"show_sorted"
not
in
to_save
and
content
.
show_sorted
():
content
.
sidebar_view
-=
ub
.
SIDEBAR_SORTED
if
"show_publisher"
in
to_save
and
not
content
.
show_publisher
():
content
.
sidebar_view
+=
ub
.
SIDEBAR_PUBLISHER
elif
"show_publisher"
not
in
to_save
and
content
.
show_publisher
():
content
.
sidebar_view
-=
ub
.
SIDEBAR_PUBLISHER
if
"show_hot"
in
to_save
and
not
content
.
show_hot_books
():
content
.
sidebar_view
+=
ub
.
SIDEBAR_HOT
elif
"show_hot"
not
in
to_save
and
content
.
show_hot_books
():
...
...
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