2021-10-02 03:48:53 +00:00
|
|
|
{% load i18n %}
|
|
|
|
{% load bookwyrm_group_tags %}
|
|
|
|
{% if request.user == user or not request.user == group.user or not request.user.is_authenticated %}
|
|
|
|
{% else %}
|
2021-10-03 02:57:21 +00:00
|
|
|
{% if user in request.user.blocks.all %}
|
|
|
|
{% include 'snippets/block_button.html' with blocks=True %}
|
|
|
|
<br/>
|
|
|
|
{% endif %}
|
2021-10-02 03:48:53 +00:00
|
|
|
<div class="field{% if not minimal %} has-addons{% else %} mb-0{% endif %}">
|
|
|
|
<div class="control">
|
|
|
|
<form action="{% url 'remove-group-member' %}" method="POST" class="interaction add_{{ user.id }}" data-id="add_{{ user.id }}">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="group" value="{{ group.id }}">
|
|
|
|
<input type="hidden" name="user" value="{{ user.username }}">
|
2021-10-03 02:57:21 +00:00
|
|
|
<button class="button is-small" type="submit">
|
2021-10-04 11:20:02 +00:00
|
|
|
{% if show_username %}
|
|
|
|
{% blocktrans with username=user.localname %}Remove @{{ username }}{% endblocktrans %}
|
|
|
|
{% else %}
|
|
|
|
{% trans "Remove" %}
|
|
|
|
{% endif %}
|
|
|
|
</button>
|
2021-10-02 03:48:53 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|