{% extends '_layout.html' %}

{% block content %}
    <div class="box">
        <div class="table-container">
            <table class="table is-fullwidth">
                <tr>
                    <th>#</th>
                    <th>Name</th>
                    <th>Description</th>
                    <th>Action</th>
                </tr>
                {% for p in projects %}
                    <tr>
                        <td>{{ p.id }}</td>
                        <td>{{ p.name }}</td>
                        <td>{{ p.description }}</td>
                        <td>
                            <a href="/projects/{{ p.id }}" class="button is-info is-outlined">
                                <i class="fas fa-tasks mr-1"></i></a>
                            <a href="/projects/{{ p.id }}/annotate" class="button is-primary is-outlined">
                                <i class="fas fa-tag"></i></a>
                            {% if p.role == 'admin' %}
                                <a href="/projects/{{ p.id }}/dashboard" class="button is-danger is-outlined">
                                    <i class="fas fa-chart-line"></i></a>
                            {% endif %}
                        </td>
                    </tr>
                {% endfor %}
            </table>
        </div>
    </div>
{% endblock %}