{% comment %} Partial: list of User candidates for HTMX swap {% endcomment %}
{% if user_users %}
    <ul class="list-group list-group-flush">
        {% for user in user_users %}
            <li class="list-group-item d-flex justify-content-between align-items-start">
                <div>
                    <div class="d-flex align-items-center">
                        <i class="bi bi-clock-history text-muted me-2" title="View user exam history"
                           hx-get="{% url exam.app_name|add:':exam_user_status_user' exam.id user.id %}"
                           hx-target=".modal-content"
                           data-bs-toggle="modal"
                           data-bs-target="#history-modal"
                        ></i>
                        {% if request.user.is_superuser %}
                            <a class="me-2" href='{% url "account_profile" user.username %}'><i class="bi bi-link"></i></a>
                        {% endif %}
                        <span class="fw-bold">{{ user.username }}</span>
                    </div>
                    <div class="small">Email: {{ user.email }}</div>
                </div>
                <div class="badge-container d-flex align-items-center ms-3"></div>
            </li>
        {% endfor %}
    </ul>
{% else %}
    <p class="text-muted">This exam has no User candidates.</p>
{% endif %}
