Merge pull request #1810 from bookwyrm-social/shelf-breadcrumbs

Shelf breadcrumbs
This commit is contained in:
Mouse Reeve
2022-01-11 12:55:08 -08:00
committed by GitHub
5 changed files with 32 additions and 29 deletions

View File

@ -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>

View 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 %}