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
a0a15b45
Commit
a0a15b45
authored
Mar 10, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix max authors shown
parent
76d40411
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
14 deletions
+15
-14
author.html
cps/templates/author.html
+4
-4
discover.html
cps/templates/discover.html
+2
-2
index.html
cps/templates/index.html
+4
-4
search.html
cps/templates/search.html
+2
-2
shelf.html
cps/templates/shelf.html
+2
-2
web.py
cps/web.py
+1
-0
No files found.
cps/templates/author.html
View file @
a0a15b45
...
@@ -41,13 +41,13 @@
...
@@ -41,13 +41,13 @@
</a>
</a>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
{% if not loop.first %}
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if not loop.first %}
{% if not loop.first %}
...
@@ -91,10 +91,10 @@
...
@@ -91,10 +91,10 @@
<p
class=
"title"
>
{{entry.title|shortentitle}}
</p>
<p
class=
"title"
>
{{entry.title|shortentitle}}
</p>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
<a
class=
"author-name author-hidden"
href=
"https://www.goodreads.com/author/show/{{ author.gid }}"
target=
"_blank"
rel=
"noopener"
>
{{author.name.replace('|',',')}}
</a>
<a
class=
"author-name author-hidden"
href=
"https://www.goodreads.com/author/show/{{ author.gid }}"
target=
"_blank"
rel=
"noopener"
>
{{author.name.replace('|',',')}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
<a
class=
"author-name"
href=
"https://www.goodreads.com/author/show/{{ author.gid }}"
target=
"_blank"
rel=
"noopener"
>
{{author.name.replace('|',',')}}
</a>
<a
class=
"author-name"
href=
"https://www.goodreads.com/author/show/{{ author.gid }}"
target=
"_blank"
rel=
"noopener"
>
{{author.name.replace('|',',')}}
</a>
...
...
cps/templates/discover.html
View file @
a0a15b45
...
@@ -19,13 +19,13 @@
...
@@ -19,13 +19,13 @@
</a>
</a>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
{% if not loop.first %}
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if not loop.first %}
{% if not loop.first %}
...
...
cps/templates/index.html
View file @
a0a15b45
...
@@ -22,13 +22,13 @@
...
@@ -22,13 +22,13 @@
</a>
</a>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
{% if not loop.first %}
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if not loop.first %}
{% if not loop.first %}
...
@@ -77,13 +77,13 @@
...
@@ -77,13 +77,13 @@
</a>
</a>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
{% if not loop.first %}
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if not loop.first %}
{% if not loop.first %}
...
...
cps/templates/search.html
View file @
a0a15b45
...
@@ -46,13 +46,13 @@
...
@@ -46,13 +46,13 @@
</a>
</a>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
{% if not loop.first %}
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if not loop.first %}
{% if not loop.first %}
...
...
cps/templates/shelf.html
View file @
a0a15b45
...
@@ -28,13 +28,13 @@
...
@@ -28,13 +28,13 @@
</a>
</a>
<p
class=
"author"
>
<p
class=
"author"
>
{% for author in entry.authors %}
{% for author in entry.authors %}
{% if loop.index >
config_authors_max and
config_authors_max != 0 %}
{% if loop.index >
g.config_authors_max and g.
config_authors_max != 0 %}
{% if not loop.first %}
{% if not loop.first %}
<span
class=
"author-hidden-divider"
>
&
</span>
<span
class=
"author-hidden-divider"
>
&
</span>
{% endif %}
{% endif %}
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
<a
class=
"author-name author-hidden"
href=
"{{url_for('author', book_id=author.id) }}"
>
{{author.name.replace('|',',')|shortentitle(30)}}
</a>
{% if loop.last %}
{% if loop.last %}
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
<a
href=
"#"
class=
"author-expand"
data-authors-max=
"{{
g.
config_authors_max}}"
data-collapse-caption=
"({{_('reduce')}})"
>
(...)
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{% if not loop.first %}
{% if not loop.first %}
...
...
cps/web.py
View file @
a0a15b45
...
@@ -709,6 +709,7 @@ def before_request():
...
@@ -709,6 +709,7 @@ def before_request():
g
.
allow_registration
=
config
.
config_public_reg
g
.
allow_registration
=
config
.
config_public_reg
g
.
allow_upload
=
config
.
config_uploading
g
.
allow_upload
=
config
.
config_uploading
g
.
current_theme
=
config
.
config_theme
g
.
current_theme
=
config
.
config_theme
g
.
config_authors_max
=
config
.
config_authors_max
g
.
public_shelfes
=
ub
.
session
.
query
(
ub
.
Shelf
)
.
filter
(
ub
.
Shelf
.
is_public
==
1
)
.
order_by
(
ub
.
Shelf
.
name
)
.
all
()
g
.
public_shelfes
=
ub
.
session
.
query
(
ub
.
Shelf
)
.
filter
(
ub
.
Shelf
.
is_public
==
1
)
.
order_by
(
ub
.
Shelf
.
name
)
.
all
()
if
not
config
.
db_configured
and
request
.
endpoint
not
in
(
'basic_configuration'
,
'login'
)
and
'/static/'
not
in
request
.
path
:
if
not
config
.
db_configured
and
request
.
endpoint
not
in
(
'basic_configuration'
,
'login'
)
and
'/static/'
not
in
request
.
path
:
return
redirect
(
url_for
(
'basic_configuration'
))
return
redirect
(
url_for
(
'basic_configuration'
))
...
...
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