{% extends "cow/base.html" %}

{% block content %}
<a href="{% url 'page_create' %}">Create page</a>
<table>
    <thead>
        <tr>
            <th>name</th>
            <th>plugins</th>
            <th>created</th>
            <th>updated</th>
        </tr>
    </thead>
    <tbody>
        {% for page in object_list %}
            <tr>
                <td><a href="{% url 'page_detail' page.id %}">{{ page.name }}</a></td>
                <td>
                    {% for plugin in page.plugins.all %}
                        {{ plugin }}
                        {% if not forloop.last %},{% endif %}
                    {% endfor %}
                </td>
                <td>{{ page.created }}</td>
                <td>{{ page.last_updated }}</td>
            </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}
