Merge pull request #1810 from bookwyrm-social/shelf-breadcrumbs
Shelf breadcrumbs
This commit is contained in:
@ -25,10 +25,7 @@
|
||||
|
||||
<button class="button is-fullwidth is-small shelf-option is-radiusless is-white" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}>
|
||||
<span>
|
||||
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
|
12
bookwyrm/templates/snippets/translated_shelf_name.html
Normal file
12
bookwyrm/templates/snippets/translated_shelf_name.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% load i18n %}
|
||||
{% if shelf.identifier == 'all' %}
|
||||
{% trans "All books" %}
|
||||
{% elif shelf.identifier == 'to-read' %}
|
||||
{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}
|
||||
{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}
|
||||
{% trans "Read" %}
|
||||
{% else %}
|
||||
{{ shelf.name }}
|
||||
{% endif %}
|
Reference in New Issue
Block a user