{% load debusine %}
<table class="table table-sm table-hover table-striped"
       id="collection-item-list">
    {% widget paginator.thead %}
    <tbody>
        {% for item in paginator.page_obj.object_list %}
            <tr>
                <td>{{ item.category }}</td>
                <td>
                    {% if item.artifact %}
                        <a href="{{ item.artifact.get_absolute_url }}">{{ item.name }}</a>
                    {% elif item.collection %}
                        <a href="{{ item.collection.get_absolute_url }}">{{ item.name }}</a>
                    {% else %}
                        <a href="{{ item.get_absolute_url }}">{{ item.name }}</a>
                    {% endif %}
                </td>
                <td>{{ item.created_at|date:"Y-m-d H:i" }}</td>
                <td>
                    <div class="btn-group btn-group-sm"
                         role="group"
                         aria-label="Item shortcuts">
                        {% ui item as item_ui %}
                        {% for shortcut in item_ui.ui_shortcuts %}
                            {% widget shortcut %}
                        {% endfor %}
                    </div>
                </td>
            </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>
