{% extends "web/_base.html" %}
{% block navbar_left %}
    {{ block.super }}
    {% include "web/_workspace-menu.html" with workspace=workspace only %}
{% endblock %}
{% block title %}List of {{ workspace.name }} collections{% endblock %}
{% block content %}
    <h1>{{ workspace.name }} collections</h1>
    <p>
        A Collection is a set of artifacts or other collections that are intended to be used together.
        See <a href="https://freexian-team.pages.debian.net/debusine/explanation/concepts.html#collections">Collections documentation</a>
        for more details.
    </p>
    <p>
        This is a list of collections you can access from the <a href="{% url 'workspaces:detail' wname=workspace.name %}">{{ workspace.name }}</a> workspace:
    </p>
    {% if collection_list %}
        <table class="table table-hover" id="collection-list-table">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Category</th>
                </tr>
            </thead>
            <tbody>
                {% for collection in collection_list %}
                    <tr>
                        <td>
                            <a href="{{ collection.get_absolute_url }}">{{ collection.name }}</a>
                        </td>
                        <td>{{ collection.category }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p>No collections.</p>
    {% endif %}
{% endblock %}
