diff --git a/bookwyrm/templates/groups/find_users.html b/bookwyrm/templates/groups/find_users.html index 377e3a0b3..1b0d54339 100644 --- a/bookwyrm/templates/groups/find_users.html +++ b/bookwyrm/templates/groups/find_users.html @@ -2,8 +2,5 @@ {% load i18n %} {% block searchresults %} -

- {% trans "Add new members!" %} -

{% include 'groups/suggested_users.html' with suggested_users=suggested_users %} {% endblock %} diff --git a/bookwyrm/templates/groups/form.html b/bookwyrm/templates/groups/form.html index 2b3dd635b..6767d1b10 100644 --- a/bookwyrm/templates/groups/form.html +++ b/bookwyrm/templates/groups/form.html @@ -5,11 +5,11 @@
- + {{ group_form.name }}
- + {{ group_form.description }}
diff --git a/bookwyrm/templates/groups/group.html b/bookwyrm/templates/groups/group.html index f25a1f270..1a71bda89 100644 --- a/bookwyrm/templates/groups/group.html +++ b/bookwyrm/templates/groups/group.html @@ -1,37 +1,41 @@ {% extends 'groups/layout.html' %} {% load i18n %} {% load bookwyrm_tags %} +{% load bookwyrm_group_tags %} {% load markdown %} {% block panel %}
- - {% if group.user == request.user %} -
-
-
- -
-
- -
-
-
- {% endif %} - {% block searchresults %} {% endblock %}
{% include "groups/members.html" with group=group %}
- -

Lists

+
+
+
+
+

{% trans "Lists" %}

+

+ {% trans "Members of this group can create group-curated lists." %} +

+
+ {% if request.user.is_authenticated and group|is_member:request.user %} +
+ {% trans "Create List" as button_text %} + {% include 'snippets/toggle/open_button.html' with controls_text="create_list" icon_with_text="plus" text=button_text focus="create_list_header" %} +
+ {% endif %} +
+{% if request.user.is_authenticated and group|is_member:request.user %} +
+ {% include 'lists/create_form.html' with controls_text="create_list" curation_group=group %} +
+{% endif %} +
+
{% if not lists %}

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

{% else %} @@ -45,19 +49,17 @@ {{ list.name }} {% include 'snippets/privacy-icons.html' with item=list %} - {% with list_books=list.listitem_set.all|slice:5 %} - {% if list_books %} - - {% endif %} + {% if list_books %} + + {% endif %} {% endwith %} -
{% if list.description %} @@ -74,9 +76,8 @@
{% endfor %}
- {% endif %} - {% include "snippets/pagination.html" with page=items %}
+ {% endblock %} diff --git a/bookwyrm/templates/groups/layout.html b/bookwyrm/templates/groups/layout.html index f558f169a..a25c10850 100644 --- a/bookwyrm/templates/groups/layout.html +++ b/bookwyrm/templates/groups/layout.html @@ -1,5 +1,6 @@ {% extends 'layout.html' %} {% load i18n %} +{% load bookwyrm_group_tags %} {% block title %}{{ group.name }}{% endblock %} @@ -11,12 +12,12 @@ {% include 'groups/created_text.html' with group=group %}

+ {% if request.user == group.user %}
- {% if request.user == group.user %} - {% trans "Edit group" as button_text %} - {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_group" focus="edit_group_header" %} - {% endif %} + {% trans "Edit group" as button_text %} + {% include 'snippets/toggle/open_button.html' with text=button_text icon_with_text="pencil" controls_text="edit_group" focus="edit_group_header" %}
+ {% endif %}
diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index 719674d89..8b06d178a 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -5,8 +5,22 @@ {% load bookwyrm_group_tags %}

Group Members

-

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

- +{% if group.user == request.user %} +
+
+
+ +
+
+ +
+
+
+{% endif %} {% if group.user != request.user and group|is_member:request.user %}
{% csrf_token %} diff --git a/bookwyrm/templates/groups/suggested_users.html b/bookwyrm/templates/groups/suggested_users.html index 64498eb85..581448d45 100644 --- a/bookwyrm/templates/groups/suggested_users.html +++ b/bookwyrm/templates/groups/suggested_users.html @@ -3,6 +3,9 @@ {% load humanize %} {% if suggested_users %} +

+ {% trans "Add new members!" %} +

{% for user in suggested_users %}
diff --git a/bookwyrm/templates/lists/create_form.html b/bookwyrm/templates/lists/create_form.html index 447c0f6bf..a1bda591d 100644 --- a/bookwyrm/templates/lists/create_form.html +++ b/bookwyrm/templates/lists/create_form.html @@ -7,6 +7,6 @@ {% block form %} - {% include 'lists/form.html' %} + {% include 'lists/form.html' with curation_group=group %} {% endblock %} diff --git a/bookwyrm/templates/lists/form.html b/bookwyrm/templates/lists/form.html index 803c7fd7b..c8383d9c8 100644 --- a/bookwyrm/templates/lists/form.html +++ b/bookwyrm/templates/lists/form.html @@ -25,7 +25,7 @@ value="closed" aria-described-by="id_curation_closed_help" id="id_curation_closed" - {% if not list or list.curation == 'closed' %} checked{% endif %} + {% if not curation_group.exists or not list or list.curation == 'closed' %}checked{% endif %} >