mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
Fix #1309 (fix duplicate shelf names in book detail view)
This commit is contained in:
parent
06fde4fcd0
commit
c04b146486
@ -225,18 +225,6 @@
|
|||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul id="add-to-shelves" class="dropdown-menu" aria-labelledby="add-to-shelf">
|
<ul id="add-to-shelves" class="dropdown-menu" aria-labelledby="add-to-shelf">
|
||||||
{% for shelf in g.user.shelf %}
|
|
||||||
{% if not shelf.id in books_shelfs and shelf.is_public != 1 %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('shelf.add_to_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
|
|
||||||
data-remove-href="{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
|
|
||||||
data-shelf-action="add"
|
|
||||||
>
|
|
||||||
{{shelf.name}}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{%endfor%}
|
|
||||||
{% for shelf in g.shelves_access %}
|
{% for shelf in g.shelves_access %}
|
||||||
{% if not shelf.id in books_shelfs %}
|
{% if not shelf.id in books_shelfs %}
|
||||||
<li>
|
<li>
|
||||||
@ -253,16 +241,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="remove-from-shelves" class="btn-group" role="group" aria-label="Remove from shelves">
|
<div id="remove-from-shelves" class="btn-group" role="group" aria-label="Remove from shelves">
|
||||||
{% if books_shelfs %}
|
{% if books_shelfs %}
|
||||||
{% for shelf in g.user.shelf %}
|
|
||||||
{% if shelf.id in books_shelfs and shelf.is_public != 1 %}
|
|
||||||
<a href="{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
|
|
||||||
data-add-href="{{ url_for('shelf.add_to_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
|
|
||||||
class="btn btn-sm btn-default" role="button" data-shelf-action="remove"
|
|
||||||
>
|
|
||||||
<span class="glyphicon glyphicon-remove"></span> {{shelf.name}}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
{%endfor%}
|
|
||||||
{% for shelf in g.shelves_access %}
|
{% for shelf in g.shelves_access %}
|
||||||
{% if shelf.id in books_shelfs %}
|
{% if shelf.id in books_shelfs %}
|
||||||
<a href="{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
|
<a href="{{ url_for('shelf.remove_from_shelf', book_id=entry.id, shelf_id=shelf.id) }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user