diff --git a/bookwyrm/models/shelf.py b/bookwyrm/models/shelf.py index 739c0599..515bb161 100644 --- a/bookwyrm/models/shelf.py +++ b/bookwyrm/models/shelf.py @@ -49,7 +49,7 @@ class Shelf(OrderedCollectionMixin, BookWyrmModel): def get_remote_id(self): """ shelf identifier instead of id """ base_path = self.user.remote_id - return "%s/shelf/%s" % (base_path, self.identifier) + return "%s/books/%s" % (base_path, self.identifier) class Meta: """ user/shelf unqiueness """ diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index f0f04b84..0937fcc3 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -55,7 +55,7 @@ diff --git a/bookwyrm/templates/user/books_header.html b/bookwyrm/templates/user/books_header.html new file mode 100644 index 00000000..8fea84c7 --- /dev/null +++ b/bookwyrm/templates/user/books_header.html @@ -0,0 +1,6 @@ +{% load i18n %} +{% if is_self %} +{% trans "Your books" %} +{% else %} +{% blocktrans with username=user.display_name %}{{ username }}'s books{% endblocktrans %} +{% endif %} diff --git a/bookwyrm/templates/user/shelf.html b/bookwyrm/templates/user/shelf.html index 4c60258c..5173da07 100644 --- a/bookwyrm/templates/user/shelf.html +++ b/bookwyrm/templates/user/shelf.html @@ -3,14 +3,14 @@ {% load humanize %} {% load i18n %} +{% block title %} +{% include 'user/books_header.html' %} +{% endblock %} + {% block header %}

- {% if is_self %} - {% trans "Your Shelves" %} - {% else %} - {% blocktrans with username=user.display_name %}{{ username }}: Shelves{% endblocktrans %} - {% endif %} + {% include 'user/books_header.html' %}

{% endblock %} @@ -22,7 +22,7 @@
diff --git a/bookwyrm/templates/user/user.html b/bookwyrm/templates/user/user.html index 52a91561..a54664ce 100644 --- a/bookwyrm/templates/user/user.html +++ b/bookwyrm/templates/user/user.html @@ -1,5 +1,6 @@ {% extends 'user/user_layout.html' %} {% load i18n %} +{% load bookwyrm_tags %} {% block title %}{{ user.display_name }}{% endblock %} @@ -23,12 +24,14 @@ {% block panel %} {% if user.bookwyrm_user %}
-

{% trans "Shelves" %}

+

+ {% include 'user/books_header.html' %} +

{% for shelf in shelves %} {% endif %} diff --git a/bookwyrm/templates/user/user_layout.html b/bookwyrm/templates/user/user_layout.html index d60db2a0..0c3e94e3 100644 --- a/bookwyrm/templates/user/user_layout.html +++ b/bookwyrm/templates/user/user_layout.html @@ -42,7 +42,7 @@ {% endif %}
{% with user|username as username %} -{% if 'user/'|add:username|add:'/shelf' not in request.path and 'user/'|add:username|add:'/shelves' not in request.path %} +{% if 'user/'|add:username|add:'/books' not in request.path and 'user/'|add:username|add:'/shelf' not in request.path %}