From 95c262c49573d58b6a51f548d5492a0018814ed8 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 18 Jan 2022 12:30:46 -0800 Subject: [PATCH] Renames group tags --- bookwyrm/templates/groups/group.html | 2 +- bookwyrm/templates/groups/layout.html | 2 +- bookwyrm/templates/groups/members.html | 2 +- bookwyrm/templates/lists/embed-list.html | 2 +- bookwyrm/templates/lists/list.html | 2 +- bookwyrm/templates/snippets/add_to_group_button.html | 3 ++- bookwyrm/templates/snippets/join_invitation_buttons.html | 3 ++- bookwyrm/templates/snippets/remove_from_group_button.html | 3 ++- bookwyrm/templates/user/layout.html | 2 +- .../templatetags/{bookwyrm_group_tags.py => group_tags.py} | 0 bookwyrm/tests/templatetags/test_notification_page_tags.py | 1 - 11 files changed, 12 insertions(+), 10 deletions(-) rename bookwyrm/templatetags/{bookwyrm_group_tags.py => group_tags.py} (100%) diff --git a/bookwyrm/templates/groups/group.html b/bookwyrm/templates/groups/group.html index 88f11420..5f5b5860 100644 --- a/bookwyrm/templates/groups/group.html +++ b/bookwyrm/templates/groups/group.html @@ -1,6 +1,6 @@ {% extends 'groups/layout.html' %} {% load i18n %} -{% load bookwyrm_group_tags %} +{% load group_tags %} {% load markdown %} {% block panel %} diff --git a/bookwyrm/templates/groups/layout.html b/bookwyrm/templates/groups/layout.html index a25c1085..e688bc77 100644 --- a/bookwyrm/templates/groups/layout.html +++ b/bookwyrm/templates/groups/layout.html @@ -1,6 +1,6 @@ {% extends 'layout.html' %} {% load i18n %} -{% load bookwyrm_group_tags %} +{% load group_tags %} {% block title %}{{ group.name }}{% endblock %} diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index 1d1ac314..90236843 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -1,7 +1,7 @@ {% load i18n %} {% load utilities %} {% load humanize %} -{% load bookwyrm_group_tags %} +{% load group_tags %}

Group Members

{% if group.user == request.user %} diff --git a/bookwyrm/templates/lists/embed-list.html b/bookwyrm/templates/lists/embed-list.html index 9c07291c..ec4a9162 100644 --- a/bookwyrm/templates/lists/embed-list.html +++ b/bookwyrm/templates/lists/embed-list.html @@ -1,7 +1,7 @@ {% extends 'embed-layout.html' %} {% load i18n %} {% load rating_tags %} -{% load bookwyrm_group_tags %} +{% load group_tags %} {% load markdown %} {% block title %}{% blocktrans with list_name=list.name owner=list.user.display_name %}{{ list_name }}, a list by {{owner}}{% endblocktrans %}{% endblock title %} diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index eb351df3..b77f935c 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -1,7 +1,7 @@ {% extends 'lists/layout.html' %} {% load i18n %} {% load rating_tags %} -{% load bookwyrm_group_tags %} +{% load group_tags %} {% load markdown %} {% block breadcrumbs %} diff --git a/bookwyrm/templates/snippets/add_to_group_button.html b/bookwyrm/templates/snippets/add_to_group_button.html index 2785d7c0..20194623 100644 --- a/bookwyrm/templates/snippets/add_to_group_button.html +++ b/bookwyrm/templates/snippets/add_to_group_button.html @@ -1,5 +1,6 @@ {% load i18n %} -{% load bookwyrm_group_tags %} +{% load 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 %} diff --git a/bookwyrm/templates/snippets/join_invitation_buttons.html b/bookwyrm/templates/snippets/join_invitation_buttons.html index 46c4071d..b77ce43c 100644 --- a/bookwyrm/templates/snippets/join_invitation_buttons.html +++ b/bookwyrm/templates/snippets/join_invitation_buttons.html @@ -1,5 +1,6 @@ {% load i18n %} -{% load bookwyrm_group_tags %} +{% load group_tags %} + {% if group|is_invited:request.user %}
diff --git a/bookwyrm/templates/snippets/remove_from_group_button.html b/bookwyrm/templates/snippets/remove_from_group_button.html index 1672e038..2e08760f 100644 --- a/bookwyrm/templates/snippets/remove_from_group_button.html +++ b/bookwyrm/templates/snippets/remove_from_group_button.html @@ -1,5 +1,6 @@ {% load i18n %} -{% load bookwyrm_group_tags %} +{% load group_tags %} + {% if request.user == user or not request.user == group.user or not request.user.is_authenticated %} {% else %} {% if user in request.user.blocks.all %} diff --git a/bookwyrm/templates/user/layout.html b/bookwyrm/templates/user/layout.html index 03e3dfce..65b6a9ac 100755 --- a/bookwyrm/templates/user/layout.html +++ b/bookwyrm/templates/user/layout.html @@ -4,7 +4,7 @@ {% load utilities %} {% load markdown %} {% load layout %} -{% load bookwyrm_group_tags %} +{% load group_tags %} {% block title %}{{ user.display_name }}{% endblock %} diff --git a/bookwyrm/templatetags/bookwyrm_group_tags.py b/bookwyrm/templatetags/group_tags.py similarity index 100% rename from bookwyrm/templatetags/bookwyrm_group_tags.py rename to bookwyrm/templatetags/group_tags.py diff --git a/bookwyrm/tests/templatetags/test_notification_page_tags.py b/bookwyrm/tests/templatetags/test_notification_page_tags.py index 11caaeb1..7853f4d1 100644 --- a/bookwyrm/tests/templatetags/test_notification_page_tags.py +++ b/bookwyrm/tests/templatetags/test_notification_page_tags.py @@ -25,7 +25,6 @@ class BookWyrmTags(TestCase): localname="mouse", ) - def test_related_status(self, *_): """gets the subclass model for a notification status""" with patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async"):