use shelf name if not default shelf

(instead of shelf.identifier)
This commit is contained in:
Hugh Rundle 2021-11-06 11:10:58 +11:00
parent d8098357e6
commit dfe92a27c0
No known key found for this signature in database
GPG key ID: CD23D6039184286B
2 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@
{% load i18n %}
{% block title %}
{% include 'user/books_header.html' with shelfname=shelf.identifier %}
{% include 'user/books_header.html' with shelf=shelf %}
{% endblock %}
{% block opengraph_images %}

View file

@ -1,15 +1,15 @@
{% load i18n %}
{% if is_self %}
{% if shelfname == 'to-read' %}
{% if shelf.identifier == 'to-read' %}
{% trans "To Read" %}
{% elif shelfname == 'reading' %}
{% elif shelf.identifier == 'reading' %}
{% trans "Currently Reading" %}
{% elif shelfname == 'read' %}
{% elif shelf.identifier == 'read' %}
{% trans "Read" %}
{% elif shelfname == 'all' %}
{% elif shelf.identifier == 'all' %}
{% trans "Your books" %}
{% else %}
{{ shelfname }}
{{ shelf.name }}
{% endif %}
{% else %}
{% blocktrans with username=user.display_name %}{{ username }}'s books{% endblocktrans %}