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
f7269d8d
Commit
f7269d8d
authored
May 12, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #1385 (Private shelves are listed twice in the "Add to shelf" dropdown menu)
parent
33472567
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
detail.html
cps/templates/detail.html
+2
-2
search.html
cps/templates/search.html
+4
-7
No files found.
cps/templates/detail.html
View file @
f7269d8d
...
...
@@ -240,7 +240,7 @@
data-remove-href=
"{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
data-shelf-action=
"add"
>
{{shelf.name}}
{{shelf.name}}
{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
</a>
</li>
{% endif %}
...
...
@@ -257,7 +257,7 @@
>
<span
{%
if
not
shelf
.
is_public
or
g
.
user
.
role_edit_shelfs
()
%}
class=
"glyphicon glyphicon-remove"
{%
endif
%}
></span>
{{shelf.name}}
{%
endif
%}
></span>
{{shelf.name}}
{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
</a>
{% endif %}
{%endfor%}
...
...
cps/templates/search.html
View file @
f7269d8d
...
...
@@ -15,14 +15,11 @@
<span
class=
"caret"
></span>
</button>
<ul
id=
"add-to-shelves"
class=
"dropdown-menu"
aria-labelledby=
"add-to-shelf"
>
{% for shelf in g.user.shelf %}
{% if shelf.is_public != 1 %}
<li><a
href=
"{{ url_for('shelf.search_to_shelf', shelf_id=shelf.id) }}"
>
{{shelf.name}}
</a></li>
{% endif %}
{% endfor %}
{% for shelf in g.shelves_access %}
<li><a
href=
"{{ url_for('shelf.search_to_shelf', shelf_id=shelf.id) }}"
>
{{shelf.name}}
</a></li>
{% endfor %}
{% if not shelf.id in books_shelfs and ( not shelf.is_public or g.user.role_edit_shelfs() ) %}
<li><a
href=
"{{ url_for('shelf.search_to_shelf', shelf_id=shelf.id) }}"
>
{{shelf.name}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
</a></li>
{% endif %}
{%endfor%}
</ul>
</div>
</div>
...
...
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