Coherent logic on which tabs show in the user page

This commit is contained in:
Mouse Reeve 2021-04-30 09:02:14 -07:00
parent 862ef83536
commit e4cecf2874
3 changed files with 6 additions and 4 deletions

View file

@ -41,8 +41,8 @@
</div>
{% endif %}
</div>
{% 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 %}
<nav class="tabs">
<ul>
{% url 'user-feed' user|username as url %}
@ -70,8 +70,8 @@
{% endif %}
</ul>
</nav>
{% endif %}
{% endwith %}
{% endblock %}
{% block panel %}{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends 'user/user_layout.html' %}
{% extends 'user/layout.html' %}
{% load i18n %}
{% block header %}

View file

@ -15,7 +15,7 @@
</header>
{% endblock %}
{% block panel %}
{% block tabs %}
<div class="block columns">
<div class="column">
<div class="tabs">
@ -39,7 +39,9 @@
</div>
{% endif %}
</div>
{% endblock %}
{% block panel %}
<div class="block">
{% include 'user/shelf/create_shelf_form.html' with controls_text='create-shelf-form' %}
</div>