{% load debusine %}
{% load artifacts %}
<table class="table table-sm table-hover table-striped table-tds-vertical-align-middle"
       id="{{ table.prefix }}artifact-list">
    {% widget paginator.thead %}
    <tbody>
        {% for artifact in paginator.page_obj.object_list %}
            <tr>
                <td>
                    <span class="bi bi-{{ artifact|artifact_icon_name }}"></span>
                    {{ artifact|artifact_category_label|capfirst }}
                </td>
                <td>
                    <a class="text-decoration-none" href="{{ artifact.get_absolute_url }}">{{ artifact.get_label }}</a>
                    {% if not artifact.complete %}(incomplete){% endif %}
                </td>
                <td>
                    <div class="btn-group btn-group-sm"
                         role="group"
                         aria-label="Artifact shortcuts">
                        {% ui artifact as artifact_ui %}
                        {% for shortcut in artifact_ui.ui_shortcuts %}
                            {% widget shortcut %}
                        {% endfor %}
                    </div>
                </td>
            </tr>
        {% empty %}
            <tr>
                <td colspan="{{ table.columns|length }}">There are no artifacts to show matching the current filter</td>
            </tr>
        {% endfor %}
    </tbody>
    {% widget paginator.tfoot %}
</table>
