diff --git a/bookwyrm/templates/groups/find_users.html b/bookwyrm/templates/groups/find_users.html index 684cadb14..377e3a0b3 100644 --- a/bookwyrm/templates/groups/find_users.html +++ b/bookwyrm/templates/groups/find_users.html @@ -5,5 +5,5 @@

{% trans "Add new members!" %}

- {% include 'groups/suggested_users.html' with suggested_users=suggested_users query=query %} + {% include 'groups/suggested_users.html' with suggested_users=suggested_users %} {% endblock %} diff --git a/bookwyrm/templates/groups/group.html b/bookwyrm/templates/groups/group.html index 03ccae18f..f25a1f270 100644 --- a/bookwyrm/templates/groups/group.html +++ b/bookwyrm/templates/groups/group.html @@ -8,6 +8,23 @@
+ {% if group.user == request.user %} +
+
+
+ +
+
+ +
+
+
+ {% endif %} + {% block searchresults %} {% endblock %}
@@ -61,26 +78,5 @@ {% endif %} {% include "snippets/pagination.html" with page=items %}
- - {% if group.user == request.user %} -
-
-

Find new members

-
-
- -
-
- -
-
-
-
- {% endif %} -
{% endblock %} diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index 22eb0cb6a..88e3c1ebb 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -7,10 +7,24 @@

Group Members

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

+{% if group.user != request.user and group|is_member:request.user %} +
+ {% csrf_token %} + + + + +
+{% endif %} +
{% for membership in group.memberships.all %} {% with member=membership.user %} -
+ - -{% if group.user != request.user and group|is_member:request.user %} -
- {% csrf_token %} - - - -
-{% endif %} diff --git a/bookwyrm/templates/groups/suggested_users.html b/bookwyrm/templates/groups/suggested_users.html index 212a1a76e..951e7bf05 100644 --- a/bookwyrm/templates/groups/suggested_users.html +++ b/bookwyrm/templates/groups/suggested_users.html @@ -5,13 +5,13 @@ {% if suggested_users %}
{% for user in suggested_users %} -
+
{% include 'snippets/avatar.html' with user=user large=True %} {{ user.display_name|truncatechars:10 }} @{{ user|username|truncatechars:8 }} - {% include 'snippets/add_to_group_button.html' with user=user group=group minimal=True %} + {% include 'snippets/add_to_group_button.html' with user=user group=group %} {% if user.mutuals %}

{% blocktrans trimmed with mutuals=user.mutuals|intcomma count counter=user.mutuals %} @@ -36,7 +36,7 @@ {% endfor %}

{% else %} -

No potential members found for "{{ query }}"

+

No potential members found for "{{ user_query }}"


{% endif %} diff --git a/bookwyrm/templates/snippets/add_to_group_button.html b/bookwyrm/templates/snippets/add_to_group_button.html index fd94f14d1..2785d7c01 100644 --- a/bookwyrm/templates/snippets/add_to_group_button.html +++ b/bookwyrm/templates/snippets/add_to_group_button.html @@ -5,18 +5,14 @@ {% include 'snippets/block_button.html' with blocks=True %} {% else %} -
+
{% csrf_token %} -
@@ -25,17 +21,13 @@ {% if not group|is_member:user %} {% else %} - {% endif %} + {% endif %}
diff --git a/bookwyrm/templates/snippets/remove_from_group_button.html b/bookwyrm/templates/snippets/remove_from_group_button.html index 809d1d1fe..d5fa29a9d 100644 --- a/bookwyrm/templates/snippets/remove_from_group_button.html +++ b/bookwyrm/templates/snippets/remove_from_group_button.html @@ -6,18 +6,17 @@ {% include 'snippets/block_button.html' with blocks=True %}
{% endif %} -
+
-
+ {% csrf_token %} - +