{% extends "layout.jinja2" %}

{% block content %}
<div class="card mb-0">
    <div class="card-body">

    <p>
        <a href="{{ request.route_url('settings') }}" class="btn btn-light" role="button">
            <span class="ti ti-chevron-left fs-3"></span> Retour</a>
        <a href="{{ request.route_url('topic_edit', topic='0') }}" class="btn btn-success" role="button">
            <span class="ti ti-plus fs-3"></span> Nouveau Topic</a>
    </p>

    <table id="users_list" class="table table-sm">
        <thead>
            <tr>
                <th>Topic</th>
                <th>Name</th>
                <th>Langue</th>
            </tr>
        </thead>
        <tbody class="table-group-divider">
        {% for entry in topics %}
            <tr>
                <td>{{ entry.topic }}</td>
                <td>
                    <a href="{{ request.route_url('topic_edit', topic=entry.topic) }}">
                        {{ entry.topic_name }}
                    </a>
                </td>
                <td>{{ entry.topic_language }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    </div>
</div>
{% endblock %}
