From e15eef16c54647dce53bcdc1f4f01fb73587752b Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Mon, 27 Sep 2021 21:21:00 +1000 Subject: [PATCH] improve new group member adding The add-members page now looks almost identical to the group page and is clearer. --- bookwyrm/templates/groups/find_users.html | 6 +++-- bookwyrm/templates/groups/group.html | 24 ++++++++++++++++- bookwyrm/templates/groups/members.html | 26 +------------------ .../templates/groups/suggested_users.html | 15 +---------- 4 files changed, 29 insertions(+), 42 deletions(-) diff --git a/bookwyrm/templates/groups/find_users.html b/bookwyrm/templates/groups/find_users.html index 9154a527..99ec67bc 100644 --- a/bookwyrm/templates/groups/find_users.html +++ b/bookwyrm/templates/groups/find_users.html @@ -1,6 +1,8 @@ {% extends 'groups/group.html' %} -{% block panel %} -

Add users to {{ group.name }}

+{% block searchresults %} +

+ Add new members! +

{% include 'groups/suggested_users.html' with suggested_users=suggested_users query=query %} {% endblock %} \ No newline at end of file diff --git a/bookwyrm/templates/groups/group.html b/bookwyrm/templates/groups/group.html index 6c44e3b4..9617e133 100644 --- a/bookwyrm/templates/groups/group.html +++ b/bookwyrm/templates/groups/group.html @@ -8,9 +8,12 @@
+ {% block searchresults %} + {% endblock %} + {% include "groups/members.html" %} -

Lists

+

Lists

{% if not lists %}

{% trans "This group has no lists" %}

{% else %} @@ -57,5 +60,24 @@ {% endif %} {% include "snippets/pagination.html" with page=items %}
+ +
+
+

Find new members

+
+
+ +
+
+ +
+
+
+
+
{% endblock %} diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index df5f1602..a64d840e 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -2,34 +2,10 @@ {% load utilities %} {% load humanize %} {% load bookwyrm_tags %} - -{% if request.GET.updated %} -
- {% trans "You successfully added a user to this group!" %} -
-{% endif %} -

Group Members

+

Group Members

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

-{% block panel %} -
-
-
- -
-
- -
-
- {% include 'snippets/suggested_users.html' with suggested_users=suggested_users %} -
-{% endblock %} -
{% for member in group.members.all %}
diff --git a/bookwyrm/templates/groups/suggested_users.html b/bookwyrm/templates/groups/suggested_users.html index 40d32f3f..91b3784d 100644 --- a/bookwyrm/templates/groups/suggested_users.html +++ b/bookwyrm/templates/groups/suggested_users.html @@ -1,20 +1,7 @@ {% load i18n %} {% load utilities %} {% load humanize %} -
-
-
- -
-
- -
-
-
+ {% if suggested_users %}
{% for user in suggested_users %}