fix reverse reference to user bookwyrm_groups

This commit is contained in:
Hugh Rundle
2021-09-28 18:53:11 +10:00
parent fb823189a0
commit 66494e7788
6 changed files with 28 additions and 7 deletions

View File

@ -3,7 +3,7 @@
{% load interaction %}
<div class="columns is-multiline">
{% for group in groups %}
{% for group in user.bookwyrm_groups.all %}
<div class="column is-one-quarter">
<div class="card is-stretchable">
<header class="card-header">

View File

@ -34,7 +34,7 @@
{% include 'groups/form.html' %}
</form>
{% include 'groups/user_groups.html' with groups=groups %}
{% include 'groups/user_groups.html' %}
</section>
<div>
{% include 'snippets/pagination.html' with page=user_groups path=path %}

View File

@ -75,7 +75,7 @@
<a href="{{ url }}">{% trans "Lists" %}</a>
</li>
{% endif %}
{% if is_self or has_groups %}
{% if is_self or user.bookwyrm_groups %}
{% url 'user-groups' user|username as url %}
<li{% if url in request.path %} class="is-active"{% endif %}>
<a href="{{ url }}">{% trans "Groups" %}</a>

View File

@ -22,6 +22,9 @@
{% block panel %}
{% if user.bookwyrm_user %}
{% for group in user.bookwyrm_groups.all %}
<div>{{ group.name }}</div>
{% endfor %}
<div class="block">
<h2 class="title">
{% include 'user/shelf/books_header.html' %}