From 8c326ec52fc46bb0a84e392058c520b3ca6b7ad0 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sat, 25 Sep 2021 11:10:06 +1000 Subject: [PATCH] user groups listing template - creates groups/user_groups template for listing a user's groups on their user page --- bookwyrm/templates/groups/user_groups.html | 35 ++++++++++++++++++++++ bookwyrm/templates/user/groups.html | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 bookwyrm/templates/groups/user_groups.html diff --git a/bookwyrm/templates/groups/user_groups.html b/bookwyrm/templates/groups/user_groups.html new file mode 100644 index 00000000..9c48a842 --- /dev/null +++ b/bookwyrm/templates/groups/user_groups.html @@ -0,0 +1,35 @@ +{% load i18n %} +{% load markdown %} +{% load interaction %} + +
+ {% for group in groups %} +
+
+
+

+ {{ group.name }} {% include 'snippets/privacy-icons.html' with item=group %} +

+ {% if request.user.is_authenticated and request.user|saved:list %} +
+ {% trans "Saved" as text %} + + {{ text }} + +
+ {% endif %} +
+ +
+
+ {% if group.description %} + {{ group.description|to_markdown|safe|truncatechars_html:30 }} + {% else %} +   + {% endif %} +
+
+
+
+ {% endfor %} +
diff --git a/bookwyrm/templates/user/groups.html b/bookwyrm/templates/user/groups.html index 39e09bc1..912d5ec3 100644 --- a/bookwyrm/templates/user/groups.html +++ b/bookwyrm/templates/user/groups.html @@ -34,7 +34,7 @@ {% include 'groups/form.html' %} - {% include 'groups/group_items.html' with groups=groups %} + {% include 'groups/user_groups.html' with groups=groups %}
{% include 'snippets/pagination.html' with page=user_groups path=path %}