<ul>
<h3>Email to send</h3>

        <table>
            <tr>
                <th>Username</th>
                <th>Supervisor</th>
            </tr>
            {% for user in users %}
                <tr>
                    <td>{{user.username}}</td>
                    <td>{{user.userprofile.supervisor}}</td>
                </tr>
            {% endfor %}

            </table>
            <br/>


    {% for user, status in status.items %}
        <li class='{% if status.0 %}text-success{% else %}text-warning{% endif %}'>
            {{user.username}} {% if status.0 %}success{% else %}failed [{{status.1}}]{% endif %} ({{status.2}})
            <button hx-get="{% url exam.app_name|add:':exam_user_report_email' exam_id=exam.pk user_id=user.pk %}"
            hx-prompt="Enter any additional emails"
            hx-confirm="Are you sure you wish to resend all emails?"
            hx-trigger="click, click from:#resend-all"
            >Resend</button>

        </li>
    {% empty %}
        <p>No emails sent.</p>

    {% endfor %}
</ul>
<button id="resend-all">Resend all</button>