{% extends 'base.html.twig' %}

{% block title %}Suggestion index{% endblock %}

{% block body %}
    <h1>Suggestion index</h1>

    <table class="table">
        <thead>
            <tr>
                <th>Id</th>
                <th>Titre</th>
                <th>Contenu</th>
                <th>DateCreated</th>
                <th>actions</th>
            </tr>
        </thead>
        <tbody>
        {% for suggestion in suggestions %}
            <tr>
                <td>{{ suggestion.id }}</td>
                <td>{{ suggestion.titre }}</td>
                <td>{{ suggestion.contenu }}</td>
                <td>{{ suggestion.dateCreated ? suggestion.dateCreated|date('Y-m-d H:i:s') : '' }}</td>
                <td>
                    <a href="{{ path('app_suggestion_show', {'id': suggestion.id}) }}">show</a>
                    <a href="{{ path('app_suggestion_edit', {'id': suggestion.id}) }}">edit</a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="5">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <a href="{{ path('app_suggestion_new') }}">Create new</a>
{% endblock %}
