{% if workspace %}<p>Workspace: {{ workspace }}</p>{% endif %}
{% if work_request_list %}
    <table class="table table-sm" id="work_request-list">
        <thead>
            <tr>
                <th>
                    ID
                    {% include "web/_order.html" with name="id" order=order asc=asc only %}
                </th>
                <th>
                    Created
                    {% include "web/_order.html" with name="created_at" order=order asc=asc only %}
                </th>
                <th>
                    Task type
                    {% include "web/_order.html" with name="task_type" order=order asc=asc only %}
                </th>
                <th>
                    Task
                    {% include "web/_order.html" with name="task_name" order=order asc=asc only %}
                </th>
                <th>
                    Status
                    {% include "web/_order.html" with name="status" order=order asc=asc only %}
                </th>
                <th>
                    Result
                    {% include "web/_order.html" with name="result" order=order asc=asc only %}
                </th>
            </tr>
        </thead>
        <tbody>
            {% for work_request in work_request_list %}
                <tr>
                    <td>
                        <a href="{{ work_request.get_absolute_url }}">{{ work_request.id }}</a>
                    </td>
                    <td title="{{ work_request.created_at }}">{{ work_request.created_at|timesince }}</td>
                    <td>{{ work_request.task_type }}</td>
                    <td title="{{ work_request.task_name }}">{{ work_request.get_label }}</td>
                    <td>{% include "web/_work_request-status.html" with status=work_request.status only %}</td>
                    <td>{% include "web/_work_request-result.html" with result=work_request.result only %}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% else %}
    <p id="work_request-list-empty">No work requests.</p>
{% endif %}
