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

{% block body %}
    <h1>Ülke Listesi</h1>
    <ul>
        <li>
            <a href="{{ path('country_new') }}">Yeni Ülke Ekle</a>
        </li>
    </ul>
    <table>
        <thead>
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>İşlemler</th>
        </tr>
        </thead>
        <tbody>
        {% for country in countries %}
            <tr>
                <td><a href="{{ path('country_show', { 'id': country.id }) }}">{{ country.id }}</a></td>
                <td>{{ country.name }}</td>
                <td>
                    <ul>
                        <li>
                            <a href="{{ path('country_show', { 'id': country.id }) }}">Göster</a>
                        </li>
                        <li>
                            <a href="{{ path('country_edit', { 'id': country.id }) }}">Düzenle</a>
                        </li>
                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}
