Tabs for relationship views

This commit is contained in:
Mouse Reeve 2021-04-30 09:23:59 -07:00
parent 418e656aea
commit b65d0d05c9
2 changed files with 18 additions and 0 deletions

View file

@ -45,6 +45,7 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% block tabs %} {% block tabs %}
{% with user|username as username %} {% with user|username as username %}
<nav class="tabs"> <nav class="tabs">

View file

@ -2,6 +2,23 @@
{% load i18n %} {% load i18n %}
{% load bookwyrm_tags %} {% load bookwyrm_tags %}
{% block tabs %}
{% with user|username as username %}
<nav class="tabs">
<ul>
{% url 'user-following' user|username as url %}
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Following" %}</a>
</li>
{% url 'user-followers' user|username as url %}
<li{% if url == request.path or url == request.path|add:'/' %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Followers" %}</a>
</li>
</ul>
</nav>
{% endwith %}
{% endblock %}
{% block panel %} {% block panel %}
<div class="block"> <div class="block">
{% for follow in follow_list %} {% for follow in follow_list %}