diff --git a/bookwyrm/templates/groups/members.html b/bookwyrm/templates/groups/members.html index 7dce0891..80dab21c 100644 --- a/bookwyrm/templates/groups/members.html +++ b/bookwyrm/templates/groups/members.html @@ -38,6 +38,11 @@ {{ member.display_name|truncatechars:10 }} @{{ member|username|truncatechars:8 }} + {% if group.manager == member %} + + Manager + + {% endif %} {% include 'snippets/add_to_group_button.html' with user=member minimal=True %} {% if member.mutuals %}

@@ -59,7 +64,6 @@ {% trans "Follows you" %}

{% endif %} - {% identify_manager %} {% endfor %} \ No newline at end of file diff --git a/bookwyrm/templatetags/bookwyrm_tags.py b/bookwyrm/templatetags/bookwyrm_tags.py index a219beb4..e00a8331 100644 --- a/bookwyrm/templatetags/bookwyrm_tags.py +++ b/bookwyrm/templatetags/bookwyrm_tags.py @@ -1,7 +1,6 @@ """ template filters """ from django import template from django.db.models import Avg -from django.utils.safestring import mark_safe from bookwyrm import models, views @@ -99,15 +98,3 @@ def mutuals_count(context, user): if not viewer.is_authenticated: return None return user.followers.filter(followers=viewer).count() - -@register.simple_tag(takes_context=True) -def identify_manager(context): - """boolean for whether user is group manager""" - group = context['group'] - member = context['member'] - snippet = mark_safe('') - - if group.manager == member: - snippet = mark_safe('Manager') - - return snippet \ No newline at end of file