{% load debusine %}
<table class="table table-sm table-hover table-striped" id="members">
    {% widget paginator.thead %}
    <tbody>
        {% for gm in members.page_obj.object_list %}
            <tr>
                <td>
                    {% if gm.user == user %}
                        <b>{{ gm.user.username }}</b> (you)
                    {% else %}
                        {{ gm.user.username }}
                    {% endif %}
                </td>
                <td>{{ gm.user.get_full_name }}</td>
                <td>
                    {% if can_manage %}
                        <a href="{% url 'groups:update-member' group=group.name user=gm.user.username %}"><i class="bi bi-gear-fill"></i> {{ gm.role }}</a>
                    {% else %}
                        {{ gm.role }}
                    {% endif %}
                </td>
                {% if members.table.columns.actions %}
                    <td>
                        <a class="btn btn-sm btn-danger"
                           href="{% url 'groups:remove-member' group=group.name user=gm.user.username %}">Remove</a>
                    </td>
                {% endif %}
            </tr>
        {% empty %}
            <tr>
                <td colspan="{{ table.columns|length }}">There are no rows to show matching the current filter</td>
            </tr>
        {% endfor %}
    </tbody>
    {% widget paginator.tfoot %}
</table>
