diff --git a/bookwyrm/templates/groups/group.html b/bookwyrm/templates/groups/group.html index 9617e1332..1ea8f00dd 100644 --- a/bookwyrm/templates/groups/group.html +++ b/bookwyrm/templates/groups/group.html @@ -11,7 +11,7 @@ {% block searchresults %} {% endblock %} - {% include "groups/members.html" %} + {% include "groups/members.html" with group=group %}

Lists

{% if not lists %} diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index a64d840e1..a08e73b92 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -7,7 +7,8 @@

{% trans "Members can add and remove books on your group's book lists" %}

- {% for member in group.members.all %} + {% for membership in group.memberships.all %} + {% with member=membership.user %}
{% include 'snippets/avatar.html' with user=member large=True %} @@ -19,7 +20,7 @@ Manager {% endif %} - {% include 'snippets/add_to_group_button.html' with user=member minimal=True %} + {% include 'snippets/add_to_group_button.html' with user=member group=group minimal=True %} {% if member.mutuals %}

{% blocktrans trimmed with mutuals=member.mutuals|intcomma count counter=member.mutuals %} @@ -41,5 +42,6 @@

{% endif %}
+ {% endwith %} {% endfor %}
\ No newline at end of file diff --git a/bookwyrm/templates/groups/suggested_users.html b/bookwyrm/templates/groups/suggested_users.html index 91b3784de..6323ffbe1 100644 --- a/bookwyrm/templates/groups/suggested_users.html +++ b/bookwyrm/templates/groups/suggested_users.html @@ -12,7 +12,7 @@ {{ user.display_name|truncatechars:10 }} @{{ user|username|truncatechars:8 }} - {% include 'snippets/add_to_group_button.html' with user=user minimal=True %} + {% include 'snippets/add_to_group_button.html' with user=user group=group minimal=True %} {% if user.mutuals %}

{% blocktrans trimmed with mutuals=user.mutuals|intcomma count counter=user.mutuals %} diff --git a/bookwyrm/templates/groups/user_groups.html b/bookwyrm/templates/groups/user_groups.html index 6b4cef1be..f99abc695 100644 --- a/bookwyrm/templates/groups/user_groups.html +++ b/bookwyrm/templates/groups/user_groups.html @@ -3,7 +3,7 @@ {% load interaction %}

- {% for group in user.bookwyrm_groups.all %} + {% for group in groups %}
diff --git a/bookwyrm/templates/snippets/add_to_group_button.html b/bookwyrm/templates/snippets/add_to_group_button.html index fe1403c48..7febe2b17 100644 --- a/bookwyrm/templates/snippets/add_to_group_button.html +++ b/bookwyrm/templates/snippets/add_to_group_button.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load bookwyrm_group_tags %} {% if request.user == user or not request.user == group.user or not request.user.is_authenticated %} {% elif user in request.user.blocks.all %} {% include 'snippets/block_button.html' with blocks=True %} @@ -6,30 +7,30 @@
-
+ {% csrf_token %} {% if user.local %} {% else %} - + Remote User {% endif %}
-
+ {% csrf_token %} - {% if user.manually_approves_followers and request.user not in user.followers.all %} + {% if group|is_invited:user %} {% else %}
- {% if not minimal %} -
- {% include 'snippets/user_options.html' with user=user class="is-small" %} -
- {% endif %}
{% endif %} diff --git a/bookwyrm/templates/user/groups.html b/bookwyrm/templates/user/groups.html index 36736e013..2735a5b8e 100644 --- a/bookwyrm/templates/user/groups.html +++ b/bookwyrm/templates/user/groups.html @@ -24,7 +24,7 @@ {% block panel %}
-