mirror of
https://github.com/janeczku/calibre-web
synced 2025-01-12 18:30:31 +00:00
Fix duplicate shelf names in "search"
This commit is contained in:
parent
486c0f2937
commit
ce0fab8d2f
@ -242,7 +242,7 @@
|
|||||||
data-remove-href="{{ url_for('shelf.remove_from_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"
|
data-shelf-action="add"
|
||||||
>
|
>
|
||||||
{{shelf.name}}
|
{{shelf.name}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -259,7 +259,7 @@
|
|||||||
>
|
>
|
||||||
<span {% if not shelf.is_public or g.user.role_edit_shelfs() %}
|
<span {% if not shelf.is_public or g.user.role_edit_shelfs() %}
|
||||||
class="glyphicon glyphicon-remove"
|
class="glyphicon glyphicon-remove"
|
||||||
{% endif %}></span> {{shelf.name}}
|
{% endif %}></span> {{shelf.name}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%endfor%}
|
{%endfor%}
|
||||||
|
@ -15,14 +15,11 @@
|
|||||||
<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 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 %}
|
{% for shelf in g.shelves_access %}
|
||||||
<li><a href="{{ url_for('shelf.search_to_shelf', shelf_id=shelf.id) }}">{{shelf.name}}</a></li>
|
{% if not shelf.id in books_shelfs and ( not shelf.is_public or g.user.role_edit_shelfs() ) %}
|
||||||
{% endfor %}
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user