2021-09-25 01:36:35 +00:00
{% load i18n %}
{% load utilities %}
{% load humanize %}
2021-09-25 09:53:06 +00:00
{% load bookwyrm_tags %}
2021-10-02 11:24:26 +00:00
{% load bookwyrm_group_tags %}
2021-09-25 01:36:35 +00:00
2021-09-27 11:21:00 +00:00
< h2 class = "title is-5" > Group Members< / h2 >
2022-01-02 23:09:52 +00:00
{% if group.user == request.user %}
< div class = "block" >
< form class = "field has-addons" method = "get" action = "{% url 'group-find-users' group.id %}" >
< div class = "control" >
< input type = "text" name = "user_query" value = "{{ request.GET.user_query }}" class = "input" placeholder = "{% trans 'Search to add a user' %}" aria-label = "{% trans 'Search to add a user' %}" >
< / div >
< div class = "control" >
< button class = "button" type = "submit" >
< span class = "icon icon-search" title = "{% trans 'Search' %}" >
< span class = "is-sr-only" > {% trans "Search" %}< / span >
< / span >
< / button >
< / div >
< / form >
< / div >
{% endif %}
2021-10-16 05:43:09 +00:00
{% if group.user != request.user and group|is_member:request.user %}
< form action = "{% url 'remove-group-member' %}" method = "POST" class = "my-4" >
{% csrf_token %}
< input type = "hidden" name = "group" value = "{{ group.id }}" >
< input type = "hidden" name = "user" value = "{{ user.username }}" >
< button id = "remove_self_button" class = "button is-small is-danger is-light is-hidden" type = "submit" >
{% trans "Confirm" %}
< / button >
< button id = "hide_remove_self_button" data-controls = "remove_self_button" class = "button is-small" type = "button" aria-pressed = "false" >
2021-10-16 06:45:39 +00:00
{% trans "Leave group" %}
< / button >
2021-10-16 05:43:09 +00:00
< / form >
{% endif %}
2021-10-02 10:05:19 +00:00
< div class = "is-multiline is-flex is-flex-grow-0 is-flex-wrap-wrap" >
2021-10-04 11:20:02 +00:00
{% for membership in group.memberships.all %}
{% with member=membership.user %}
2021-10-16 05:43:09 +00:00
< div class = "box has-text-centered is-shadowless has-background-white-bis my-2 mx-2 member_{{ member.id }}" >
2021-10-04 11:20:02 +00:00
< a href = "{{ member.local_path }}" class = "has-text-black" >
{% include 'snippets/avatar.html' with user=member large=True %}
< span title = "{{ member.display_name }}" class = "is-block is-6 has-text-weight-bold" > {{ member.display_name|truncatechars:10 }}< / span >
< span title = "@{{ member|username }}" class = "is-block pb-3" > @{{ member|username|truncatechars:8 }}< / span >
< / a >
{% if group.user == member %}
< span class = "icon icon-star-full" title = "Manager" >
< span class = "is-sr-only" > Manager< / span >
< / span >
{% endif %}
2021-10-16 05:43:09 +00:00
{% include 'snippets/remove_from_group_button.html' with user=member group=group %}
2021-10-04 11:20:02 +00:00
{% if request.user in member.following.all %}
< p class = "help" >
{% trans "Follows you" %}
< / p >
{% endif %}
2021-09-25 09:53:06 +00:00
< / div >
2021-10-02 00:47:42 +00:00
{% endwith %}
2021-09-25 09:53:06 +00:00
{% endfor %}
2021-10-04 11:20:02 +00:00
< / div >