{% load debusine %}
<table class="table table-sm table-hover table-striped" id="members">
    {% widget paginator.thead %}
    <tbody>
        {% for gm in paginator.page_obj.object_list %}
            {% ui gm.group as group %}
            <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 group.can_manage %}
                        <a href="{{ gm.get_absolute_url_update }}"><i class="bi bi-gear-fill"></i> {{ gm.role }}</a>
                    {% else %}
                        {{ gm.role }}
                    {% endif %}
                </td>
                {% if paginator.table.columns.actions %}
                    <td>
                        <a class="btn btn-sm btn-danger" href="{{ gm.get_absolute_url_remove }}">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>
