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

{% block title %}Atm index{% endblock %}

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

    <table class="table">
        <thead>
            <tr>
                <th>Id</th>
                <th>Name</th>
                <th>Location</th>
                <th>DateCreated</th>
                <th>actions</th>
            </tr>
        </thead>
        <tbody>
        {% for atm in atms %}
            <tr>
                <td>{{ atm.id }}</td>
                <td>{{ atm.name }}</td>
                <td>{{ atm.location }}</td>
                <td>{{ atm.dateCreated ? atm.dateCreated|date('Y-m-d H:i:s') : '' }}</td>
                <td>
                    <a href="{{ path('app_atm_show', {'id': atm.id}) }}">show</a>
                    <a href="{{ path('app_atm_edit', {'id': atm.id}) }}">edit</a>
                </td>
            </tr>
        {% else %}
            <tr>
                <td colspan="5">no records found</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

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