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

{% block body %}
    <h1>Suscribers list</h1>

    <table>
        <thead>
            <tr>
                <th>Id</th>
                <th>Shortname</th>
                <th>Longname</th>
                <th>About</th>
                <th>Balance</th>
                <th>Createdat</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
        {% for suscriber in suscribers %}
            <tr>
                <td><a href="{{ path('suscriber_show', { 'id': suscriber.id }) }}">{{ suscriber.id }}</a></td>
                <td>{{ suscriber.shortName }}</td>
                <td>{{ suscriber.longName }}</td>
                <td>{{ suscriber.about }}</td>
                <td>{{ suscriber.balance }}</td>
                <td>{% if suscriber.createdAt %}{{ suscriber.createdAt|date('Y-m-d H:i:s') }}{% endif %}</td>
                <td>
                    <ul>
                        <li>
                            <a href="{{ path('suscriber_show', { 'id': suscriber.id }) }}">show</a>
                        </li>
                        <li>
                            <a href="{{ path('suscriber_edit', { 'id': suscriber.id }) }}">edit</a>
                        </li>
                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <ul>
        <li>
            <a href="{{ path('suscriber_new') }}">Create a new suscriber</a>
        </li>
    </ul>
{% endblock %}
