From e4cecf2874103890be40f376cb399e2e21e7036c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 30 Apr 2021 09:02:14 -0700 Subject: [PATCH] Coherent logic on which tabs show in the user page --- bookwyrm/templates/user/layout.html | 4 ++-- bookwyrm/templates/user/lists.html | 2 +- bookwyrm/templates/user/shelf/shelf.html | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/user/layout.html b/bookwyrm/templates/user/layout.html index 0c3e94e3..0f04f628 100644 --- a/bookwyrm/templates/user/layout.html +++ b/bookwyrm/templates/user/layout.html @@ -41,8 +41,8 @@ {% endif %} +{% block tabs %} {% with user|username as username %} -{% if 'user/'|add:username|add:'/books' not in request.path and 'user/'|add:username|add:'/shelf' not in request.path %} -{% endif %} {% endwith %} +{% endblock %} {% block panel %}{% endblock %} diff --git a/bookwyrm/templates/user/lists.html b/bookwyrm/templates/user/lists.html index b2fd9eef..aa8ad7fb 100644 --- a/bookwyrm/templates/user/lists.html +++ b/bookwyrm/templates/user/lists.html @@ -1,4 +1,4 @@ -{% extends 'user/user_layout.html' %} +{% extends 'user/layout.html' %} {% load i18n %} {% block header %} diff --git a/bookwyrm/templates/user/shelf/shelf.html b/bookwyrm/templates/user/shelf/shelf.html index 93f0c15f..639ab502 100644 --- a/bookwyrm/templates/user/shelf/shelf.html +++ b/bookwyrm/templates/user/shelf/shelf.html @@ -15,7 +15,7 @@ {% endblock %} -{% block panel %} +{% block tabs %}
@@ -39,7 +39,9 @@
{% endif %}
+{% endblock %} +{% block panel %}
{% include 'user/shelf/create_shelf_form.html' with controls_text='create-shelf-form' %}